The fastest way back in depends on what you remember
If you have forgotten your Mac password, you have three main routes: use another administrator account on the same Mac, reset your password through your Apple ID, or use Recovery Mode to create a new administrator account. Which one works depends on whether you are the only person who uses the Mac, whether you set up an Apple ID during setup, and how much time you have. None of these routes requires you to erase the Mac or lose your files.
The key difference between these methods is what information you need to have on hand. If you remember your Apple ID password, the Apple ID route is usually fastest. If you do not remember that either, Recovery Mode is your backup — but it takes longer and requires you to restart the Mac.
Key Takeaways
- If another person with an administrator account uses your Mac, they can reset your password from System Settings without erasing anything.
- If you remember your Apple ID password, you can reset your Mac password at the login screen by clicking "Forgot password?" and following the prompts.
- If you do not remember your Apple ID password either, Recovery Mode lets you create a new administrator account, but the process takes 10 to 20 minutes and requires restarting your Mac.
- Two-factor authentication on your Apple ID makes password recovery slower because you must verify your identity on another device, but it also makes your account harder to break into.
Using another administrator account on the same Mac
If someone else with an administrator account uses your Mac, they can reset your password without you needing to remember anything. Have that person log in with their own password, then open System Settings (the gear icon in the Dock or Applications folder).
From System Settings, they should click "General" in the sidebar, then scroll down and click "Users & Groups" or "Users" depending on your macOS version. They will see a list of accounts. They should click your account name, then click the lock icon at the bottom left and enter their own administrator password to unlock the settings. Then they click "Reset Password" and create a new password for you. You can then log in with that new password and change it to something you prefer.
This method works on any recent macOS version and does not require internet or an Apple ID. It is the fastest option if another administrator is available.
Resetting your password through your Apple ID at the login screen
If you are the only person who uses the Mac but you remember your Apple ID password, you can reset your Mac password directly from the login screen. At the login screen, click "Forgot password?" below the password field. The Mac will ask you to enter your Apple ID email address.
Once you enter your Apple ID email, the Mac will send a verification code to the email address or phone number associated with your Apple ID account. If your Apple ID has two-factor authentication turned on, you will need to approve the request on another device (an iPhone, iPad, or another Mac) that is signed into the same Apple ID. After you verify, you can create a new Mac password and log in.
This method requires internet access and takes about 5 to 10 minutes if you have quick access to your email or another device. If your Apple ID uses two-factor authentication and you do not have access to your other devices, you will need to use Recovery Mode instead.
Creating a new account through Recovery Mode
If you do not remember your Apple ID password and no other administrator account exists on your Mac, Recovery Mode is your option. Recovery Mode is a special startup environment that lets you make changes to your Mac without logging in. To enter Recovery Mode, shut down your Mac completely, then turn it back on while holding Command and R together. Keep holding until you see the Apple logo or a spinning globe. The Mac will take 1 to 3 minutes to load Recovery Mode.
Once Recovery Mode loads, you will see a menu with several options. Click "Utilities" at the top, then click "Terminal." In the Terminal window, type the command resetpassword and press Enter. A password reset window will open. From there, you can select your account name and create a new password. After you set the new password, close the window, restart your Mac, and log in with the new password.
Recovery Mode works on any Mac with an internet connection (it downloads what it needs during startup). The whole process usually takes 15 to 20 minutes. After you log back in, you should update your Apple ID password if you do not remember it, so you do not get stuck this way again.
What to do if you do not remember your Apple ID password either
If you have forgotten both your Mac password and your Apple ID password, you still have options, but they take longer. You can reset your Apple ID password through Apple's account website on another device (a phone, tablet, or different computer). Go to iforgot.apple.com, enter your Apple ID email, and follow the steps to verify your identity and create a new password.
Once you have reset your Apple ID password, you can use the "Forgot password?" method at your Mac login screen as described above. Alternatively, you can use Recovery Mode to create a new administrator account, then log in and update your Apple ID password from System Settings.
If you do not have access to another device and do not remember either password, contact Apple Support. They can verify your identity and help you regain access to your account. This process can take a few days.
Preventing this from happening again
The easiest way to avoid being locked out is to write your passwords down in a find place — a locked drawer, a safe, or a password manager like Keychain (which comes built into macOS). If you use a password manager, make sure you remember the master password or keep a backup of it somewhere safe.
You should also make sure your Apple ID is set up and that you know the password. Your Apple ID is the fastest way back into your Mac if you forget your login password. If you have not set up an Apple ID yet, you can do so at appleid.apple.com.
Consider turning on two-factor authentication for your Apple ID. It makes password recovery slightly slower because you need another device to verify, but it makes your account much harder for someone else to break into.
Frequently Asked Questions
Will I lose my files if I reset my password?
No. Resetting your password does not erase your files, applications, or settings. Everything stays on your Mac. You will only lose access to encrypted files that were protected by your old password, but most Mac files are not encrypted that way.
Can I reset my password if my Mac is not connected to the internet?
If you use the Apple ID method at the login screen, you need internet to send and receive the verification code. Recovery Mode can work without internet if you have already downloaded the recovery tools, but it is slower. The administrator account method works without internet at all.
What if I see a message saying "account is locked" when I try to reset my password?
This usually means too many wrong password attempts were made. Wait 30 minutes and try again. If the problem continues, restart your Mac and try the Apple ID or Recovery Mode method instead.
Do I need to erase my Mac to regain access?
No. You should never need to erase your Mac to reset a forgotten password. If someone tells you that you do, they are either mistaken or trying to sell you a service you do not need. Use one of the methods above instead.
Can I use someone else's Mac to reset my password?
Yes, if you have access to another Mac or device. Go to iforgot.apple.com on that device, reset your Apple ID password, then use the new password to reset your Mac password at the login screen. You do not need to own the other device.