Forgot your MacBook password: how to get back in
If you forgot the password you use to sign in to your MacBook, you can usually reset it from the login window or from macOS Recovery, using your Apple Account or a FileVault recovery key. Erasing the Mac is the last resort, because it deletes everything on it.
On this page
What it means
The password you type at the macOS login window belongs to your Mac user account. It is not the same thing as your Apple Account password, even though many people use the same one for both. If the Mac account password is lost, the Mac will not let you in, but Apple provides several ways to set a new one.
Which way works depends on your setup: whether FileVault is on, whether an Apple Account is linked to your user, and whether the Mac is managed by a school or employer. The steps below go from the least disruptive to the most.
Symptoms and causes
You are likely dealing with this problem if:
- The login window rejects your password.
- The account locks for a while after several wrong attempts.
- A question mark (?) icon appears next to the password field.
- A message such as "Restart and show password reset options" appears.
- The Mac asks for an Apple Account or a FileVault recovery key.
The usual causes, most common first:
- Password forgotten or mistyped
- The most common reason. A single wrong character is enough to be rejected.
- Caps Lock or wrong keyboard language
- Caps Lock on, or a different input language selected in the login window, changes what you type.
- Apple Account password typed instead
- The login window wants the Mac user account password, which can differ from the Apple Account one.
- Account locked after too many failed attempts
- After repeated failures the Mac makes you wait before trying again.
How to fix it
Work through these in order. They start with the quickest, safest checks and move to deeper repairs; stop as soon as the problem is gone.
1.Retry carefully
Rules out Caps Lock, the wrong language and a simple typo before you change anything.
- Restart the Mac. If the login screen has no Restart option, hold the power or Touch ID button for up to 10 seconds, then turn the Mac on again.
- Check that Caps Lock is off and that the Input menu in the login window shows the language you expect.
- Enter your Mac account password, not your Apple Account password.
- If a question mark appears in the password field, click it to see your password hint.
2.Change it from another administrator account
If the Mac has a second administrator you can sign in to, that account can set a new password for the locked user.
- Log in to the other administrator account.
- Open Users & Groups in System Settings.
- Choose the user who is locked out and change their password.
3.Use the reset options in the login window
The login window can often walk you through a reset using your Apple Account or recovery key without starting Recovery.
- At the login window, click the ? next to the password field, then click the reset message, for example Restart and show password reset options.
- Follow the prompts. Depending on your setup you may be asked for your FileVault recovery key. You may also see prompts to choose your startup disk, Forgot all passwords?, temporary deactivation of the Mac, or creating a new keychain.
- Create a new password, then restart and log in with it.
- If the account is locked, wait for the time the Mac states, restart, and try again.
- If no reset message shows up, enter a password up to 3 times, then restart and try again.
4.Reset the password in macOS Recovery
Use this when the login window gives no reset option. Recovery runs outside your normal account.
Before you start: A managed school or work Mac may need a recovery key from your IT department. The prompts can include creating a new keychain, so read each one before you confirm.
- Start the Mac in Recovery. On an Apple silicon Mac, shut it down, then press and hold the power button until the startup options appear, and choose Options, then Continue.
- On the user selection screen, click Forgot all passwords? and follow the prompts: Apple Account sign-in, recovery key, startup disk, or temporary deactivation.
- If you are offered Exit to Recovery, click it. If a new password was created, choose Restart from the Apple menu and log in.
- If that did not offer a reset, choose Utilities > Terminal, type the command below and press Return.
resetpassword - Select I forgot my password (or My password doesn't work when logging in), click Next, and set the new password. Then restart.
5.Find a missing FileVault recovery key
If FileVault is on, the reset may ask for the recovery key. It is a 24-character code created when FileVault was turned on, and it is different from an Apple Account recovery key.
- Look for the key where you saved it when you turned on FileVault.
- On macOS Tahoe 26 or later, the key may be saved in the Passwords app on another device that uses the same Apple Account with iCloud Passwords & Keychain turned on. Open Passwords, search for "recovery key", open the entry for your Mac and reveal the key.
- When typing the key, remember that the letters I and S and the digits 1 and 0 are not used in it.
6.Last resort: erase the Mac
If nothing above works and you have no recovery key or linked Apple Account, erasing is the only way to use the Mac again.
Before you start: This permanently deletes all users and data on the Mac.
- Shut the Mac down and start it in Recovery (see the previous recovery solution).
- From the Recovery Assistant menu choose Erase Mac, then click Erase Mac again to confirm.
- If the Mac starts to a question mark afterwards, turn it off and reinstall macOS from Recovery.
- If an Activate Mac window appears, connect to Wi-Fi or Ethernet if asked and enter the Apple Account information used on this Mac. After activation, click Exit to Recovery and reinstall macOS.
Check that it worked
- You reach the desktop after logging in with the new password.
- After a reset, you may see a message that the login keychain could not be unlocked or that a new keychain was created.
If it still fails
- Check whether the Mac belongs to a school or company. Managed Macs may need a recovery key from the IT department, and a reset here changes only the local Mac password, not your school or work login.
- If the Mac asks for an Apple Account during erase or activation and you do not know it, use Apple's official account recovery page rather than any third-party unlock service.
- Contact Apple Support through support.apple.com and be ready to describe which prompts the Mac shows.
Questions
Will I lose my files if I reset the password?
The reset steps above change the password only. Only Erase Mac deletes data.
Is the FileVault recovery key the same as my Apple Account recovery key?
No. The FileVault key is a 24-character code created when FileVault was turned on.
Sources
- If you forgot your Mac login passwordOfficial · Apple Support
- Resetting Your Password on an Apple Silicon Mac · University of Illinois IT