%sudo ALL=NOPASSWD: ALL seems to have no effect in sudoers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo (Ubuntu) |
Fix Released
|
Low
|
Martin Pitt | ||
Hardy |
Fix Released
|
Low
|
Martin Pitt |
Bug 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
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.
Changed in sudo: | |
assignee: | nobody → pitti |
importance: | Undecided → Low |
status: | New → In Progress |
It looks like sudo also ignores the instruction to allow a single account the ability to execute specific commands without supplying the account's password. For example:
bkline localhost = NOPASSWD: /usr/local/ bin/do- start-vpn, \
/usr/ sbin/vpnc- disconnect
This works in any other distribution of Linux. Is this the same bug?