Sudo Without a Password
I wanted to be able to use my personal laptop without having to enter my password to install software all the time. I know this is a security risk and should never be done on a server or in production, but for me its alright.
In order to enable this, we’ll need to edit the /etc/sudoers which can easily (and should only) be done with the visudo command.
sudo visudo
For a single user, add the following under User privilege specification
username ALL=(ALL:ALL) NOPASSWD:ALL
If you prefer for all users to not have to enter their password, add the following under Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
The file should look similar to the image below. Once done editing, save the changes by pressing Ctrl+X, Y for Yes, and Enter to select the file name to write (by default is the file we have opened).
That’s it. Now you won’t have to reenter your password to perform admin tasks.