You can reset your Mac password without losing your files
If you cannot remember your password, you have several ways to get back into your Mac without erasing everything. The fastest route depends on whether you set up a recovery key, remember your Apple ID password, or have another administrator account on the machine. Most people can regain access in under an hour using one of these methods.
The key difference between these paths is what information you still have access to. If you remember your Apple ID email and password, that alone can unlock your Mac. If you do not, you will need either a recovery key you saved earlier or another admin account on the same computer. Each method works, but they take different amounts of time and require different setup steps.
Key Takeaways
- If you remember your Apple ID password, you can reset your Mac password through the login screen without needing any other information.
- A recovery key saved during Mac setup lets you reset your password in minutes, but only if you wrote it down or stored it somewhere safe.
- If another person has an administrator account on your Mac, they can reset your password from their own login without restarting the computer.
- Restarting into Recovery Mode (Command + R during startup) is the gateway to most password reset methods and takes about five minutes.
- If none of these options work, you will need to erase your Mac and set it up again, which means losing files unless you have a backup.
Using your Apple ID to reset the password
This is the fastest method if you remember your Apple ID email address and password. At the Mac login screen, click the question mark or "Reset Password" button. You will see a prompt asking for your Apple ID. Type in the email address you use for your Apple account, then click the arrow to continue.
Apple will send a verification code to the email address or phone number linked to your Apple ID. Check your email or phone for this code, then type it into the Mac. Once you verify, you can create a new password right there on the login screen. Your Mac will unlock when ready, and you can start using it with the new password.
This method works even if you have not set up a recovery key. The only requirement is that your Apple ID is active and you can receive messages or emails at the address connected to it. If your Apple ID email is also the email you forgot the password for, you will need to use a different method.
Using a recovery key if you saved one
When you first set up your Mac or turned on two-factor authentication for your Apple ID, you may have received a recovery key — a long string of letters and numbers that looks like XXXX-XXXX-XXXX-XXXX-XXXX-XXXX. If you saved this somewhere safe, it is the fastest way to reset your password.
Restart your Mac and hold Command + R as it boots up. Keep holding until you see the Apple logo or a spinning globe. This takes you into Recovery Mode. Once there, click Utilities in the menu bar, then Terminal. Type resetpassword and press Enter. A password reset window will open. Select your user account from the dropdown, then click the Reset Password button.
You will be asked for your recovery key. Paste or type the key exactly as you have it saved. Once you enter it correctly, you can create a new password. The Mac will restart and you can log in with your new password. This entire process usually takes five to ten minutes if you have the recovery key nearby.
Asking another administrator to reset it for you
If someone else has an administrator account on your Mac, they can reset your password without restarting the computer. Have them click the Apple menu, go to System Settings (or System Preferences on older Macs), then find Users & Groups or Users & Accounts. They should click the lock icon in the bottom left and enter their own password to unlock the settings.
They will see a list of user accounts. They should click your account, then click the "Reset Password" button. A new password window will appear. They can set a temporary password for you, which you can change to something you prefer the next time you log in. You do not need to restart the Mac for this to work.
This method only works if the other person has administrator privileges on the Mac. If they have a standard user account, they will not see the Reset Password button. Also, this person will be able to see that a password reset happened, so it is not a hidden process.
Resetting your password through Recovery Mode without a recovery key
If you do not have a recovery key and cannot use your Apple ID, you can still try the password reset tool in Recovery Mode, but you will need to answer security questions you set up when you created your account. Restart your Mac and hold Command + R during startup. Once you see the Recovery Mode menu, click Utilities, then Terminal, and type resetpassword.
Select your user account from the dropdown. Instead of entering a recovery key, click "Reset using security questions." You will be asked the questions you answered when you set up your Mac — these might be about your birthplace, a pet's name, or another personal detail. Answer them correctly and you can create a new password.
The challenge with this method is remembering the exact answers you gave years ago. If you cannot recall them, this path will not work. If you get them wrong three times, the tool will lock you out temporarily. In that case, you will need to try a different method or wait several hours before trying again.
What happens if none of these methods work
If you cannot remember your Apple ID password, do not have a recovery key, cannot answer your security questions, and have no other administrator on the Mac, you will need to erase the computer and set it up again. This is a last resort because it removes all files, photos, and programs from the Mac unless you have a backup.
To do this, restart into Recovery Mode (Command + R during startup) and click Utilities, then Disk Utility. Select your main drive and click Erase. Choose a format (APFS is standard for newer Macs) and confirm. Once the drive is erased, quit Disk Utility and the Mac will walk you through setup as if it were brand new.
Before you erase, check whether you have a Time Machine backup or iCloud backup of your files. If you do, you can restore your files after setup is complete. If you do not have a backup, the files will be gone permanently. This is why setting up a recovery key and keeping backups are important steps to take right after you buy a Mac.
How to prevent this from happening again
Once you regain access to your Mac, take a few minutes to set up protection against this situation in the future. Go to System Settings, click your name at the top, then Password & Security. Make sure two-factor authentication is turned on for your Apple ID. If you see an option to view or save your recovery key, write it down and store it somewhere safe — a notebook in a drawer, a password manager, or a trusted person's email.
Also turn on Time Machine backups. Click System Settings, then General, then Time Machine. Click "Add Backup Disk" and choose an external drive or network storage. Time Machine will back up your entire Mac automatically every hour. If something goes wrong in the future, you can restore your files even if you have to erase the drive.
Consider using a password manager like iCloud Keychain, 1Password, or Bitwarden to store your passwords securely. These tools can generate strong passwords and remember them for you, so you only need to remember one main password. Many people forget their Mac password because they use the same password everywhere and forget it when they have not typed it in months.
Frequently Asked Questions
Can I reset my Mac password if I do not have internet?
Yes. The recovery key method and the security questions method both work offline. You do not need internet to restart into Recovery Mode or use the resetpassword tool. However, if you want to use your Apple ID to reset the password, you will need internet to receive the verification code.
Will resetting my password delete my files?
No. Resetting your password through any of these methods keeps all your files, photos, and programs intact. Only erasing the drive removes files, and that is a last resort if none of the other methods work.
How long does it take to reset a Mac password?
If you have a recovery key or remember your Apple ID password, you can reset it in five to fifteen minutes. If you need to answer security questions, it may take longer depending on how quickly you remember the answers. Erasing and setting up the Mac again takes one to two hours.
What if I forgot my Apple ID password too?
You can reset your Apple ID password at iforgot.apple.com using your Apple ID email address. Apple will send a verification code to your email or phone. Once you reset your Apple ID password, you can use it to reset your Mac password through the login screen.
Can I use my fingerprint or face to unlock my Mac if I forgot the password?
No. Touch ID and Face ID on Mac require your password to work. If you cannot remember your password, you cannot use biometric unlock. You will need to use one of the password reset methods described above to regain access.