The fastest way back in depends on what you remember
If you can answer your security questions or access the email address linked to your Apple ID, you can reset your password without erasing your Mac. If you cannot reach that email or do not remember the answers, you will need to erase the Mac and set it up fresh — a longer process, but still possible without taking it to a repair shop.
The method you use depends on whether you are locked out of the login screen itself, or whether you are logged in but forgot the password you use to unlock System Preferences or install software. Those are two different problems with different solutions.
Key Takeaways
- If you remember your Apple ID email and password, you can reset your Mac password from the login screen without erasing anything.
- If you cannot access your Apple ID email, you will need to erase your Mac and set it up as new, which takes 30 minutes to an hour.
- If you are logged in but forgot the password for System Preferences, you can reset it through your Apple ID without erasing.
- Recovery Mode (Command-R at startup) is where you go to reset a password or erase and reinstall macOS.
- Do not restart your Mac repeatedly or force shut it down during password recovery — let each step finish, even if it takes several minutes.
Resetting your password from the login screen using your Apple ID
At the login screen, if you see a question mark icon or a message saying you can reset using your Apple ID, click that option. Enter your Apple ID email address and the password you use for that account. Apple will send a code to the email address or phone number linked to your Apple ID.
Open the email or check the phone number where the code arrived, then enter it on your Mac. You can now create a new password for your Mac login. This method does not erase anything on your computer — your files, applications, and settings stay exactly as they are.
If you do not see the Apple ID reset option at the login screen, or if you do not remember your Apple ID password, move to the next section.
Erasing your Mac and starting fresh if you cannot access your Apple ID
If you cannot reach the email linked to your Apple ID or do not remember the answers to your security questions, you will need to erase your Mac. This means you lose everything on it — files, applications, settings — and reinstall macOS from scratch. You will then set up a new user account and new password.
Restart your Mac and hold Command-R as it starts up. Keep holding until you see the Apple logo or a spinning globe. This takes you to Recovery Mode, where you can erase the drive and reinstall the operating system.
In Recovery Mode, click Utilities at the top, then Disk Utility. Select your main drive (usually called "Macintosh HD" or similar), click Erase, and confirm. Choose APFS as the format and click Erase again. This wipes the entire drive. Close Disk Utility when it finishes.
Go back to the main Recovery Mode window and click Reinstall macOS. Follow the prompts to read and install a fresh copy of macOS. This takes 20 to 40 minutes depending on your internet speed and Mac model. When it finishes, you will see the setup screen where you create a new user account and password.
Resetting your password if you are already logged in
If you can log into your Mac but forgot the password you need to change settings or install software, you do not need to erase anything. Open System Settings (or System Preferences on older Macs), then click General, then click Login Items or Users & Groups depending on your macOS version.
Look for an option that says "Change Password" or a lock icon next to your account name. Click it and enter your current password if prompted. If you cannot remember your current password, click the question mark or "Forgot password?" link. You will be asked to enter your Apple ID email and password, then a code sent to your Apple ID email or phone.
Once you verify your identity, you can create a new password right there without erasing or restarting.
What to do if you do not remember your Apple ID password either
Go to iforgot.apple.com on any device with internet access. Enter your Apple ID email address. Apple will ask you to verify your identity using either a recovery key (if you saved one), answers to your security questions, or a code sent to a trusted phone number or email.
If you do not have access to any of those, you will need to contact Apple Support directly. They can verify your identity through other means, though the process takes longer. You can reach them through apple.com/support or by calling Apple directly.
Once you reset your Apple ID password, you can use that new password to reset your Mac password using the methods described above.
Why your Mac asks for a password in the first place
Your Mac login password and your Apple ID password are separate things. The login password is what you type when you turn on your Mac or wake it from sleep. The Apple ID password is what you use to buy apps, access iCloud, and recover your Mac if you forget the login password.
Some older Macs do not have an Apple ID linked to the login account at all. If that is the case, you cannot reset the password from the login screen — you will need to erase and reinstall macOS instead.
Preventing this from happening again
Write your passwords down and store them somewhere safe — a notebook in a drawer, a safe, or a password manager like 1Password or Bitwarden. Do not rely on your browser to remember them, because a browser reset or a new computer means you lose access.
Set up a recovery key for your Apple ID and store it somewhere separate from your passwords. You can do this at appleid.apple.com under Security. A recovery key lets you reset your Apple ID password even if you lose access to your email and phone number.
Turn on FileVault encryption (in System Settings under Privacy & Security) so that if someone else gets your Mac, they cannot read your files. This does not help you recover a forgotten password, but it protects your data if the Mac is lost or stolen.
Frequently Asked Questions
Will I lose my files if I reset my password using my Apple ID?
No. If you reset your password from the login screen using your Apple ID, nothing is erased. Your files, applications, and settings stay on the Mac. Only if you cannot access your Apple ID and need to erase the drive will you lose everything.
How long does it take to erase and reinstall macOS?
The erase itself takes 5 to 10 minutes. Downloading and installing macOS takes 20 to 40 minutes depending on your internet speed. The entire process from restart to setup screen is usually 45 minutes to an hour. Do not interrupt it or force shut down your Mac during this time.
Can I reset my password without restarting my Mac?
Yes, if you are already logged in. Open System Settings, find your account, and look for a password reset option. You will need to verify your identity with your Apple ID. You only need to restart and use Recovery Mode if you are locked out of the login screen.
What if I see a message about a firmware password?
A firmware password is a separate security layer that prevents anyone from booting into Recovery Mode. If you set one and forgot it, you will need to contact Apple Support or take your Mac to an Apple Store. There is no way around it without professional help.
Can someone else reset my Mac password if they have my Apple ID?
Only if they also have access to your Apple ID email or a trusted phone number linked to your account. This is why keeping your Apple ID email find and enabling two-factor authentication is important. Two-factor authentication requires a code from a trusted device even if someone knows your password.