The fastest way back into your Mac
If you remember your Apple ID email and password, you can reset your Mac login password without erasing anything on the computer. Restart your Mac, and when the login screen appears, click the question mark icon or "Forgot password?" link. Enter your Apple ID and follow the prompts to create a new login password. This takes about five minutes and works whether you forgot the password yesterday or six months ago.
If you do not have an Apple ID, or you cannot remember that password either, your options narrow. You will need either a recovery key you saved earlier, another administrator account on the same Mac, or you will need to erase the drive and set up the Mac fresh. The path forward depends on what you set up before you got locked out.
Key Takeaways
- If you know your Apple ID and its password, you can reset your Mac login password at the login screen without losing any files.
- A recovery key (a 28-character code) saved during Apple ID setup lets you reset your password even if you forgot your Apple ID password.
- If another person has an administrator account on the same Mac, they can create a new password for your account from System Settings.
- If none of these options work, you will need to erase your drive and reinstall macOS, which deletes everything unless you have a backup.
- Apple ID password resets take a few minutes at the login screen; account recovery through Apple's website takes 3 to 5 business days.
Using your Apple ID at the login screen
When you see the login screen with a list of user accounts, look for a question mark icon or a "Forgot password?" link below the password field. Click it. The Mac will ask you to enter your Apple ID email address — this is the email you used to set up your Mac or iCloud, not necessarily the email address associated with your user account name.
After you enter your Apple ID email, the Mac will ask for your Apple ID password. If you do not remember it, click "Forgot Apple ID password?" and you will be taken to Apple's website to reset it. Once you have reset your Apple ID password, go back to your Mac and enter the new one. The Mac will then let you create a new login password and you will be back in.
This method works on any Mac running macOS Big Sur or newer. On older versions, the question mark icon may not appear; if that is the case, you will need to use one of the other methods below.
Using a recovery key if you have one
When you first set up two-factor authentication on your Apple ID, Apple gave you a recovery key — a 28-character code that looks like XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX. If you saved this somewhere safe (a password manager, a printed card, a safe deposit box), 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 or "Forgot password?" link. When the Mac asks for your Apple ID email, enter it. When it asks for your Apple ID password, click "Don't have your password?" and select "Use your recovery key." Enter the recovery key exactly as it appears, including the hyphens. The Mac will then let you create a new login password.
If you cannot find your recovery key and you cannot remember your Apple ID password, you will need to move to the next method or contact Apple directly to recover your account.
Having another admin account reset your password
If someone else uses your Mac and has an administrator account, they can create a new password for your account without needing your Apple ID. They will log in with their own account, open System Settings, go to General, then Users & Groups (or just Users on newer macOS versions), and click the lock icon to unlock the settings. They will select your account, click "Reset Password," and create a temporary password for you.
Once they have done this, you can log in with the temporary password and change it to something only you know. This method does not require internet access and works when ready. The tradeoff is that the other admin can see your account exists and can access some of its settings, so this works best in a household where you trust the other person.
Recovering your Apple ID account if you are locked out of that too
If you do not remember your Apple ID password and you do not have your recovery key, you can recover your Apple ID account through Apple's website. Go to iforgot.apple.com on any device, enter your Apple ID email, and choose how you want to verify your identity — usually by answering security questions you set up when you created the account, or by receiving a code on a trusted phone number.
Once Apple confirms your identity, you can reset your Apple ID password. This process usually takes a few minutes, but if Apple needs to verify more information, it can take 3 to 5 business days. After your Apple ID password is reset, go back to your Mac login screen and use the method described in the first section above.
If you cannot answer your security questions and you do not have access to your trusted phone number, Apple can still help, but the recovery will take longer. You will need to provide additional proof of identity — usually a photo ID and a credit card you used with the account. Contact Apple Support through their website to start this process.
Erasing your Mac and starting fresh
If you have no Apple ID access, no recovery key, and no other administrator account on the Mac, you will need to erase the drive and reinstall macOS. This deletes everything on the computer unless you have a backup. Before you do this, check whether you have a Time Machine backup or an iCloud backup of your files — if you do, you can restore them after you set the Mac up again.
To erase and reinstall, restart your Mac and hold Command + R until you see the macOS Utilities window. Click Disk Utility, select your main drive, and click Erase. Choose a name for the drive and click Erase again. Once that finishes, close Disk Utility and click "Reinstall macOS." The Mac will read and install a fresh copy of the operating system, and you will set up a new account when it restarts.
This method takes 30 minutes to an hour depending on your internet speed. You will lose any files that were not backed up, so use this only after confirming you have no other way in.
What to do after you are back in
Once you have reset your password and logged back in, take a few minutes to prevent this from happening again. If you have not already, set up two-factor authentication on your Apple ID and save your recovery key somewhere you will remember — a password manager like 1Password or Bitwarden, a printed card in a drawer, or a note in a trusted person's safe. Write down the recovery key exactly as Apple shows it.
Consider also turning on FileVault encryption, which protects your files if someone else gains physical access to your Mac. You can turn this on in System Settings under Security & Privacy. If you ever need to reset your password again, you will have the recovery key ready and the process will take minutes instead of hours.
Frequently Asked Questions
Can I reset my password if my Mac is not connected to the internet?
Not through your Apple ID — that method requires internet to verify your identity with Apple. If another person with an administrator account is on the Mac, they can reset your password without internet. Otherwise, you will need to connect to Wi-Fi or ethernet first.
What if I see "This user account is managed by your organization"?
Your Mac is enrolled in a work or school system that controls your account. You cannot reset the password yourself. Contact your IT department or help desk — they have the ability to reset it for you or provide a temporary password.
How long does it take to reset my password through Apple?
If you use the question mark icon at the login screen and you know your Apple ID password, it takes about five minutes. If you need to recover your Apple ID account first through iforgot.apple.com, it usually takes a few minutes, but can take 3 to 5 business days if Apple needs to verify additional information.
Will resetting my password delete my files?
No. Resetting your login password through your Apple ID, a recovery key, or another administrator account keeps all your files intact. Only the erase-and-reinstall method deletes everything, and you would do that only as a last resort.
Can I use my iPhone to reset my Mac password?
Not directly. But if you have an iPhone signed into the same Apple ID, you can use it to reset your Apple ID password at iforgot.apple.com, and then use that new password at your Mac login screen. You can also use your iPhone to receive a verification code if Apple asks for one.