To allow members of the group to run any command as themselves:
%groupname ALL= ALLTo allow members of the group to run any command as any user with the exception of /usr/su:
%groupname ALL=(ALL) ALL, !/usr/suNow prepend any command with sudo and it will run as root. If you forget you can rerun the last command with !! eg:
# visudoError, permission denied
# sudo !!runs visudo as root
To run a command as a specific user:
# sudo -u <username> <command>
No comments:
Post a Comment