Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 am trying to use su and sudo on my iMac that I did a fresh clean install of Mac OS X 10.9 and Server 3.0. I explicitly set the password for root with

passwd root

but when I try to use su or sudo from a local network account, it does not accept the password. When I was reading through some of the man pages for su, sudo and passwd, one of them (but I do not remember which) mentioned something about different behavior in an Open Directory environment. I tried digging around but could not find any more info.

Can anyone help me here?

share|improve this question

Mac uses Open Directory Services to manage passwords,

The commands you want are

launchctl load /System/Library/LaunchDaemons/
launchctl load /System/Library/LaunchDaemons/
dscl . passwd /Users/username

Not as easy as linux, but that is because Apple assumes passwords will usually be set through the gui.

share|improve this answer

Is the account you trying to use su and sudo from an administrator? If not, neither will work. Also, sudo asks for the password of the account you are switching from, not the password of the account you are switching to. The normal way to get root access on a Mac is to use sudo from an admin account; since this does not require a root password, there's no reason to set one.

share|improve this answer

You must log in to answer this question.

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