Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got the following line in my /etc/sudoers after editing it via visudo and I am unable to sudo without a password. Does anyone have any ideas on why this is not working properly?


share|improve this question
This works for me, although you could shorten it to myusername ALL = NOPASSWD: ALL. Did you log out and back in after you made the change? – Sep 14 '13 at 11:02
This still doesn't work even after I have re-logged in. – Peter Sep 14 '13 at 13:00

Ok, I fixed it. The line needs to be added to the END of the file and not just anywhere for it to work.

share|improve this answer

I tried the above method with no success. Luckily, after hours of dedication I will spare anyone else from having this trouble again :)

%username% is the global variable for your username(replace it)

Open up a terminal windows and type

sudo usermod -a -G root %username%

Then type

sudo nano /etc/pam.d/su

Goto line 19 and remove the # before

# auth sufficient trust

Save your file. Problem solved :)

The first command adds your username to the group:root.

The second command allows all members of root to be su.

share|improve this answer
This does not answer the question, and represents what is usually a very bad idea. – Engineer Dollery Jul 20 '15 at 22:45

Your Answer


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.