Home > IT Architecture, Linux, Networking Security, Security, Systems > make sudo asking for no password on linux

make sudo asking for no password on linux

November 1st, 2013

Assuming that you have a user named 'test', and he belongs to 'admin' group. So you want user test can sudo to root, and don't want linux prompting for password. Here's the way you can do it:

cp /etc/sudoers{,.bak}
sed -i '/%admin/ s/^/# /' /etc/sudoers
echo '%admin ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers

Enjoy!

Good Luck!


Comments are closed.