If you use Ubuntu Linux it is quite likely that at some point or another you may have been frustrated at its asking for your password when trying to perform an administrative tasks, such as installing programs or changing system settings. Ubuntu uses the sudo tool to manage administrative rights rather than letting users easily log in as the root user. This is actually a good security measure. However, if you need to perform administrative tasks frequently it can get rather annoying. Here’s how you can set Ubuntu to not prompt for your password when using sudo.
Note: this is something that is not recommended if you are using your computer in a public place or at your work, as this will compromise the security of your data. You’re better off setting this at your home desktop where you are likely to trust more people.
Launch a terminal window and enter the following command:
# sudo visudo
Visudo is a tool used to edit the configuration file of sudo . The command will prompt your for your password. Enter it one last time. The configuration file will open in a text editor, most likely Nano. Scroll down to the end of the document and add the following line:
username ALL=NOPASSWD: ALL
Replace username with the username of the user you want to allow a passwordless sudo. So if the user is calvin, you would enter:
calvin ALL=NOPASSWD: ALL
Save and exit the file. Log out, log in as the user calvin and test out your new passwordless sudo.