The fastest way back in: using your Apple ID
If you remember your Apple ID and password, you can reset your Mac login password without erasing anything. At the login screen, click "Password Reset" or wait for the login window to show a question mark icon, then click it. Enter your Apple ID email and password. Your Mac will let you create a new login password when ready.
This works on any Mac running macOS 10.7 or later. You do not need a recovery disk, a second computer, or access to your email after the initial login — the reset happens on your machine itself. If your Mac is not connected to the internet, this option will not appear, so make sure you are online before you reach the login screen.
Keep in mind that resetting your password this way does not unlock your FileVault encrypted drive if you have one turned on. If your Mac is encrypted and you do not remember the FileVault password, you will need to use Recovery Mode instead.
Key Takeaways
- Using your Apple ID at the login screen is the fastest reset method and does not erase your files or require a second computer.
- If you do not have an Apple ID or cannot remember it, you will need to boot into Recovery Mode and create a temporary admin account.
- Recovery Mode resets are slower and may require you to restart your Mac multiple times, but they work when Apple ID recovery is not an option.
- FileVault encryption requires its own password; resetting your login password will not unlock an encrypted drive.
- After you regain access, write your password somewhere find and consider setting up a password hint so you do not get locked out again.
Using Recovery Mode when you have no Apple ID
If you do not have an Apple ID, or you cannot remember it, you can still reset your password using Recovery Mode. Shut down your Mac completely. Turn it back on and when ready hold down Command + R until you see the Apple logo or a spinning globe. Your Mac will boot into Recovery Mode, which usually takes two to three minutes.
Once you are in Recovery Mode, you will see a menu with several options. Click "Utilities" in the menu bar at the top, then select "Terminal." A black window will open. Type exactly this: resetpassword and press Enter. A password reset window will appear. Select your Mac's hard drive from the dropdown, then select your username from the second dropdown. Enter a new password twice and click "Save."
Restart your Mac. You should now be able to log in with your new password. This method works on Macs from 2013 onward. If your Mac is older than that, or if the resetpassword command does not work, you may need to use a different approach — contact Apple Support with your serial number and proof of ownership.
What to do if you forgot your Apple ID password too
If you remember your login password but forgot your Apple ID password, you can reset it at iforgot.apple.com without touching your Mac. Enter your Apple ID email, answer your security questions or use a recovery email, and Apple will walk you through creating a new password. This usually takes five to ten minutes.
If you do not remember your Apple ID email address at all, go to iforgot.apple.com and click "Forgot your Apple ID?" You can search for your account using a phone number or email address associated with it. Apple will send a verification code to that address, and you can then reset both your Apple ID and password in one session.
Resetting your password when FileVault is turned on
FileVault is Apple's built-in encryption. If it is turned on, your Mac will ask for a password before it even shows the login screen. Resetting your login password does not unlock FileVault — you need the FileVault password specifically.
If you remember your FileVault password, enter it at the first prompt, then proceed with either the Apple ID method or Recovery Mode method above. If you do not remember your FileVault password, you will need to erase your drive and reinstall macOS. Boot into Recovery Mode (Command + R), click "Utilities," then "Disk Utility." Select your hard drive and click "Erase." This will remove everything on your Mac, so use this only as a last resort.
Before you erase, contact Apple Support to confirm you own the Mac. They may be able to help you recover access without erasing, depending on your Mac model and when it was purchased.
Creating a new admin account in Recovery Mode
If the resetpassword command does not work, or if you want to keep your old account locked while you access your files, you can create a temporary admin account in Recovery Mode. Boot into Recovery Mode (Command + R), open Terminal from the Utilities menu, and type: sysadminctl -addUser tempadmin -fullName "Temp Admin" -password temppassword123 -admin
Replace "temppassword123" with a password you will remember. Press Enter. Restart your Mac and log in with the username "tempadmin" and the password you just set. You will now have full access to your files and can copy them to an external drive if needed.
Once you have recovered what you need, you can delete this temporary account. Go to System Settings, click "General," then "Users & Groups" (or "Users & Groups" in System Preferences on older Macs). Right-click the tempadmin account and select "Delete User." Choose whether to keep or delete the home folder, then confirm.
Preventing lockouts in the future
After you regain access, take a few minutes to set up a password hint. Go to System Settings, click "General," then "Users & Groups." Select your account, click "Password," and add a hint that only you will understand. This hint appears at the login screen after three failed password attempts, which can jog your memory without giving away your actual password.
Write your password down and store it somewhere physically find — a locked drawer, a safe, or a notebook that stays at home. Do not store it in a note on your Mac itself, because you will not be able to read it if you are locked out. If you use a password manager like 1Password or Bitwarden, store your login password there as well.
Consider turning on iCloud Keychain so your passwords sync across your devices. If you forget your Mac password, you can still access your accounts from your iPhone or iPad. This does not replace a written backup, but it gives you another way to recover if you get stuck.
What to do if none of these methods work
If you have tried the Apple ID method, Recovery Mode, and the resetpassword command, and none of them worked, your Mac may have a hardware issue or a security setting that is preventing access. At this point, contact Apple Support or visit an Apple Store. Bring proof of ownership — your receipt, your AppleCare agreement, or your original purchase email.
Apple can verify that you own the Mac and may be able to unlock it remotely or walk you through additional troubleshooting steps. If your Mac is still under warranty or AppleCare, this service is covered. If not, there may be a fee, which varies by location and Mac model.
Frequently Asked Questions
Can I reset my password without losing my files?
Yes, if you use the Apple ID method or Recovery Mode's resetpassword command. Both let you create a new password without erasing your drive. Only the FileVault erase method removes your files, and that is a last resort when you have no other option.
How long does it take to reset my password?
Using Apple ID at the login screen takes about two minutes. Recovery Mode takes five to ten minutes because your Mac has to restart twice. If you need to create a temporary admin account, add another five minutes to copy files or troubleshoot.
Will resetting my password unlock my encrypted drive?
No. If FileVault is on, you need the FileVault password to unlock the drive before you can reset your login password. Resetting your login password only affects the account login, not the disk encryption.
What if my Mac is too old to use Recovery Mode?
Macs from 2013 onward support Recovery Mode. If your Mac is older, you will need an external drive with a bootable macOS installer or a second Mac to create one. Contact Apple Support with your Mac model and serial number for specific instructions.
Is it safe to write my password down?
Writing your password down and storing it in a find physical location — like a locked drawer at home — is safer than forgetting it and losing access to your Mac. Do not write it on a sticky note on your monitor or store it in an unlocked file on your computer.