Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. 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
    
sudoers file should have mode 0440 –  Art Shayderov Jul 26 '12 at 17:15
add comment

migrated from stackoverflow.com Jul 26 '12 at 15:08

This question came from our site for professional and enthusiast programmers.

1 Answer

The correct syntax is:

gandalf ALL=(ALL) NOPASSWD: ALL

I'm not sure if yours will work. If the above doesn't work, please provide entire content of file.

This should be placed after any group settings that would affect the user. If gandalf was in the group sudo, /etc/sudoers should read:

%sudo ALL=(ALL) ALL
gandalf ALL=(ALL) NOPASSWD: ALL
share|improve this answer
    
I tried this after answering the same thing and was prompted for a password afterward. –  Rob Jul 26 '12 at 16:18
    
I have it as username ALL = NOPASSWD: ALL. Looks like (ALL) is not needed. I think it means as any user, (ALL:ALL) means any user, any group and should work as well. –  Art Shayderov Jul 26 '12 at 17:11
    
@Rob, so what is the entire content of your sudoers file please? There must be an error it somewhere else or something else is wrong, as that syntax is definitely correct. –  grifferz Jul 26 '12 at 19:09
    
@grifferz sprunge.us/jaGS –  Rob Jul 26 '12 at 19:16
    
Oh, %wheel is overriding it, I bet. –  Rob Jul 26 '12 at 19:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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