If you forgot your Mac login password
If you can’t remember the password to log in to your Mac user account, or the password doesn’t work, try these steps to reset your password.

Restart your Mac
Restart your Mac. (If you see no option to restart, press and hold the power button on your Mac for up to 10 seconds, until your Mac turns off. Then turn it on again.)
Every Mac has a power button. On laptop computers that have Touch ID, press and hold the Touch ID button.
Enter the password of your Mac user account
When your Mac starts up and shows the login window, enter the password that you use to log in to your Mac user account. (This is your login password, not the password of your Apple Account.)
Use the correct uppercase or lowercase characters in your password. If your keyboard has Caps Lock turned on, the password field shows a
.Check the
in the corner of the login window to be sure that your keyboard is set for the correct language.
If your login password still doesn’t work, continue to the next steps.
Use the reset options in the login window
If you see a
next to the password field, click it. You might then see:A password hint—if you added a hint when setting up your account.
A reset message, such as “Restart and show password reset options” or “Reset it using your Apple ID” or “Reset it using your recovery key.”
If you don’t see a reset message, check again after entering a password up to three times.
Then follow the steps below, depending on what you see.

If you see a reset message
If the login window shows a reset message, click the message to begin the reset process.
Follow the onscreen instructions, which vary based on your Mac setup. As you follow the instructions:
If asked to select a volume to recover, select your startup disk, such as Macintosh HD.
If asked to select a user you know the password for, click “Forgot all passwords?”.
If asked to enter your FileVault recovery key, enter the string of letters and numbers you received when you turned on FileVault and chose to use a recovery key.
If asked to deactivate this Mac, allow your Mac to deactivate. This is temporary.
If asked to create a new keychain to store the user's passwords, allow your Mac to create a new keychain.
After you provide the information requested, you're asked to create a new password for your account. You can then restart your Mac and log in with the new password.
If you couldn’t use these steps to reset your password, skip to “Use the reset options in Recovery.”
If you see a message that your account is locked
If your account becomes locked after repeated login attempts, wait until the stated time has elapsed, then restart your Mac and try again. If that doesn't help, skip to “Use the reset options in Recovery.”
If you see no message
If a reset message doesn’t appear in the login window after entering a password up to three times, restart your Mac and try again. If that doesn't help, continue to “Use the reset options in Recovery.”
Use the reset options in Recovery
If you couldn’t reset your password using the reset options in the login window:
Start up from macOS Recovery. While starting up from Recovery, you're asked to select a user you know the password for. Click “Forgot all passwords?”.
Follow the onscreen instructions, which vary based on your Mac setup.
After you provide the information requested, you're asked to create a new password for your account. When done, click Exit to Recovery, restart your Mac, and log in with the new password.
If you couldn't use these steps to reset your password, follow the next steps while still in Recovery. You’re in Recovery when you see options to restore from Time Machine, reinstall macOS, and more:

From the Utilities menu in the menu bar at the top of the screen, choose Terminal. Or press Shift-Command-T to open Terminal.
In the Terminal window that opens, type
resetpassword
, then press Return.In the window that opens, choose a reset option, such as “I forgot my password” or “My password doesn't work when logging in.” Then click Next and follow the onscreen instructions.
After you provide the information requested, you're asked to create a new password for your account and any other user accounts. You can then restart your Mac and log in with the new password.
If you couldn’t use these steps to reset your password, continue to the next section.
If you can’t reset your login password
If no other solution works, you can regain access to your Mac by erasing it. This permanently removes each user account, its password, and its data from your Mac.
Shut down your Mac, then start up from macOS Recovery again. When asked to select a user you know the password for, choose Recovery Assistant > Erase Mac from the menu bar at the top of the screen.
In the window that opens, click Erase Mac, then click Erase Mac to confirm.
After your Mac is erased, it automatically restarts.
If your Mac starts up to a question mark, turn off your Mac, start up from macOS Recovery again, then reinstall macOS from Recovery.
If your Mac starts up to an Activate Mac window, you’re asked to choose a Wi-Fi network and enter your Apple Account information (not your login information). After your Mac activates, click Exit to Recovery, then reinstall macOS from Recovery.
Learn more
Learn how to change your login password when you’re already logged in.
Learn what to do if your Mac doesn’t start up all the way, but stays on a blank screen, lock symbol, or other screen.