SPY HILL Research
Spy-Hill.com

Poughkeepsie, New York [DIR] [UP]

How to Enable the "root" Account on Mac OS X


The superuser (i.e. "root") account, which controls everything in Unix, is turned off by default in most Mac OS X installations. These instructions tell you how to enable the Unix "root" account on Mac OS X.
Last updated: 8 August 2012

The default Mac OS X installation has the Unix "root" account disabled. This is generally a good thing, because the casual user does not need all the powers granted to this "superuser" account. But it can be useful to be able to become "root" to fix something. You can follow the instructions below to enable the "root" account, which will make it easier for the "root" user to get a command shell prompt.
Topics
On Becoming root
Quick Menu Method
Quick CLI method
Detailed Method
References

You can also use these instructions to remove a root password that you have forgotten, or to reset any user password.

Making changes like this to the system requires administrative privileges. You will need to know the password for the "Admin" account on your machine. If you do not have that then the only way to get administrative access to the machine is to reboot from an Installation CD and find the menu item for "Password Reset".

Whenever you use the "root" or "Admin" accounts it is a good idea to follow the Principle of Least Privilege. You should only take on the extra privileges to do a particular job, and then release those privileges when you are done. (Your normal, every day user account should not have administrative privileges!)

If you just want to perform occasional system administration tasks then you don't really need to enable the "root" account. You can log in as the "Admin" user, open the Terminal application, and give any single command prefixed by the sudo command. Examples of this are shown below.

Since this page first started I have become aware of three different ways to enable the root account on a Mac. The original way I published is the "detailed" method using NetInfo Manager. It is the same way you would reset any user's password on a NeXT computer (and now Mac OS X as well). There is also a much quicker way to enable the root account using a menu item in NetInfo Manager. (However, NetInfo is not included in MacOS&Nbsp;X 10.6 (Snow Leopard) and beyond.) Or you can open a command shell in the Terminal application and use the sudo command. Pick the one that works best for you:

[Quick Menu Method] | [Quick Command Line Method] | [Detailed Method]

After you have enabled the root account, there are three different ways that you can become "root" to perform system administration tasks.


 


Last modified: Wednesday August 08, 2012 Copyright © 2012 by Spy Hill Research http://www.Spy-Hill.com /myers/help/apple/EnableRoot0.html