Wednesday, June 14, 2017

linux - Trying to enable passwordless sudo



I want to enable passwordless sudo for user "bamboo" on my host, so I have added



bamboo ALL=NOPASSWD: ALL


and also




%admin ALL=(ALL) NOPASSWD: ALL


(user bamboo is in the admin group) to the /etc/sudoers, logged out, logged in, but the sudo still asks for a password. I am on "Ubuntu 12.10" ... Any idea what do I wrong?



Thanks, f.


Answer



You have different mistakes in each line:
On the user ilne, you have not specified the COMMANDS portion, should be:




bamboo ALL=(ALL) NOPASSWD:ALL


On the group line, you used admin instead of admins:



%admins ALL=(ALL) NOPASSWD:ALL

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...