The fastest way back in: use your Apple ID
If you've forgotten your MacBook password, the quickest path is to use your Apple ID at the login screen. When you see the password field, click the question mark icon in the bottom right corner (or wait 30 seconds without typing). A reset option will appear that lets you enter your Apple ID password instead of your Mac password.
This works because your Mac is linked to your Apple ID during setup. Once you enter your Apple ID password correctly, macOS will let you create a new Mac password on the spot. You don't need to restart, call Apple, or use another computer — you can do this right at the login screen where you're stuck.
The catch: this only works if you remember your Apple ID password and have internet access. If you've also forgotten your Apple ID password, you'll need to use a different method.
Key Takeaways
- Your Apple ID password can unlock your Mac at the login screen without needing your original password.
- If you set up a recovery key for your Apple ID, you can use that instead of your password to reset access.
- A second admin account on the same Mac can reset the forgotten password through System Settings.
- If no other account exists and you can't use your Apple ID, you'll need to erase and reinstall macOS, which deletes all files on the drive.
Using a recovery key if you don't remember your Apple ID password
Apple lets you create a recovery key — a long code you store separately from your password. If you set one up before forgetting your password, you can use it at the login screen instead of your Apple ID password.
At the login screen, click the question mark icon and select the option to enter a recovery key. Type the code exactly as you saved it. Once accepted, you'll be prompted to create a new Mac password. This method works even if your Apple ID password is lost, as long as you have the recovery key written down or stored somewhere you can reach.
If you don't have a recovery key and can't remember your Apple ID password, you'll need to reset your Apple ID password through a web browser on another device. Go to iforgot.apple.com, enter your Apple ID email, and follow the steps to reset it. Once your Apple ID password is reset, you can use it at your Mac login screen.
Resetting the password from another admin account
If someone else set up an admin account on your Mac before you forgot your password, that account can reset yours. Have the other person log in with their account, then open System Settings and go to General > Users & Groups (or Accounts, depending on your macOS version).
They should click the lock icon to unlock the settings, then select your account from the list. There will be an option to reset your password. They can set a temporary password for you, which you can change to something you'll remember after you log in.
This method only works if a second admin account exists on the Mac. If you're the only account or the only admin, this path won't work.
Using Recovery Mode if you have no other options
If you can't use your Apple ID, don't have a recovery key, and no other admin account exists on your Mac, Recovery Mode is your remaining option. Restart your Mac and hold Command + R when ready after you hear the startup sound. Keep holding until you see the macOS Utilities window.
From the Utilities menu, select Terminal. Type resetpassword and press Enter. A password reset window will open where you can select your account and create a new password. This bypasses the login screen entirely and lets you set a fresh password.
Recovery Mode works on any Mac, but it requires you to restart and know the keyboard shortcut. If your Mac is encrypted with FileVault, you may be asked for your Apple ID password during this process.
What to do if Recovery Mode doesn't work
On newer Macs with Apple Silicon chips (M1, M2, M3, and later), Recovery Mode has additional security. If you've forgotten your password and can't use your Apple ID, you may not be able to reset it without erasing the drive. Apple's security design prioritizes preventing unauthorized access over convenience in this scenario.
If you reach this point, your only option is to erase the Mac and reinstall macOS. This deletes everything on the drive — all files, programs, and settings. You'll need to set up the Mac as new or restore from a Time Machine backup afterward. Contact Apple Support or visit an Apple Store if you want to explore whether any other path is available for your specific Mac model.
Preventing this from happening again
Once you're back in, write down your Mac password somewhere find, or use a password manager like Keychain to store it. Set up a recovery key for your Apple ID and store it separately from your passwords — a physical copy in a safe place works well. If anyone else uses your Mac, make sure they have their own admin account so you have a backup way in.
Enable FileVault encryption (System Settings > Privacy & Security > FileVault) so your files stay protected even if someone else gains access to the Mac. This doesn't prevent you from resetting your password, but it adds a layer of security if the Mac is ever stolen.
Frequently Asked Questions
Will I lose my files if I reset my password?
No — resetting your password through your Apple ID, a recovery key, another admin account, or Recovery Mode Terminal keeps all your files intact. Only erasing the Mac and reinstalling macOS deletes everything. That's a last resort if no other method works.
Can I reset my password without internet?
Recovery Mode and the Terminal method work without internet. Using your Apple ID or recovery key requires internet to verify them. If your Mac is offline, try Recovery Mode first.
What if I don't know my Apple ID email address?
Go to iforgot.apple.com on another device and look up your Apple ID by phone number or recovery email. Once you find it, you can reset the password and use it at your Mac login screen.
How long does it take to reset my password?
Using your Apple ID, recovery key, or another admin account takes a few minutes. Recovery Mode takes about the same time. Erasing and reinstalling macOS takes 30 minutes to an hour depending on your internet speed.
Do I need to contact Apple to reset my password?
No — you can reset it yourself using the methods above. Contact Apple Support only if you've tried all of these and none of them work, or if you need help with your Apple ID account.