⇤ ← Revision 1 as of 2016-11-06 05:03:36
Size: 442
Comment:
|
← Revision 2 as of 2016-11-06 05:07:53 ⇥
Size: 701
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
# Allow members of sudo group to execute any command, and switch to another user, w/out password prompt %sudo ALL=(ALL) NOPASSWD: ALL |
|
Line 10: | Line 12: |
# Allow user to execute only 1 program as root | # Allow user to execute only 1 program as root or any user, w/o password |
Line 12: | Line 14: |
# Allow user to execute only 1 program as root or any user sjain ALL=(ALL) /usr/bin/whatever |
Various sudo-related tips & tricks; these should go into /etc/sudoers or /etc/sudoers.d/
# Allow all members of sudo group to execute any command w/out password prompt
%sudo ALL=NOPASSWD: ALL
# Allow members of sudo group to execute any command, and switch to another user, w/out password prompt
%sudo ALL=(ALL) NOPASSWD: ALL
# Allow one user to execute any command w/o password prompt
sjain ALL=NOPASSWD: ALL
# Allow user to execute only 1 program as root or any user, w/o password
sjain ALL=(ALL) NOPASSWD: /usr/bin/whatever
# Allow user to execute only 1 program as root or any user
sjain ALL=(ALL) /usr/bin/whatever