Apple's macOS is a secure operating system, and at the heart of its 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.
You will need the password to your Mac whenever you want to install new software, make serious changes to macOS and sometimes when deleting important files.
The Mac password is also usually required to login to your Mac, although you can choose bypass this and log in automatically (or even log in to your Mac just by wearing your Apple Watch). 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 Mac password.
It might not be the password to your Mac you are missing. If your Mac is asking you for your iCloud login, or Apple ID, then read about what to do if you forget your Apple ID password here.
Get a password hint for your Mac password
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 MacOS 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:
- Open System Preferences (Apple > System Preferences)
- Choose Users & Groups.
- Click the Lock icon in the bottom-left.
- 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. 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.
If the password hint doesn't show up that will be because it wasn't set to show password hints in the Login Options. Unfortunately, the only way to change this setting is to log onto your Mac. Luckily there are other ways to find your password, so read on.
(If you want to make sure that a password hint appears next time you forget your password be sure to go to System Preferences > Users & Groups > Login Options, then log in and tick the box that says show password hints.)
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 Mac password from another account:
For this to work you will need to be logged on to the Mac through one account (this could be your account if you normally log on automatically).
- Click on the Apple logo in the top left and choose Log Out.
- Select the account you do know the password to.
- Enter the password for that account.
- Open System Preferences > Users & Groups.
- Click the Lock icon in the bottom left of the window.
- Enter the password again.
- Select the account you have forgotten the password for in the sidebar.
- Click Reset Password.
- Enter the new Password, Verify fields and Password hint field.
- 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.
The problem here is that if the other user doesn't have administrative rights on the Mac then they will not be able to change the password for you. Only an admin account can do that.
The next option, if that didn't work, is to use Recovery Mode...
Use Recovery Mode to recover your Mac password
Apple includes a tool with macOS or Mac OS X (depending on which version you are using) to replace a Mac's password. This is the best option if you have completely forgotten your password. Follow these steps:
- Turn off your Mac (choose Apple > Shut Down).
- 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.
- Select Disk Utility and press Continue.
- Choose Utilities > Terminal.
- Enter resetpassword (all one word, lowercase letters) and press Return
- Select the volume containing the account (normally this will be your Main hard drive).
- Choose the account to change with Select the User Account.
- Enter a new password and re-enter it into the password fields.
- Enter a new password hint related to the password.
- Click Save.
- A warning will appear that the password has changed, but not the Keychain Password. Click OK.
- Click Apple > Shut Down.
Now start up the Mac. You can login using the new password.
How do I protect my Mac from someone else resetting the password and accessing my data?
Of course the fact that that final way of resetting a password is possible also means that an unauthorized person would be able to access the data on your Mac if they got their hands on it. Unfortunately, once a person has got access to your Mac, you've usually lost control over it. There are some steps you can take to protect your data though.
The best way to protect your data is to 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 MacOS password
As a final option you could use the Single User mode in root to reset your password. We recommend that you just use the Recovery Mode method above though because when we tested the Single User mode recovery method it didn't work for us. Only use Single User mode if you are comfortable playing around in the Terminal aspect of MacOS, we won't go into it here because we don't recommend using it.
Use Target Disk Mode to recover data from a Mac
Finally, 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:
- Shut down the Mac (press Apple > Shut Down).
- Connect the Mac to another Mac using a FireWire or Thunderbolt cable (unfortunately this trick does not work with USB).
- 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.