Apple Mac OS X is a secure operating system, and at the heart of OS X's security is your Mac password. But what do you do if you've lost, or forgotten, your Mac password? If your Mac password doesn't work, or you've plain lost it, then don't worry. In this article we're going to look at how to recover a lost Mac password.

OS X requests your password when you want to install new software, make serious changes to OS X and sometimes when deleting important files. The Mac password is also used to login to your Mac, although you can bypass this and log in automatically. So you might not be asked for your password for some time, and when you are asked it comes as a shock.

Don't worry, there are lots of things you can do if you have forgotten your OS X password.

See also:

Get a password hint from OS X

Before you go and reset, or replace your password you should see if the password hint refreshes your memory. There's no limit to the amount of times you can enter a test password, and after three attempts OS X will offer a hint (the hint is a phrase you entered into the hint box when you set up the password). Maybe the hint will refresh your memory:

  1. Open System Preferences (Apple > System Preferences)
  2. Choose Users & Groups.
  3. Click the Lock icon in the bottom-left.
  4. Press the Return key three times.

The screen will shake each time you press return and after the third shake the Hint appears below the Password field. Does this help? Feel free to attempt the password as many times as it takes, there's no limit to how many times you can try out your password.

Get the password from Apple using iCloud Password

Reset password using iCloud Password

Since OS X Mavericks Apple has started to integrate its Apple ID passwords with the admin password for OS X. This is a good thing because you only have to remember the one password, and it's the same one you use to get apps from the App Store.

Another awesome part of Apple ID being linked to your OS X account is that you can use the Apple ID password recovery service to get your admin password and unlock your Mac.

Open System Preferences and click on Users & Groups and check below your name. If you see an email address (such as [email protected]) then you can get your password back from Apple. Follow these steps:

  1. Open System Preferences > Users & Groups.
  2. Click Change Password.
  3. Click Change iCloud Password.
  4. Fill out the two questions in the Verify Your Identity Field.
  5. Click Verify

You can also recover your password by going to appleid.apple.com and clicking Reset your Password.

Change the password from another account

Do you share the Mac with another person, and do they have their own account? Or do you have a different account that you do know the password to?

If they (or you) know the password to another account for the Mac you can use this account to reset your password. Follow these steps to reset your OS X password from another account:

  1. Click Apple Log Out.
  2. Select the account you do know the password to.
  3. Enter the password for that account.
  4. Open System Preferences > Users & Groups.
  5. Click the Lock icon in the bottom left of the window.
  6. Enter the password again.
  7. Select the account you have forgotten the password for in the sidebar.
  8. Click Reset Password.
  9. Enter the new Password, Verify fields and Password hint field.
  10. Click Change Password.

You have now changed the password for that account. You can now log in to that account using the password. This doesn't change the password for the Keychain and you will be asked when you log in to the account if you want to update the keychain password. To do this you'll need the old password (which you have forgotten) so you'll have to click Create New keychain.

Use Recovery Mode to recover your Mac password

Use Recovery Mode to reset your password

Apple includes a tool with Mac OS X to replace a Mac's password. This is the best option if you have completely forgotten your password. Follow these steps:

  1. Turn off your Mac (choose Apple > Shut Down).
  2. Press the power button while holding down Command-R. The Mac will boot into Recovery mode. When you see the load bar appear you can let go of the keys. It may take a few minutes to load.
  3. Select Disk Utility and press Continue.
  4. Choose Utilities > Terminal.
  5. Enter resetpassword (all one word, lowercase letters) and press Return
  6. Select the volume containing the account (normally this will be your Main hard drive).
  7. Choose the account to change with Select the User Account.
  8. Enter a new password and re-enter it into the password fields.
  9. Enter a new password hint related to the password.
  10. Click Save.
  11. A warning will appear that the password has changed, but not the Keychain Password. Click OK.
  12. Click Apple > Shut Down.

Now start up the Mac. You can login using the new password.

How do I protect my Mac from somebody resetting the password

A common question we get in articles like this is that the advice we are offering is unethical, because it enables an unauthorized person to access your Mac. The common response is that once a person has got physical access to your Mac, you've usually lost control over it. And Apple should provide some means for common garden users to recover the content on their Macs.

However, if you wish to protect yourself against this you should turn on FileVault encryption. This encrypts the contents of your Mac, and the Password Reset utility will not show until you unlock it with Disk Utility. When you set up FileVault you recieve a Recovery Key (which you should print out) and a password. If you lose both of these your data will be lost forever.

You can turn FileVault on in System Preferences > Security & Privacy > FileVault.

Use Single User mode to reset your Mac OS X password

As a final option you can use the Single User mode in root to reset your password. This is a trick used by geeks looking to get to know their Mac, but we suggest most people just use the Recovery Mode method above. We tested the Single User mode recovery method out and it didn't work for us in Yosemite, so we're not going to show it here. If anybody has more information feel free to leave a link, or some advice in the comments. Again: only use Single User mode if you are comfortable playing around in the Terminal aspect of OS X.

Use Target Disk Mode to recover data from a Mac

If you can't use any of the methods above, then your best trick is to use Target Disk Mode to recover what data you can from the lost Mac. This enables you to access the hard drive on your Mac from another Mac. Follow these steps:

  1. Shut down the Mac (press Apple > Shut Down).
  2. Connect the Mac to another Mac using a FireWire or Thunderbolt cable (unfortunately this trick does not work with USB).
  3. Start up your Mac and hold down the T key while it boots.

The Mac in Target Disk Mode should now appear as a hard drive in the other Mac. You can use this Mac to recover data from the Mac.

How to recover a forgotten iCloud password