Locked Out of Your Computer

How to reset your password and regain access when you're locked out of your Mac or Windows PC

Forgot your password and can't get into your computer? Don't panic. There are several ways to get back in depending on how your account is set up. If this is a work device managed by IT, contact them first — they can usually reset your password remotely.

Option 1: Reset with your Apple Account (easiest)

If your Mac is linked to your Apple Account (Apple ID), this is the fastest route:

  1. At the login screen, enter the wrong password three times
  2. You should see a prompt to reset it using your Apple Account
  3. Click that option and sign in with your Apple Account credentials
  4. Follow the prompts to create a new password
  5. Restart and log in with the new password

This only works if you previously linked your account to your Apple Account and if FileVault is turned on.

Option 2: Recovery Mode (Apple Silicon)

  1. Shut down your Mac completely
  2. Press and hold the power button until you see Loading startup options
  3. Click Options, then click Continue
  4. From the menu bar, go to Utilities > Terminal
  5. Type resetpassword (one word) and press Return
  6. The Reset Password assistant opens — select your user account and set a new password
  7. Restart and log in

If FileVault is enabled, you may need to unlock the disk first using your Apple Account or FileVault recovery key before you can reset the password.

Option 3: FileVault recovery key

If you have a FileVault recovery key (a long alphanumeric string generated when you turned on FileVault):

  1. At the login screen, enter the wrong password until you see the option to use your recovery key
  2. Enter the recovery key
  3. Set a new password

Your recovery key might be stored in the Passwords app on another Apple device signed into the same Apple Account (iPhone, iPad, or another Mac). Check there if you don't remember it.

If nothing works:

If you don't have access to your Apple Account or recovery key, the only remaining option is to erase the Mac and reinstall macOS. This deletes everything on the drive. If you have a recent backup, you can restore from it after reinstalling.

Work/school Macs: If your Mac is managed (Jamf, Kandji, Mosyle, etc.), your IT department has a recovery key or can issue a password reset remotely. Contact them before trying anything else.

Frequently Asked Questions

Will resetting my password delete my files?

No, in most cases. Resetting your password through Apple Account, Recovery Mode, security questions, or Microsoft account recovery keeps your files intact. The only scenario where you lose data is if you have to erase and reinstall the operating system — and even then, only if you don't have a backup.

What if I don't remember my Apple Account (Apple ID) password?

Go to iforgot.apple.com from another device and follow the steps to reset your Apple Account password. You'll need access to a trusted phone number or another Apple device signed into the same account. Once your Apple Account password is reset, you can use it to unlock your Mac.

How do I avoid getting locked out in the future?

Use a password manager. It securely stores all your passwords so you only need to remember one. Set up your Apple Account or Microsoft account recovery options (trusted phone number, recovery email) so you always have a way back in. On Mac, make sure FileVault recovery key is saved somewhere safe. On Windows, create a password reset disk or set up security questions while you still have access.

What if my computer asks for a BitLocker recovery key?

BitLocker is Windows disk encryption. If Windows asks for a recovery key after an update or hardware change, check aka.ms/myrecoverykey while signed into your Microsoft account on another device. If it's a work device, your IT department has the recovery key. Do not try to bypass it — enter the correct key or contact IT.