Use Your Apple ID to reset your password from the login screen
If you see the login screen and cannot remember your password, look for a question mark icon or a "Reset Password" option below the password field. Click it. Your Mac will ask you to enter your Apple ID email and password instead — the one you use for the App Store, iCloud, or other Apple services.
Once you enter your Apple ID credentials, macOS will let you create a new Mac password right there. You do not need to restart or use another computer. This works on any Mac running macOS 10.7 or later, as long as your Apple ID is connected to your user account.
If you do not see a reset option on the login screen, your account may not be linked to an Apple ID. Move to the next section instead.
Key Takeaways
- The fastest way to reset your password is clicking the question mark icon on the login screen and entering your Apple ID credentials.
- If your account is not linked to an Apple ID, you can use Recovery Mode to create a new password through the Terminal process.
- Recovery Mode requires you to restart your Mac and hold Command + R during startup, then navigate to Utilities and open Terminal.
- If you set up a recovery contact or recovery key when you created your Apple ID, you can use those to reset your password instead.
- If none of these routes work, you may need to erase your Mac and reinstall macOS, which will delete all your files unless you have a backup.
Reset your password using Recovery Mode and Terminal
If the Apple ID reset option does not appear on your login screen, you can use Recovery Mode. Restart your Mac and hold down Command + R as soon as you hear the startup sound or see the Apple logo. Keep holding until you see a spinning globe or the macOS Utilities window.
Once in Recovery Mode, click the Utilities menu at the top and select Terminal. A black window will open where you can type commands. Type resetpassword and press Enter. A password reset window will appear — select your user account from the dropdown, then create a new password and click Reset Password.
Your Mac will restart automatically. Log in with your new password. This method works even if your account is not connected to an Apple ID, but it requires you to remember your username or see it listed in the account dropdown.
Use a recovery contact or recovery key if you have one
When you set up two-factor authentication on your Apple ID, Apple offers you the option to add a recovery contact — a trusted person who can help you regain access — or a recovery key, which is a long code you save somewhere safe.
If you chose a recovery contact, you can ask them to help you reset your password through Apple's account recovery process. If you have your recovery key written down or saved, you can use it to verify your identity without needing another person. Both routes go through Apple's website and take longer than the methods above, but they work if you cannot access Recovery Mode.
Create a new administrator account if you are locked out completely
If you cannot use any of the methods above — no Apple ID linked, no Recovery Mode access, no recovery contact or key — you can create a new administrator account. Restart your Mac and hold Command + S to enter Single User Mode (on older Macs) or Command + R for Recovery Mode (on newer ones).
In Recovery Mode, open Terminal from the Utilities menu. Type the command csrutil disable and restart your Mac normally. Once you are back at the login screen, hold Command + S again and use the adduser command to create a new administrator account. After you create it and restart, log in with the new account, then use System Settings to reset your original account's password.
This process is complex and straightforward to make mistakes on. If you are not comfortable typing commands in Terminal, contact Apple Support or visit an Apple Store — they can help you regain access without erasing your Mac.
Back up your files before attempting a full erase
If none of the above methods work and you cannot reach Apple Support, your last option is to erase your Mac and reinstall macOS. This will delete everything on your computer unless you have a backup on an external drive or in iCloud.
Before you erase, try to access your files from another Mac or from iCloud.com using your Apple ID. If you have important documents, photos, or other files, save them somewhere else first. Once you erase and reinstall macOS, you will set up your Mac as new and can restore your files from backup afterward.
To erase your Mac, restart and hold Command + R, then go to Utilities and select Disk Utility. Select your main drive and click Erase. Choose APFS as the format and give it a name. After erasing, macOS will offer to reinstall automatically.
Prevent this from happening again
Write your password down and store it somewhere find — a locked drawer, a safe, or a password manager like Keychain, 1Password, or Bitwarden. Do not store it in a note on your Mac itself, because you will not be able to read it if you forget your password.
Link your Apple ID to your user account in System Settings under General, then Apple ID. Turn on two-factor authentication and add a recovery contact or save your recovery key. These steps take ten minutes and will save you hours if you forget your password in the future.
If you use your Mac for work or school, ask your IT department whether they have a password reset process. Many organizations can reset your password remotely without you needing to use Recovery Mode.
Frequently Asked Questions
Will I lose my files if I reset my password?
No. Resetting your password through the login screen, Recovery Mode, or your Apple ID does not delete any files. Your documents, photos, and applications stay on your Mac. Only if you erase your Mac entirely will you lose files, and that is a last resort.
What if I do not remember my Apple ID password either?
Go to iforgot.apple.com and enter your Apple ID email. Apple will send you a link to reset your Apple ID password. Once you reset it, you can use that new password to reset your Mac password on the login screen.
Can I reset my password without restarting my Mac?
Only if you see the reset option on the login screen. If your account is not linked to an Apple ID, you will need to restart and use Recovery Mode. There is no way to reset your password while logged out without restarting.
How long does it take to reset my password?
Using the Apple ID method on the login screen takes two to three minutes. Recovery Mode takes five to ten minutes if you are comfortable with Terminal. If you use Apple's account recovery process with a recovery contact, it can take several days.
What if my Mac is encrypted with FileVault?
FileVault encryption does not prevent you from resetting your password. You can still use the Apple ID method on the login screen or Recovery Mode. Your files remain encrypted and protected even after you reset your password.