I want to enable a user to run sudo without password. I used visudo
to append the line to config file
idiot ALL=(ALL) NOPASSWD: ALL
Yet sudo still asks password as usual. Why?
Problem solved. I assumed that the line
#includedir /etc/sudoers.d
Is commented out, because the symbol in the front. But no, it is still working and overriding my config.
You should add your changes after the line or check the contents of /etc/sudoers.d
directory.
sudo -l
.NOPASSWD:
andALL
- change it toidiot ALL=(ALL) NOPASSWD:ALL
and it should be finesudo -k
it still wants a password.idiot
must log out/login first. If it's a user - isidiot
member of other groups, which require password for sudo?/etc/sudoers.d
folder not empty, it overrode my config. Thanks forsudo -l
tip, it tipped me off.