Difference between revisions of "Sudo"
From Noah.org
Jump to navigationJump to searchLine 18: | Line 18: | ||
== No password == | == No password == | ||
+ | |||
+ | Allow a specific user to sudo without a password: | ||
<pre> | <pre> | ||
− | + | YOUR_USERNAME ALL=NOPASSWD: ALL | |
+ | </pre> | ||
+ | |||
+ | Allow all users in the admin group to sudo without a password: | ||
+ | |||
+ | <pre> | ||
+ | %admin ALL=NOPASSWD: ALL | ||
</pre> | </pre> |
Revision as of 13:31, 20 July 2008
Use `visudo` to make changes to /etc/sudoers.
Set timestamp timeout
The following sets the timestamp timeout to 30 minutes for the given YOUR_USERNAME.
Defaults:YOUR_USERNAME timestamp_timeout=30
The following sets the timestamp timeout to 30 minutes for all users:
Defaults timestamp_timeout=30
No password
Allow a specific user to sudo without a password:
YOUR_USERNAME ALL=NOPASSWD: ALL
Allow all users in the admin group to sudo without a password:
%admin ALL=NOPASSWD: ALL