Ubuntu: Stop sudo Commands from Prompting for a Password

Contributor Icon Contributed by Rob Rogers  
Tag Icon Tagged: Linux  

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.

 

2 Comments -


  1. Tristan Lear said on October 18, 2009

    does this work for gksu / gksudo / kdesu / kdesudo as well?

    i tried this but nothing changed

  2. I don't think so... said on June 9, 2010

    Yeah….tried this and all my settings are already (ALL) ALL. Next……..

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -