Topics Map > IT
Resetting a lost/forgotten admin password on Apple computers
This document summarizes how to reset a lost or forgotten administrator password on Apple devices.
Resetting a lost/forgotten admin password on Apple Computers
Method One: Tricking OS X Into Running the First Boot
Access Single-User mode-
1. Shutdown your computer. (Turn it right off - do not restart.)
2. Use your left hand to hold down the 'Apple' or 'Command' key on the keyboard (directly beside the space bar) and the letter 'S' . Hold both of these together and do not let go through the next step.
3. Turn the computer on, ensuring that your are still holding the 'Command' and 'S' keys.
4. Wait until you see a bunch of white writing scrolling by on a black screen. You can release the keys, and you are now in Single-User mode. The computer is ready to continue when you see localhost:/ root# or something similar as the very last line on the screen.
- Access the drive so that we can make changes. Before you can reset your password you need to mount the drive; this will allow you to make changes to files. At the prompt type mount -uw / and press [Return].
- Reset the password.
5. Type cd /Users [Return].
6. Type ls [Return]. A list of all of the accounts on your computer will be listed along with 'Public'
7. Type passwd <username> [Return], replacing <username> with the account you want to reset spelling it exactly as listed following the ls command.
8. You will be prompted for a new password, start typing the new password when finished press [Return]. (The cursor will not move, however the password is typing). Confirm the password when prompted.
9. Restart the computer and try the new password. At the prompt type reboot [Return]. The computer will restart and you will now be able to use your new password
Method Two: Tricking OS X Into Running the First Boot
The other, and possibly easier way to get around a forgotten password requires booting into Single User Mode and removing a file that tells OS X that the first boot setup has run.
1. To boot into Single User Mode, you’ll need to reboot the computer while pressing and holding the Command and S keys after you hear the startup gong.
2. Once you have booted into Single User Mode you will need to mount the volume you need to get into. Most of the time this will just be your boot disk and can be mounted as “/”. This command will mount that for you:
- sudo mount -uw /
3. Next we need to remove the file that tells OS X that its already done the setup:
- rm -rf /var/db/.AppleSetupDone
4. Now we need to reboot using the very logical reboot command.
5. Once we boot back up it will be just like the first time you boot after install and you will see the Welcome screen, and just click through the first two screens.
6. When you reach the screen that asks if you already own a Mac, make sure to choose “Do not transfer my information now” since we’re not doing any migrating of data.
7. Once you reach the “Enter Your Apple ID” screen, you can press the Command and Q keys at the same time to get past the rest of the prompts. Click Skip when asked.
8. Now you will create a new Administrator account. You can choose to name it something you wish to keep or anything since you just need this account to get into the OS and to System Preferences.
9. Click through the next screens until you reach the Thank You screen, and we’re finally done with that part of the process. Click Go and you’ll be brought into the new account.
10. Once the new account has loaded you can now go to your System Preferences. We will want the Accounts pane.
11. Now select the account with the password you want to reset and click Reset Password…
12. Choose your new password, and password hint if you desire, and click Reset Password.
13. You can now logout and login to the account with the new password.