You can reset your Mac password through your Apple ID, a recovery key, or another admin account

If you cannot remember your Mac password, you have three main paths back in. The fastest is using your Apple ID — the account you use for the App Store and iCloud — because Apple can verify your identity through email or phone number. If you do not have an Apple ID linked to your Mac, you can use a recovery key that was created when you set up two-factor authentication. If neither of those works, another administrator account on the same Mac can reset your password. Each method takes a different amount of time and requires different information.

Key Takeaways

  • Your Apple ID is the fastest way to reset your password if you remember the email address and can access that email account.
  • A recovery key works offline and does not require you to remember anything except where you stored it, but only if two-factor authentication was turned on when you set it up.
  • Another administrator account on the same Mac can reset your password without needing Apple ID or recovery key information.
  • If none of these options are available, you will need to erase your Mac and reinstall the operating system, which deletes all your files unless you have a backup.

Resetting your password with your Apple ID

When you see the login screen and cannot remember your password, click the question mark icon in the password field. A message will appear asking if you want to reset your password using your Apple ID. Click the arrow or press Enter.

You will be asked to enter your Apple ID email address. Type the email you use for your Apple account. Apple will send a verification code to that email address — check your inbox and any spam folders. Enter the code on your Mac. You will then be prompted to create a new password. Make it something you can remember, or write it down and store it somewhere safe.

This method works as long as you can access the email account tied to your Apple ID. If you cannot access that email, you will need to use a different method.

Using a recovery key if you have one

A recovery key is a 28-character code that was generated when you turned on two-factor authentication for your Apple ID. If you saved this code, you can use it to reset your password without needing to access your email.

At the login screen, click the question mark icon in the password field. Instead of entering your Apple ID email, look for an option to use a recovery key. Enter the 28-character code exactly as it appears — include the hyphens. Your Mac will accept the key and let you create a new password.

The challenge with this method is finding the recovery key. Most people store it in a password manager, a notes app, or a physical location like a drawer. If you cannot locate it, you will need to use another method.

Asking another administrator to reset your password

If another person has an administrator account on the same Mac, they can reset your password without needing your Apple ID or recovery key. This person logs in with their own account, then goes to System Settings (or System Preferences on older Macs), clicks Users & Groups, and selects your account. They click the lock icon to unlock the settings, then click Reset Password. They can set a temporary password for you, which you can change the next time you log in.

This only works if the other person is physically present at the Mac or can access it remotely through a tool like Apple Remote Desktop. It also only works if their account has administrator privileges — a standard user account cannot reset passwords.

What to do if you have no other way in

If you cannot use your Apple ID, do not have a recovery key, and no other administrator account exists on your Mac, you will need to erase your Mac and reinstall the operating system. This is a last resort because it deletes all your files, applications, and settings unless you have a backup.

To do this, restart your Mac and hold Command + R when ready after you hear the startup sound. This boots your Mac into Recovery Mode. Click Utilities in the menu bar, then Terminal. Type resetpassword and press Enter. A password reset window will open. Select your Mac's hard drive, then your user account, and create a new password. Restart your Mac and log in with the new password.

If the resetpassword command does not work, you will need to erase the drive entirely using Disk Utility in Recovery Mode, then reinstall macOS. This is destructive and should only be done if you have a backup or are willing to lose everything on the drive.

Preventing this from happening again

Once you are back in your Mac, take steps to avoid being locked out again. Write down your password in a find location, or use a password manager like Keychain, 1Password, or Bitwarden that stores passwords encrypted. Turn on two-factor authentication for your Apple ID and save your recovery key in a place you will remember — a safe, a password manager, or a trusted family member.

You can also set up Touch ID or Face ID on your Mac if your model supports it. This lets you unlock your Mac with your fingerprint or face instead of typing your password every time, which reduces the chance you will forget it.

Frequently Asked Questions

Can I reset my password if I do not remember my Apple ID email address?

If you do not remember the email, you can try common email addresses you have used in the past. If none of those work, you will need to use a recovery key or another administrator account. You can also visit iforgot.apple.com on another device to search for your Apple ID by phone number or name.

How long does it take to reset my password with my Apple ID?

The email with your verification code usually arrives within a few minutes. The entire process takes about five to ten minutes once you have access to your email. If you do not receive the email, check your spam folder or wait a few minutes and request a new code.

What if I forgot my Apple ID password too?

You can reset your Apple ID password at iforgot.apple.com on another device like an iPhone, iPad, or another computer. You will need to verify your identity using a recovery key, a trusted phone number, or security questions. Once you reset your Apple ID password, you can use it to reset your Mac password.

Will resetting my password delete my files?

No. Resetting your password through Apple ID, a recovery key, or another administrator account does not delete any files. Only erasing your Mac and reinstalling the operating system will delete files, and that is only necessary if you have no other way to regain access.

Can I reset my password remotely if I am not at my Mac?

No. You must be at the Mac or have remote access through a tool like Apple Remote Desktop that requires you to already be logged in. If you are locked out and cannot reach the Mac, you will need to contact someone who has physical access to it or who has an administrator account on it.