Ask Different is a question and answer site for power users of Apple hardware and software. 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

The following sudoers configuration used to work well in MacOS 10.8.5, several days ago I upgraded to Mavericks, NOPASSWD flag does not seem to work anymore:

# User privilege specification
root    ALL=(ALL) ALL
%admin  ALL=(ALL) ALL

Mavericks' sudo still asks for entering password.

Is there any resolution/workaround?

share|improve this question
up vote 10 down vote accepted

The group entry %admin ALL=(ALL) ALL seems to override the user specific entry. I found moving the user specific entry so that is appears after the group entry fixes this. Maybe sudo parses the entire file and it uses the last matching entry?

Changing your sudoers file to something similar to below should work.

# User privilege specification
root    ALL=(ALL) ALL
%admin  ALL=(ALL) ALL
share|improve this answer
I assume you wanted to write before instead of after? – patrix Dec 18 '13 at 16:30
No, that's how OP has it now. I found that the user entry (with NOPASSWD) really needs be on a line after the group entry (which doesn't have NOPASSWD) or sudo will prompt for the password. – Dan Dec 18 '13 at 16:33
Ah right, misread your post. Maybe you can update your answer to show a complete good sample – patrix Dec 18 '13 at 16:37
You're right. I've cleaned up the original answer and added an an example. – Dan Dec 18 '13 at 16:45
It helps, thanks a lot, but I am still wondering why such issue does not appear on my Linux instance, perhaps MacOS is using a different sudo version. – Howard Dec 19 '13 at 5:49

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.