I've got an admin user phil with password orange, and the root user is enabled with password banana:

  • If I type sudo ls, and enter the password orange, I get Sorry, try again.
  • If I type sudo ls, and enter the password banana, it works.

If I disable the root user, sudo doesn't accept either password.

What the heck is going on?


If your user is an admin, they should (by default) be able to use sudo (based on the contents of the sudoers file).

If you re-enable the root user, and examine the contents of the file at /etc/sudoers, you should find this line (which specifies that the admin group has the ability to use sudo):

%admin  ALL=(ALL) ALL

It may be a good idea to confirm that "phil" is in the admin users group. You can perfom this check on the command line using this command (after you've re-enabled root, of course):

sudo dseditgroup -o checkmember -m phil admin

It's also possible that the rootpw flag may be set in the /etc/sudoers file (this should be off by default). If you find the following line in that file, see if deleting it will help:

Defaults rootpw
  • "yes phil is a member of admin", and that line is present in /etc/sudoers. – bonh Oct 24 '13 at 3:20
  • @bonh - I've added an additional suggestion to the answer above (rootpw) – Eddie Kelley Oct 24 '13 at 3:49
  • that did it! I found Defaults rootpw in /etc/sudoers and deleted it, and now I can sudo with my user password, as expected. Thanks! – bonh Oct 24 '13 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .