Summary
- > Use Password Hint
- > Change a password from another user account
- > Change a password with recovery mode
- > Use target disk mode
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, so you can regain access to your Apple machine.
1. Use Password Hint
First of all, try to refresh your memory with the password hint (i.e. the question or phrase you saved along with your code).
The password hint is displayed automatically when you enter the wrong code three times in a row:
- Open System Preferences (Apple → System Preferences).
- Select Users and groups.
- Click on the icon Padlocks, at the bottom left.
- Press three times Starter to display the password hint.
If nothing happens then it means you have not created a password hint. Fortunately, there are other ways to recover your precious code.
2. Change a password from another user account
If you share the use of your Mac with another person, then you can use their user account to reset your password.
1- Go to the other user account.
2- Open System Preferences → Users and groups.
3- Click on the Padlocks, at the bottom left of the window.
4- Enter the password of the session you are on.
5- In the left column, select the compte for which you have forgotten the password.
6- Click on Reset password.
7- Fill in the fields New Password, Confirmation et Password hint.
8- Click on change the 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 administrative rights to the computer, then you will need to go through Recovery mode. Here's how to go about it:
- Shut down your computer.
- Boot into recovery mode by pressing and holding Command + R et Start (be patient it can be a bit slow).
- As soon as the charging bar appears, release the keys.
- Select Disk Utility, then press Continue.
- Click on Utilities and Port.
- type resetpassword (lowercase, no spaces), press Starter.
- Click on the disk containing your account (normally this is the main disk).
- Choose the account to modify with Select the User Account.
- Enter your New Password.
- Type a new index password and click Save.
- An alert will appear indicating that the password has been changed, but not the keychain password. Click on OK.
- Shut down your computer. When it restarts, you can 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 Mac from a relative.
- Turn off your macOS, connect it using a Thunderbolt (or Firewire) to the second Mac.
- Turn your computer back on while holding the T key pressed.
Your Mac is now in target disk mode, which means it is acting like an external hard drive. Normally, you should see it appear in the second Mac's Finder.
You can import the files you want to the second Mac or even clone your entire drive and then back it up to an external hard drive.
Prevent someone from resetting your password
Now that you know how to reset a password with recovery mode, surely you are worried about your personal data.
To protect your sensitive files in case of loss or theft of your computer, we advise you to use FileVault Encryption. When you use FileVault Encryption you receive a Recovery Key and password.
Important advice: Print these documents and store them carefully because if you lose them you will no longer be able to never access your data.
To enable FileVault, go to your System Preferences → Security and Confidentiality → FileVault.
Recommended articles:
- The best password managers
- How to unlock a Mac via its iPhone?
- How do you know if your Mac has been hacked?
- How to uninstall apps on a Mac?
- The best cleaning software for macOS