Disabling password for sudo in Ubuntu

February 9, 2018
ubuntu linux sudo reference

Disabling the password needed for sudo for a specific user is very easy in Ubuntu. This method applies to Ubuntu 16.04, but probably also other versions of Ubuntu and maybe even other distros.

First, run the following command:

sudo visudo

Note: If this is the first time you're running this command, you'll most likely be presented with a list of editors to choose from. Choose the one you're most comfortable with.

Then enter the following line at the end of the file:

user ALL=(ALL:ALL) NOPASSWD:ALL

Make sure to replace user with the username of the user you want to allow using sudo without entering a password.


You can verify that this post was written by me by pasting the signature into keybase.io/verify.