How do I enable the root account in Mac OS X?

Solution 1:

The steps are covered in the article Enable root account in Snow Leopard and this Apple support page. Directory Utility is accessible through System Preferences on all versions of OS X since 10.6.

  1. Go to System Preferences » Users & Groups, then click the padlock. Enter your password.
  2. Click Login Options, then Join… in the right pane
  3. In the new window, click Open Directory Utility…
  4. From the Edit menu, select Enable Root User.
  5. Select Change Root Password from the Edit menu and type in the new root password.
  6. Click the padlock icon to lock the application again.

Solution 2:

If you need a full root shell and find sudoing cumbersome, you can do:

sudo su -

That will give you a normal UID 0 shell to play with.

Solution 3:

Run in Terminal.app:

dsenableroot 

source: http://commandlinemac.blogspot.com/2008/12/another-way-to-enable-and-disable-root.html