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

5

4

I know how to enable root account on Mac OS X Leopard, but not Snow Leopard or newer OS X versions. How can I do it?

Hai Vu

Posted 2009-09-21T15:32:16.337

Reputation: 4 824

4Why do you want to enable it? There's nothing I do that I can't just as conveniently do with sudo. – David Thornley – 2009-09-21T17:00:27.203

1

Sometimes even Apple tells you to enable the root user for some administrative tasks that are just easier using root: http://support.apple.com/kb/HT1428

– Arjan – 2009-10-23T08:36:36.197

Answers

10

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.

hanleyp

Posted 2009-09-21T15:32:16.337

Reputation: 6 519

12

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.

Tadeusz A. Kadłubowski

Posted 2009-09-21T15:32:16.337

Reputation: 2 005

2'sudo -i' does the same thing afaik. – Rich Bradshaw – 2009-09-23T18:11:50.217

1I do it this way on the linux boxes I use too. There is no reason to have a root account anymore. – sal – 2009-10-23T13:45:41.073

4

toolie

Posted 2009-09-21T15:32:16.337

Reputation:

1

Reference this link, do as follows:

How to Enable the Root User Account in Mac OS X

Terminal user can make it like this:

dsenableroot    #enable
dsenableroot -d #disable

lutaoact

Posted 2009-09-21T15:32:16.337

Reputation: 156

Wow! I wish I know this years ago. – Hai Vu – 2015-05-15T13:16:04.143

0

Type sudo passwd then su - will work with the new password.

dacracot

Posted 2009-09-21T15:32:16.337

Reputation: 323