2008-05-14 13:50:07 |
Martin Pitt |
description |
chris@HAL421:~$ sudo visduo
right after Defaults you find the following 2 lines:
# Uncomment to allow members of group sudo to not need a password
#%sudo ALL=NOPASSWD: ALL
Uncomment the sudo line, save the file, make sure you are in the sudo group:
chris@HAL421:~$ cat /etc/group | grep sudo
sudo:x:27:chris
log out & back in - sudo anything and you're still asked for a password
now
chris@HAL421:~$ sudo visduo
add NOPASSWD to the admin line at the bottom:
%admin ALL=(ALL) NOPASSWD: ALL
save, logout/login - sudo now no longer asks for a password |
chris@HAL421:~$ sudo visduo
right after Defaults you find the following 2 lines:
# Uncomment to allow members of group sudo to not need a password
#%sudo ALL=NOPASSWD: ALL
Uncomment the sudo line, save the file, make sure you are in the sudo group:
chris@HAL421:~$ cat /etc/group | grep sudo
sudo:x:27:chris
log out & back in - sudo anything and you're still asked for a password
now
chris@HAL421:~$ sudo visduo
add NOPASSWD to the admin line at the bottom:
%admin ALL=(ALL) NOPASSWD: ALL
save, logout/login - sudo now no longer asks for a password
TEST CASE:
- create a root shell with sudo -i
- mv /etc/sudoers{,.old}
- apt-get install sudo
With the current version, the "# %sudo" line is somewhere in the middle of the newly created /etc/sudoers. With the updated hardy-proposed version, it is at the very bottom.
- mv /etc/sudoers{.old,}
Restore your original sudoers. |
|