Applies to:
Linux OS - Version Oracle Linux 5.0 and later
Linux x86
Goal
This document explains how to provide sudo access for non-root user for all commands
Solution
- Run "visudo" and uncomment the following line (if commented):
# %wheel ALL=(ALL) ALL
to%wheel ALL=(ALL) ALL
- Add the non-root user to "wheel" group
# usermod -aG wheel <non-root user>
- As non-root user, try any command where root privilege is necessary. For example:
# sudo tail -f /var/log/messages
Note: To revoke the sudo access, you need to remove the user from wheel group.