Sudo without password on Ubuntu

sudo visudo

Add this line at the end (change “jerome” to your username):

jerome ALL=(ALL) NOPASSWD: ALL

Ctrl-X to leave, save your changes, and you're done!

 

Feedback

I have tried the above in an Ubuntu OS. It does not work and even with many other variations made to the sudoers file, I am always asked for a password when I execute sudo command.
Sir Percy
December 30, 2008
#1
Which version of Ubuntu are you using? It flawlessly works from at least 7.04.
Jérôme Jaglale
December 30, 2008
#2
8.0x Server Version I will try your fix again on Friday. thanks
Sir Percy
December 30, 2008
#3
I overlooked the fact that it must be at the end of the file. In my version, the last line of code gives all users in the admin group root access but with a password required. If your line precedes this, then the effects are undone by the last line of code because my user login is also a member (unintentional) of admin.
Sir Percy
December 31, 2008
#4
Hi, i tried previous command and it works. I have Ubuntu Jaunty 9.04 alpha 6
Mcfee - Pablo Andres Diaz A.
March 24, 2009
#5
hai its working fine in Kubuntu 8.04 sudo visudo jaleel ALL=NOPASSWD: ALL save and reboot thanks a lot saitjaleel@yahoo.com
S.jaleel
July 9, 2009
#6
'ya dont need to reboot..
Netmonger
July 29, 2009
#7
%sudo ALL=NOPASSWD: ALL will also help... For me helped.
ppp0
November 10, 2009
#8
Not working 4 me man.I did exactly what you wrote.Here as you can see.Nothing happened. # User privilege specification root ALL=(ALL) ALL caglar ALL=(ALL)NOPASSWD: ALL # Uncomment to allow members of group sudo to not need a password # (Note that later entries override this, so you might need to move # it further down) # %sudo ALL=NOPASSWD: ALL # Members of the admin group may gain root privileges ?min ALL=(ALL) ALL
caglar
December 31, 2009
#9
works on Karamic 9.10. Thanks....
bijugv
January 14, 2010
#10
caglar - you didn't place the "caglar ALL=(ALL) NOPASSWD: ALL" at the END OF THE FILE. It works for me under Karmic 9.10. (What I actually did was place the %sudo line at the end of the file, and did a "sudo adduser sudo")
cafehunk
January 21, 2010
#11
This is awesome, I tried it in Linux Mint 9 (Pretty much Ubuntu 10.04 with closed source packages, and a custom menu), and it works flawlessly. I hope it also works with package installs and programs like gparted.
Izzy
May 22, 2010
#12
but, but, why? you are destroying the nice security that it brings :S
Dr Dolme
June 22, 2010
#13