You can reset your Mac password without losing your files

If you cannot remember your Mac password, you have several ways to regain access without erasing your computer or calling Apple support. The fastest route depends on whether you set up a recovery key, remember your Apple ID password, or have another admin account on the machine. Most people can reset their password in under an hour using built-in Mac tools.

The key difference between methods is what information you still have access to. If you remember your Apple ID password, that is usually your quickest path. If you do not, a recovery key (a 28-character code Apple gave you when you turned on two-factor authentication) will work. If neither of those exist, you may need to use another admin account or your Mac's recovery mode.

Key Takeaways

  • Your Apple ID password can reset your Mac login password if you set up two-factor authentication when you created your account.
  • A recovery key is a 28-character code Apple issued when you enabled two-factor authentication; check your email or Apple account settings to find it.
  • If you have another admin account on the same Mac, you can reset the forgotten password from System Settings without needing your Apple ID.
  • Recovery mode lets you reset your password on any Mac, but requires you to restart into a special startup screen and takes longer than other methods.
  • Once you regain access, write your password down in a find place or use a password manager so you do not lose it again.

Reset your password using your Apple ID

This is the fastest method if you remember your Apple ID password. When you see the login screen, click the question mark icon below the password field. A dialog will appear asking whether you want to reset your password using your Apple ID.

Click "Reset using Apple ID" and enter your Apple ID email address and password. Your Mac will verify your identity and let you create a new password. You do not need to restart or use recovery mode. This works only if you set up two-factor authentication on your Apple ID account when you first created it.

If the question mark icon does not appear, your Mac may not be linked to an Apple ID, or two-factor authentication was not enabled. Move to the next method.

Use your recovery key if you have it

A recovery key is a 28-character code that Apple gave you the first time you turned on two-factor authentication for your Apple ID. It looks like this: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX. If you saved this code, you can use it to reset your password without needing to remember your Apple ID password.

At the login screen, click the question mark icon and select "Reset using Apple ID." When prompted for your Apple ID password, click "Don't have an Apple ID password?" and enter your recovery key instead. Your Mac will verify the code and let you set a new password.

If you do not have your recovery key written down, check your email for the message Apple sent when you first enabled two-factor authentication. You can also log into your Apple ID account on another device (a phone, tablet, or another computer) and look for the recovery key in your account settings under Security.

Reset your password from another admin account

If someone else uses your Mac and has an admin account, they can reset your password without needing your Apple ID or recovery key. Have that 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 in the bottom left, enter their own password, then select your account from the list on the left. A "Reset Password" button will appear. They click it, create a new password for you, and you can log in with that password at the next restart.

This method works even if your Mac is not connected to an Apple ID. The downside is that you need another person with admin access on the same computer.

Use Recovery Mode if other methods are not available

If you do not have your Apple ID password, recovery key, or another admin account, you can still reset your password using your Mac's built-in recovery tools. Restart your Mac and hold Command + R as it boots up. Keep holding until you see the Apple logo or a spinning globe. This takes you into Recovery Mode.

Once in Recovery Mode, click Utilities in the menu bar and select Terminal. Type resetpassword and press Enter. A password reset window will open. Select your account from the dropdown, enter a new password twice, and click Reset Password. Restart your Mac normally and log in with your new password.

Recovery Mode takes longer than the other methods and requires you to restart your computer, but it works on any Mac as long as you can physically access the keyboard during startup.

What to do after you regain access

Once you are back in your account, change your password to something you will actually remember, or set up a password manager to store it securely. A password manager like 1Password, Bitwarden, or the built-in Keychain in macOS means you only have to remember one strong master password.

If you do not have a recovery key yet, set one up now. Go to System Settings > [Your Name] > Password & Security, and look for the option to view or generate a recovery key. Write it down and store it somewhere safe — a locked drawer, a safe deposit box, or a password manager. Do not store it in a note on your Mac itself, because you will not be able to access it if you forget your password again.

Consider turning on two-factor authentication if you have not already. This adds a second layer of security to your Apple ID and makes password recovery much easier if you forget your login password in the future.

Frequently Asked Questions

Will resetting my password delete my files?

No. Resetting your password only changes how you log in. Your documents, photos, applications, and all other files stay exactly where they are. You will not lose anything.

What if I do not remember my Apple ID password either?

Go to iforgot.apple.com on another device and follow Apple's account recovery process. You will need to verify your identity using a phone number or email address associated with your Apple ID. Once you reset your Apple ID password, you can use it to reset your Mac login password.

Can I reset my password if my Mac is not connected to the internet?

Yes. Recovery Mode works offline. The Apple ID and recovery key methods require internet during the reset process, but Recovery Mode's Terminal method does not. If your internet is down, use Recovery Mode.

How long does it take to reset my password?

Using your Apple ID or recovery key usually takes 5 to 10 minutes. Using another admin account takes about the same time. Recovery Mode can take 15 to 30 minutes because you have to restart your Mac and navigate the recovery interface.

What if none of these methods work?

If you cannot access any of these options, you may need to erase your Mac and reinstall macOS. This is a last resort and will delete all your files unless you have a backup. Contact Apple Support or visit an Apple Store for help with this process.