Mac OS X Recover Lost Root Password

Posted September 25, 2004 by macster in Apple Mac

For the sake of security, having unique, complex passwords is recommended. Most people have a hard time remembering these and will eventually forget one. Forgetting the root password on a Mac system can seem devastating, but this tech-recipe will show an easy way to recover.

If you have the password to an account that is an administrator on the system, then it is easy to recover the password using the sudo command. Open a terminal window and type the following:

sudo passwd root

You will be prompted for your password (the user account that you do remember). Then you will be prompted for the new root password twice. That is it!

The sudo command is a helpful way to control who can do what on a system. In this case, since the user account is considered an administrator, the sudo command allows you (after confirming that you are who you say you are with the user password) to run a command as if you were root. The command we are running is passwd root which is the command to change the password for the root user.

If you do not have an administrator password, either, you can still reset the root password. Boot the system from the Mac OS X installation CD and select the Reset password option from the installer screen and follow the directions.

The Conversation

Follow the reactions below and share your own thoughts.