The fastest way in: use your Apple ID or recovery key
If you have forgotten your Mac password, the quickest path is to restart your Mac and use your Apple ID at the login screen instead. When you see the login window, click the question mark icon or wait for it to appear after a few incorrect password attempts. Your Mac will then offer to let you reset your password using your Apple ID credentials — the email and password you use for iCloud, the App Store, or other Apple services.
This method works on any Mac running macOS 10.7 or later that has an Apple ID linked to the account. You will need internet access so your Mac can verify your Apple ID with Apple's servers. The reset happens when ready, and you can set a new password right there at the login screen.
If you do not remember your Apple ID password either, you can use your recovery key instead. This is a 28-character code Apple gave you when you first set up two-factor authentication. If you saved it somewhere safe — a password manager, a printed card, or a trusted contact — you can enter it at the Apple ID verification screen to proceed.
Key Takeaways
- Your Apple ID is the fastest way to reset a forgotten Mac password at the login screen without restarting into recovery mode.
- You will need the email and password for the Apple ID linked to your Mac account, plus an internet connection.
- If you do not have your Apple ID password, a recovery key (a 28-character code from two-factor setup) will work instead.
- Recovery mode is the backup route when Apple ID reset does not work, and it requires you to restart your Mac and hold Command-R during startup.
Using recovery mode when Apple ID reset is not an option
If your Mac does not have an Apple ID linked to it, or if the Apple ID reset does not work, you will need to restart into recovery mode. Shut down your Mac completely. Turn it back on and when ready hold down Command-R (or Command-Shift-R on some older Macs) until you see the Apple logo or a spinning globe. Keep holding until the macOS Utilities window appears — this usually takes 30 to 60 seconds.
Once you are in recovery mode, click Utilities in the menu bar, then select Terminal. In the Terminal window, type resetpassword and press Enter. A password reset window will open. Select your Mac user account from the dropdown menu, then enter a new password twice to confirm it. Click Reset Password, then close the Terminal window and restart your Mac normally.
This method erases nothing on your Mac — it only changes the password for the account you select. You will be able to log in with your new password when ready after restart. Recovery mode works on all Macs, regardless of whether they have an Apple ID set up, which makes it the most reliable backup option.
What to do if you do not remember your Apple ID email address
If you are stuck at the Apple ID verification screen and cannot remember which email address is linked to your account, you have two paths forward. First, try any email addresses you have used with Apple in the past — your primary email, an old work email, or a secondary address. Apple will tell you when ready if the address is not associated with an account.
If that does not work, go to iforgot.apple.com on another device (a phone, tablet, or another computer). Enter any email address you think might be linked to your account, and Apple will search for it. If it finds a match, you can reset your Apple ID password right there, then use the new password at your Mac login screen.
Restarting into recovery mode on an Apple Silicon Mac (M1, M2, M3)
Apple Silicon Macs (those with M1, M2, M3, or later chips) use a different startup process. Shut down your Mac completely. Press and hold the power button until you see "Loading startup options" on the screen — this takes about 10 seconds. You will see a gear icon labeled Options. Click it, then select your user account and click Continue. You will be asked to enter a password; if you do not have one, leave it blank and click the arrow to proceed.
From there, you can use the same Terminal method described above: click Utilities, select Terminal, type resetpassword, and set a new password. The process is identical to Intel Macs once you are in recovery mode.
When you have a recovery key but no Apple ID password
A recovery key is a 28-character code that Apple provides when you set up two-factor authentication on your Apple ID. If you have this code saved but cannot remember your Apple ID password, you can use it to reset your password without needing the original password.
At the Apple ID verification screen on your Mac, click "Do not have access to your trusted phone number?" or a similar option (the exact wording varies by macOS version). You will be asked to enter your recovery key. Type it in exactly as it appears — it usually has hyphens between groups of characters. Once verified, you can set a new Apple ID password and use it to log into your Mac.
Preventing this situation: where to store your recovery information
Once you have regained access to your Mac, take time to save your recovery information somewhere you will actually remember. Your recovery key should be written down or stored in a password manager like 1Password, Bitwarden, or the built-in Keychain. Do not store it only in your email — if you lose email access too, you will be stuck.
Consider setting up a trusted contact in your Apple ID settings. This is a person you trust who can help you regain access if you lose both your password and your recovery key. You can add a trusted contact through Settings > [Your Name] > Password & Security on your Mac, or through iCloud.com on any browser.
What happens if you have a FileVault-encrypted Mac
If your Mac uses FileVault encryption (which encrypts your entire hard drive), the login screen appears before your Mac fully starts up. This means you cannot use recovery mode the normal way — you have to enter your password to even get to the point where recovery mode is available.
In this case, your only option is the Apple ID reset at the login screen. If that does not work, you will need to contact Apple Support or take your Mac to an Apple Store. They can verify your identity and help you regain access, though the process may take longer than the methods above.
Frequently Asked Questions
Can I log in without a password if I do not have an Apple ID?
No, but you can set a new password using recovery mode. Restart your Mac while holding Command-R, open Terminal from the Utilities menu, type resetpassword, and create a new password for your account. This works on any Mac regardless of Apple ID setup.
What if I forgot both my Mac password and my Apple ID password?
Use your recovery key at the Apple ID verification screen on your Mac login. If you do not have your recovery key saved, go to iforgot.apple.com on another device to reset your Apple ID password first, then use that new password at your Mac login screen.
Will resetting my password delete my files?
No. Resetting your password using Apple ID or recovery mode changes only the password — your files, applications, and settings remain untouched. Your Mac will work exactly as it did before, except you will log in with a new password.
How long does it take to reset a Mac password?
Using Apple ID at the login screen takes a few minutes. Recovery mode takes 5 to 10 minutes from shutdown to restart. Both are much faster than contacting Apple Support, which can take hours or days depending on availability.
Can someone else reset my Mac password without my permission?
No. Both the Apple ID method and recovery mode require either your Apple ID credentials or physical access to your Mac. If your Mac is FileVault-encrypted, even recovery mode cannot bypass the encryption without your password or Apple ID.