4

I'm used to "classic" unixoid user right system with a machine running a normal user, as main account, and a super user (or root account), just for maintenance or configuration purposes.

Then I was really wondered about Mac OS X (I'm currently running Leopard). What purpose has the admin user account? If I'm installing something via console (as a normal user, not admin) I have apparently to log in as admin and then log in as root user (via sudo -s because su strangely doesn't work).

Does anyone know what the main reason for this is or how to fix it?

3

This is by design. A non-admin user is defined by not being able to use sudo (and the graphical equivalent in the mac windowmanager). You can still enter the admin user and password using sudo -u or the graphical equivalent but short of compromising/modifying the built in controls, that's how the system is designed to work.

The su command doesn't work as you expect since the root user in Mac OS X is disabled by default for security reasons. Sudo has enhanced logging and sudo -s gets you the same shell as su - would when a root user is enabled.

So if you don't want to change to using sudo you can enable root on your mac.

  • This is just this kind of manual I searched for! – beyeran May 11 '11 at 5:55
  • Thanks to @KeithB for pointing out errors that are now corrected in this answer. – bmike May 11 '11 at 13:35
  • I'd like to add that in Mac OS X, there is a difference between admin and sudo. My machine is set up so that I can use sudo just fine, but I'm not an admin according to the GUI. – SilverWolf Dec 12 '18 at 16:08

You must log in to answer this question.

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