usermod -G wheel abcde
visudo
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
root root user ALL = from all hosts (ALL) Can be run as any user ALL All commands can be executed
##4 Add permissions to the wheel group instead of root
The first "#Remove "" to enable this line.
Allows people in group wheel to run all commands %wheel ALL=(ALL) ALL
##5 Check if the authority is working.
Log out of root and log in as the abcde user.
Here, let's execute a command that cat is not allowed to execute.
Since you do not have permission in the usual way, even if you run it as an abcde user, you will get an error saying "You do not have permission".
cat /var/log/secure
Now let's hit the same command with sudo first.
sudo cat /var/log/secure
If it can be executed, the authorization is completed.
Recommended Posts