HomeUNIXLinuxUbuntu: Stop sudo Commands from Prompting for a Password

Ubuntu: Stop sudo Commands from Prompting for a Password

If you do a lot of changes to your system’s settings, you will rapidly become tired of having to constantly input your password each and every time you run a sudo command. By following this recipe, you will be able to perform the commands password free.


1. Open a terminal window.

2. Execute the following in a terminal window:sudo visudo

3. Input the administrative password.

4. To allow all members of group sudo to not need a password, arrow down to the following line and uncomment it (remove the #):%sudo ALL=NOPASSWD: ALL

To allow only a certain user to not need a password, arrow down to a blank line and enter the following(change to the name of the user): ALL=NOPASSWD:ALL

5. Press F3. You will see a prompt at the bottome of the screen that reads File Name to Write: /etc/sudoers.tmp. Hit backspace 4 times to remove the .tmp extension and press Enter.

6. You will then be asked if you wish to overwrite the existing file, press Y.

7. Close the terminal window.

Rob Rogers
Rob Rogers
Once a prolific author here on Tech-Recipes, Rob has moved on to greener pastures.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!