The macOS operating system is secure and requires the use of a password to perform many operations such as installing software or changing System Preferences. If you can no longer get your hands on this access code, then follow the tutorial below, you will be able to re-access your Apple machine.
Table of Contents
Recover your Mac password
1. Use password hint
First of all, try to refresh your memory with the password hint (that is, the question or phrase you recorded along with your code).
The password hint is automatically displayed when you enter the wrong code three times in a row:
- Open System Preferences (Apple → System Preferences).
- Select Users and Groups.
- Click on the Padlock icon at the bottom left.
- Press Enter three times to display the password hint.
If nothing happens then it means that you have not created a password hint. Fortunately, there are other ways to get your precious code back.
2. Change a password from another user account
If you share the use of your Mac with another person, then you can go through their user account to reset your password.
- Go to the other user account.
- Open System Preferences → Users & Groups.
- Click on the Padlock , at the bottom left of the window.
- Enter the password of the session you are in.
- In the left column, select the account for which you forgot the password.
- Click on Reset password.
- Fill in the New password, Confirmation and Password hint fields.
- Click on Change password.
You now have a new password for your user account. Note that this does not change the password for your login keychain, so you will need to create a new one.
3. Change a password with recovery mode
If you only have one session on your Mac or yours is the only one with computer administration rights, then you will need to go through Recovery mode. Here’s how to do it:
- Shut down your computer.
- Boot into Recovery mode by pressing and holding Command + R and Start (please be patient this can be a bit slow).
- As soon as the load bar appears, release the buttons.
- Select Disk Utility , then press Continue.
- Click Utilities , then Terminal.
- Type resetpassword (lowercase, no spaces), press Enter.
- Click on the drive containing your account (normally this is the primary drive).
- Choose the account to modify with Select the User Account.
- Enter your new password twice.
- Type a new password hint and click Save.
- An alert will appear stating that the password has been changed, but not the keychain password. Click on OK.
- Shut down your computer. When it is restarted, you will be able to use your new password.
4. Use target disk mode
If you are unable to use the above methods, then go through Target Disk Mode. Thus, you recover the data on your computer; for this you will need to borrow a relative’s Mac.
- Shut down your macOS, connect it using a Thunderbolt (or Firewire) to the second Mac.
- Turn on your computer while holding down the T key.
Your Mac is now in Target Disk Mode, which means it acts like an external hard drive. Normally, you should see it appear in Finder on the second Mac.
You can import the files you want to the second Mac or even clone your entire drive and then save it to an external hard drive.
Prevent someone from resetting your password
Now that you know how to reset password with recovery mode, surely you are worried about your personal data.
To protect your sensitive files if your computer is lost or stolen, we recommend that you use FileVault Encryption. When you use FileVault Encryption you receive a Recovery Key and a password.
Tip: Print these documents and store them neatly because if you lose them you will never be able to access your data again.
To enable FileVault, go to your System Preferences → Security & Privacy → FileVault.