Sudo – How to Sudo Another User Without Password

sudo

Parts of the configuration in my /etc/sudousers

#includedir /etc/sudoers.d
web ALL=NOPASSWD: ALL
somebody ALL=NOPASSWD: ALL

I have two non-super users granted with sudo-without passsword. Each of them can become the root without password, but I try this:

web@web01:~$ sudo -u somebody sudo echo "success"
[sudo] password for web: 

let user web to become somebody and execute another sudo command, the system ask me for password.
How do I configure sudouser to disalbe the password-asked ?

Best Answer

Append the following entry to the end of your sudoers file.

somebody ALL=(ALL) NOPASSWD:ALL