If you can't reset your Mac login password
If the standard steps to reset the password of your Mac user account don't succeed, try these additional steps.
Before you begin
First try the standard steps to reset your Mac login password. If those steps don't succeed, continue to the steps below.
Start up from macOS Recovery
Follow the appropriate steps, based on whether you're using a Mac with Apple silicon. If you're not sure, you can try both sets of steps.
If using a Mac with Apple silicon
Shut down your Mac. If you can't shut down normally, press and hold the power button for up to 10 seconds, until your Mac turns off. (Every Mac has a power button. On laptop computers that have Touch ID, press and hold Touch ID.)
Press and hold the power button on your Mac. As you continue to hold the power button, your Mac turns on and loads startup options. When you see Options, release the power button.
Click Options, then click the Continue button that appears below it.
If using any other Mac
Shut down your Mac. If you can't shut down normally, press and hold the power button for up to 10 seconds, until your Mac turns off. (Every Mac has a power button. On laptop computers that have Touch ID, press and hold Touch ID.)
Press and release the power button to turn on your Mac.
Immediately after releasing the power button, press and hold Command (⌘)-R on your keyboard.
Keep holding the keys until you see an Apple logo or spinning globe.
If your Mac starts up to the login window again, review the guidelines for startup key combinations, then start over from step 1.
You might be asked to select a network from the
, or attach a network cable. If you don't see a Wi-Fi menu, look for it in the upper-right corner of the screen.
If asked to select a user you know the password for
As you're starting up from macOS Recovery, if you're asked to select an admin user you know the password for, click “Forgot all passwords?” and proceed as described in the next section, based on what your Mac asks for next—your Apple Account (or Apple ID) information or your recovery key.
If you're not asked to select an admin user, skip to Use the Reset Password assistant.
If asked for your Apple Account information
After clicking "Forgot all passwords?", if you're asked for your Apple Account (or Apple ID) information:
Enter your Apple Account information.
If asked, enter the verification code sent to your other devices.
If asked, select a user that you want to reset the password for:
Select the user, then enter your new password information and click Next.
When authentication has succeeded, click Exit.
Choose Apple menu > Restart, then log in with your new password. Password reset is now complete. You don't need to take additional steps.
If you see an Activation Lock window, click Exit to Recovery Utilities, then skip to Use the Reset Password assistant.
If asked for your recovery key
After clicking "Forgot all passwords?", if you're asked for your FileVault recovery key:
Enter your FileVault recovery key. You received it when you turned on FileVault and chose to create a recovery key instead of allowing your Apple Account to unlock your disk.
When prompted to reset your password, click Reset Password.
Select a user to reset the password for.
After successfully authenticating, click Exit.
Choose Apple menu > Restart, then log in with your new password. Password reset is now complete. You don't need to take additional steps.
Use the Reset Password assistant
After starting up from macOS Recovery, if you didn't reset your password using your Apple Account information or recovery key, you should see the utilities window. It shows options such as restoring from Time Machine, reinstalling macOS, and using Disk Utility.
From the Utilities menu in the menu bar, choose Terminal.
In the Terminal window, type
resetpassword
, then press Return to open the Reset Password assistant.If asked to select an admin user you know the password for, click “Forgot all passwords?”.
At the Reset Password window, click Deactivate Mac, then click Deactivate to confirm.
If you see an Activation Lock window, enter your Apple Account information, then click Next.
At the Reset Password window, enter your new password information, then click Next. (If this window shows multiple user accounts, click the Set Password button next to each account name, then enter the new password information for each account.)
When the password reset is completed, click Exit.
Choose Apple menu > Restart, then log in with your new password.
If you still can't reset your password
If no other solution is successful, you can reset your password by erasing your Mac.
Shut down your Mac, then start up from macOS recovery as described previously.
When asked to select an admin user you know the password for, choose Recovery Assistant > Erase Mac from the menu bar.
From the Erase Mac window, click Erase Mac, then click Erase Mac to confirm.
If your Mac restarts to a flashing question mark, press and hold the power button for a few seconds until your Mac turns off.
Start up from macOS Recovery again, then reinstall macOS. Learn how to reinstall macOS.
If you need help
If you erased your Mac and now can't reinstall macOS because the installer doesn't see a hard disk on which to install, you might need to change the format of the disk:
Press Command (⌘)-Q to quit the installer.
When you see the utilities window, select Disk Utility, then click Continue.
Select the first item listed in the sidebar of the Disk Utility window. This is your built-in hard disk.
Click the Erase button or tab on the right side of the window, then enter these details:
Name: Macintosh HD
Format:Mac OS Extended (Journaled)
Scheme(if shown): GUID Partition Map
Click Erase, then click Erase to confirm.
When the erase is complete, press Command-Q to quit Disk Utility and return to the utilities window. You should now be able to reinstall macOS successfully.