How To Set the Root Password Under Mac OS X
by Marius SchamschulaSince Mac OS X is derived from BSD Unix, a lot of care has been taken to make OS X a secure platform. To that end Apple has disabled login to the root user account. For casual users this is a good thing. However, for system administrators this is a bad thing. Many times all that is needed is:
$sudo bashOr your favorite command line shell. You won't need a root password for this. If you insist, there are two ways of setting the root password.
A Word of Caution
Make it a secure password. Thus:
- No names
- A mix of letters, numbers, spaces, and symbols.
- A minimum of eight characters
From the Command Line
Open the Terminal. Then issue the following command:
$sudo passwd rootpasswd is the Unix command for changing a password. You will first be asked for your own password:
Password:You will then be asked to type in the root user password:
New password:Retype new password:
Graphically
Open Netinfo Manager, found in /Applications/Utilities. The choose Security -> Authenticate... from the Domain Menu. You will be prompted to give your user password. You can then choose Security -> Enable Root User... from the Domain Menu. You can then type in the information into the dialog box as above.
A Word of Caution
Be careful when logged in as root. You can do an awful lot of damage. All controls are off. You have been warned.
For more information from Apple see this Technical Q&A Article.
Version 1.4.0 - 20070304