How to Remove Password in Ubuntu

In this tutorial, we will show you how to remove password in Ubuntu. There are several groups in ubuntu. Some activities come under the root while the others under sudo. In this how to remove password in Ubuntu tutorial, we will teach you how to remove password for any sudo activity.

After you have made the changes that we have specified in this tutorial, you will notice that you won’t be prompted to enter the password anymore when running any sudo activity.
Step 1 – Open terminal
First of all, open up the terminal application and type in the following command:
“sudo visudo”
Open terminal application

Step 2 – Enter password
With that done, you will be prompted for the password. Enter the password where specified.
Insert password

Step 3 – Open sudoers.tmp in editor
Once you type in the password and hit the enter key, the sudoers.tmp file opens up in an editor. Over there, search the members of the admin group and members of group sudo section in the document.
Sudoers.tmp in Editor

Step 4 – Enter NOPASSWD command
Over here, you can simply edit the lines and enter “NOPASSWD” in both of them. These should be entered exactly as stated, in Caps lock, otherwise the command won’t work. This command will remove password from ubuntu.
Remove password command

Step 5 – Exit and save changes
Now Exit the editor by pressing “Ctrl+X”, and when prompted, hit Y to save the changes made. Save changes in order to remove password from ubuntu.
Save changes

Step 6 – No password required for any sudo activity
With that done, you will be asked to type in the name for the file that was just saved. No need to change the file name here, simply hit enter to exit from the window.
Now execute any sudo activity and you will notice that the sudo gets executed without prompting you for any password.
Password successfully removed