Jun 3, 2017

Ubuntu: visudo problem / NOPASSWD option does not work for commands

It is always the same:
After installing a new Linux commands like
/usr/sbin/s2disk
/sbin/reboot
only work with entering your password everytime (or precisely: after every reboot).
This can be changed with visudo:
export EDITOR=vi; visudo
 Inside the /etc/sudoers.conf you will see:
# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
And this is the problem:
First idea is to double the line
root    ALL=(ALL:ALL) ALL
schroff    ALL=(ALL) NOPASSWD: /usr/sbin/s2disk
and do the desired changes.

BUT: This will not work!

You have to add your line at the end of the file and after you exit vi (or whatever editor you have configured) it will work...

No comments:

Post a Comment