<users_to_allow> <host> = (run_as_user) <command_to_run>
No password for users in admin group
%admin ALL= (ALL) NOPASSWD: ALL
No password for joeuser user
joeuser ALL=(ALL) NOPASSWD: ALL
Allow joeuser to run only certain privileged commands as root
joeuser ALL= /bin/kill, /usr/local/bin/
Allow joeuser to run certain commands as given users
joeuser ALL=(janeuser,johnuser) /bin/kill, /usr/local/bin
Run sudo command as another user using
sudo -u janeuser /bin/kill
http://aplawrence.com/Basics/sudo.html
No comments:
Post a Comment