Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to setup sudo without no password but still I get prompted for password, I'm using ubuntu, here is the relevant line from the sudoers configuration file :

gandalf ALL=(ALL:ALL) NOPASSWD: ALL
share|improve this question
2  
cough Allowing a user to sudo without a password cough. UNSECURE! You should not do this. – The Lord of Time Jul 26 '12 at 16:01
1  
You can do this, but it breaks the security model. Are you absolutely sure you want to do this? – Paddy Landau Jul 26 '12 at 16:26
1  
I can understand wanting to do this on a computer, say at home in a secure situation. Security forces a "good" password, which usually means long and harder to type. Trouble is, we have to type it in VERY regularly and it gets to be tiresome. I am not advocating against security, but, especially in the home situation, it may well be desirable to do this. – Jazz Jul 26 '12 at 22:44
1  
This is a very bad idea. What I did was set a differn't password for root privlidges/root, which was easier to enter, but it wasn't very easy to setup. (I don't do this anymore) – user72421 Jul 27 '12 at 5:58
3  
To say this "breaks the security model" is rather extreme. sudo is designed to facilitate passwordless operation easily and even has ready-to-go commented configuration lines in /etc/sudoers to allow a whole group of users to run any command as root without being prompted for a password. There are some adverse security implications of doing this--any program can perform actions as root without you being notified!--but an actual attacker, with the ability to run programs as (non-root) you, can already capture your password as you enter it for sudo (and then run sudo with it). – Eliah Kagan Jul 27 '12 at 17:43

2 Answers

I believe the correct is:

gandalf ALL=(ALL) NOPASSWD: ALL

Put it in the end of the file

share|improve this answer

I use the sudo group and have:

%sudo ALL=NOPASSWD: ALL
share|improve this answer

protected by Community yesterday

This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.

Not the answer you're looking for? Browse other questions tagged or ask your own question.