November 20, 2006
Changing Root Password on Mac OS X
Yesterday, I was wondering if there was a way to change the root password on the Mac in my office so that I could have full control of my computer. When you have a question like this, your first reaction would be to “Google It”, so I did. I found many helpful resources that guided me through this process.
(This is under the assumption that you have workable knowledge in Unix and a MAC)
1. First you need to verify that “root” is locked by running a simple command in the terminal. Make sure that the “.” is at the end of the line and that there is a space in between.
nidump passwd .
The output will look like this: root:*:0:0:System Administrator:/var/root:/bin/tcsh
2. Open NetInfo Manager which is located in:
Macintosh HD -> Applications -> Utilities -> NetInfo Manager
3. Click on “users” in the second column and then click on “root” in the third column to show the data for root.
4. Click the lock on the bottom left hand of your screen to unlock the settings. You will need to authenticate with an administrative password
5. Delete what is in the password field and make sure the value does not have any extra spaces. Click on Domain and Save Changes
Right now, your root account is active with no password which can be very dangerous.
6. Go back to the Terminal and type the following
su root (or just su)
When it asks for a password, just hit enter (you deleted the password in the last step)
Type in: passwd root
Enter in a new password and then confirm your new password
7. Log out of root and then su back in to make sure that it works
