November 20, 2006

Changing Root Password on Mac OS X

Posted at: 6:45 pm by Timothy Haroutunian
Categories: Professional, Tech and Web

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

unix, password, root, su, administrator, root account, change password, mac osx, osx

Text Link Ads

Post A Comment

    3 Responses to “Changing Root Password on Mac OS X”

    1. AvatarAlcibiades
      1

      You can show the root account as a login option by going into NetInfo Manager, choosing ‘Security,’ and then choosing ‘Enable root account.’ Then it will become available as a clickable option on the initial logon screen. Also, it’s worth pointing out that this method allows you to initially set the root password by authenticating as any admin on the system, which means you should probably do this before your 7-year-old gets on the computer and locks you out. Of course, once you enable the account, you can change its password just by booting off the OS X CD and choosing the ‘Reset Password’ option.

    2. AvatarZach
      2

      Why would you do this? sudo is installed on all OSX machines. If your account has admin privileges you can merely prepend any command with sudo to execute it with root privileges. This prevents you (or others sitting at your machine) from doing something stupid. If you need a root console badly, you can ’sudo bash’ and have at. In general enabling the root account on your Mac is a terrible plan.

    3. pingback pingback:
      3
      set root password mac osx 10

      [...] allows you to initially set the root password by authenticating as any admin on the system, …http://armenianeagle.com/2006/11/20/changing-root-password-on-mac-os-x/Switching… ” ReSetting the root password on Mac OSXReSetting the root password on mac OSX. Posted [...]

Leave a Comment