The fastest way: use your Apple ID

If you remember your Apple ID password, you can reset your Mac login password from the login screen itself without needing another computer or external drive. This is the quickest route for most people.

At the login screen, click the question mark icon or "Forgot password?" link below the password field. Enter your Apple ID email address when prompted. Your Mac will send a reset code to that email address — check the inbox associated with your Apple ID account. Enter the code on your Mac, then create a new login password. You can use the Mac when ready after.

This method works only if you set up your Mac account with an Apple ID originally. If you created a local account without an Apple ID, or if you do not remember your Apple ID password, you will need to use a different method.

Key Takeaways

  • Your Apple ID is the fastest password reset route if you remember that password and set up your Mac account with one originally.
  • If you do not have an Apple ID or cannot access it, you can reset your password using another administrator account on the same Mac.
  • Recovery mode lets you create a new password if no other administrator account exists, but requires you to verify your identity with your Apple ID or security questions.
  • If you cannot access any of these methods, you will need to erase your Mac and reinstall macOS, which removes all data on the drive.

Using another administrator account on the same Mac

If your Mac has a second administrator account, you can log in with that account and reset the forgotten password from System Settings. This works whether or not you remember your Apple ID.

Log in with the other administrator account. Open System Settings and go to General, then Users & Groups (or Users & Accounts, depending on your macOS version). Click the lock icon in the bottom left and enter that administrator account's password. Find your account in the list on the left, click it, and look for a "Reset Password" button. Enter your new password twice to confirm it, then close System Settings. You can now log in with your new password.

This method is straightforward but requires that you have access to another administrator account. If you are the only person who uses the Mac, or if all other accounts are standard (non-administrator) accounts, you will need to use Recovery mode instead.

Recovery mode if no other administrator account exists

Recovery mode is built into every Mac and lets you reset a password without needing another account. Shut down your Mac completely. Turn it back on and when ready hold Command and R together until you see the Apple logo or a spinning globe. Keep holding until the macOS Utilities window appears — this usually takes 30 seconds to 2 minutes.

From the Utilities window, click Utilities in the menu bar at the top, then select Terminal. In the Terminal window, type resetpassword and press Enter. A password reset window will open. Select your Mac account from the dropdown menu, enter your new password twice, and click Reset Password.

After you reset the password, close Terminal and restart your Mac. You should be able to log in with your new password. If Terminal asks you to verify your identity before allowing the reset, you will need to answer security questions you set up when you created your account, or enter your Apple ID password if you have one linked to the account.

What to do if you cannot remember your Apple ID password either

If you are stuck in Recovery mode and cannot remember your Apple ID password, you can answer your security questions instead. When Recovery mode asks for verification, select "Answer security questions" and provide the answers you set up originally. These are questions like "What was the name of your first pet?" or "What city were you born in?"

If you do not remember the answers to your security questions, you will need to recover your Apple ID password separately. Visit iforgot.apple.com on another device, enter your Apple ID email address, and follow Apple's account recovery process. This can take several days if you need to verify your identity through additional steps. Once you have regained access to your Apple ID, you can use that password in Recovery mode to reset your Mac login password.

Complete data erasure as a last resort

If you cannot access Recovery mode, do not have another administrator account, cannot remember your Apple ID password, and cannot answer your security questions, your only option is to erase your Mac and reinstall macOS. This removes all files, programs, and settings from your drive.

You will need another Mac or a USB drive with macOS installed on it. If you have access to another Mac, you can create a bootable installer using the macOS installer from the App Store. Insert the USB drive into your locked Mac, restart it while holding Option, and select the installer drive. Follow the on-screen steps to erase the drive and reinstall macOS. You will be able to create a new account during setup.

This method should be your last choice because it destroys all data on the drive. Before you reach this point, contact Apple Support — they can sometimes verify your identity through other means and provide additional recovery options.

Preventing this problem in the future

Once you have regained access to your Mac, take steps to avoid being locked out again. Set up an Apple ID on your account if you have not already — go to System Settings, click your account name at the top, and follow the prompts to link an Apple ID. This gives you a password reset option directly from the login screen.

Write down your security questions and answers in a safe place, such as a password manager or a locked drawer. If you use a password manager like 1Password or Bitwarden, store your Apple ID password there as well. Consider creating a second administrator account for a trusted family member — this gives you a backup way to reset your password if you forget it.

Frequently Asked Questions

Can I reset my password if my Mac is not connected to the internet?

You can use Recovery mode and Terminal without an internet connection. However, if Recovery mode asks you to verify your identity using your Apple ID, you will need internet access to complete that step. If you are offline, try answering your security questions instead.

Will resetting my password delete my files?

No. Resetting your login password through any of these methods leaves your files, programs, and settings untouched. Only the complete data erasure method removes files, and that is a last resort.

How long does it take to reset a password in Recovery mode?

The actual reset takes less than a minute once you are in the password reset window. Getting into Recovery mode takes 30 seconds to 2 minutes depending on your Mac model. If you need to recover your Apple ID password first, that can take several days.

What if I see an error message in Terminal?

The most common error is "command not found" — this usually means you typed the command incorrectly. Make sure you typed resetpassword exactly as shown, with no spaces or capital letters. If you see a different error, restart your Mac and try Recovery mode again from the beginning.

Can someone else reset my password without my permission?

No. Every password reset method requires either your Apple ID password, answers to your security questions, or access to another administrator account on that specific Mac. Someone cannot reset your password remotely or without physical access to the Mac.