There are at least three ways to reset the login password of an account.

Using Reset Password.app on the recovery partition:

  1. Hold command-R on startup.
  2. Select Utilities > Terminal.
  3. Run resetpassword, which opens the Reset Password application.
  4. Select the volume and account and reset the password.

Using dscl in single user mode:

  1. Hold command-S on startup.
  2. Run mount -uw /.
  3. Run launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist in 10.7 or later or launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6 or earlier.
  4. Run dscl . passwd /Users/username password where username is the name of the account and password is the new password.
  5. Run reboot.

Creating a new admin account:

  1. Hold command-S on startup.
  2. Run mount -uw /.
  3. Run rm /var/db/.AppleSetupDone.
  4. Run reboot.
  5. Go through the steps of creating a new account.
  6. Reset the password of the old account from the Users & Groups preference pane.

If FileVault 2 is enabled, you need to enter a password to start up in single user mode, and the list of accounts in Reset Password.app will be empty, so none of these methods can be used.

None of the methods above resets the password of the login keychain. If automatic login is enabled, you can print the password of the login keychain by running a command like this in single user mode before resetting the login password:

sudo ruby -e 'key=[125,137,82,35,210,188,221,234,163,185,31];IO.read("/etc/kcpassword").bytes.each_with_index{|b,i|break if key.include?(b);print [b^key[i%key.size]].pack("U*")}'

Answer from Lri on Stack Exchange
🌐
Apple Support
support.apple.com › en-us › 102633
If you forgot your Mac login password - Apple Support
June 13, 2025 - In the Terminal window that opens, type resetpassword, then press Return. In the window that opens, choose a reset option, such as “I forgot my password” or “My password doesn't work when logging in.” Then click Next and follow the onscreen instructions.
🌐
Apple Community
discussions.apple.com › thread › 250578615
Resetting password from terminal - Apple Community
August 23, 2019 - Yes, you can use the "command + r" when starting up your mac to enter recovery mode and then open the terminal application and use the "resetpassword" script to reset an account password. One way to stop this is to turn on filevault on your computer. This will encrypt the entire hard drive ...
Discussions

Anyone know how to reset the password? There are some important files i need to access to.
CMD+R, terminal, resetpassword. That year it’s pretty easy. If it’s FileVault, you are stuck. https://www.hellotech.com/guide/for/how-to-reset-admin-password-on-mac More on reddit.com
🌐 r/mac
19
1
January 12, 2025
macos - How can I reset a Mac's password from Single User Mode? - Ask Different
A second way to reset the login password of an account is to use Reset Password.app from the recovery partition: Hold command-R on startup. Open Terminal from the Utilities menu. More on apple.stackexchange.com
🌐 apple.stackexchange.com
Only one Admin in Rec Mode Password Reset via Term?
It's also worth noting that there is a way to reset the password for all admin accounts, but it needs to be done from recovery mode. So, you can try booting your MacBook Pro into Recovery mode (by holding Command + R while booting) and open Terminal, then you can use the "resetpassword" command ... More on community.jamf.com
🌐 community.jamf.com
3
0
October 13, 2022
Locked out of password- no user account to reset! Help!! | MacRumors Forums
Press the power button while holding down Command-R. The Mac will boot into Recovery mode. ... Select Disk Utility and press Continue. Choose Utilities > Terminal. Enter resetpassword (all one word, lowercase letters) and press Return. More on forums.macrumors.com
🌐 forums.macrumors.com
April 6, 2017
People also ask

How can I retrieve my Mac password using Terminal?
To find your administrative password on a Mac using Terminal, perform the following:
Open Terminal on your Mac.
Type "sudo -s" and enter your current user password.
Enter "cat /var/log/secure."
Look for lines that start with "Password:". The characters following "Password:" represent your admin password.
🌐
dataperk.com
dataperk.com › kb › quick-guide-how-to-reset-mac-password-with-terminal-commands
Quick Guide: How to Reset Mac Password with Terminal Commands
How to reset your MacBook password when locked out?

You can reset your MacBook password with your Apple ID:

  1. 1. Make sure you are in the login window.
  2. 2. Enter the password up to three times, and then you will see the password reset option.
  3. 3. Click Reset it using your Apple ID.
  4. 4. Enter your Apple ID and the password, and then you can reset your password.
  5. 5. Click the account you want to reset the password.
  6. 6. Please enter the new password and verify it.
  7. 7. Now, you can restart your Mac and enter the new password.
🌐
easeus.com
easeus.com › computer instruction › reset mac password if you forgot the password [with four simple methods]
Reset Mac Password if You Forgot the Password [with Four Simple ...
How to reset the password on the MacBook air m2?

You can change the login password on MacBook Air in the System Preferences:

  1. 1. Choose the Apple menu and click System Preferences.
  2. 2. Then click Users and Groups.
  3. 3. Click Change Password.
  4. 4. Enter your old password and set the new one.
🌐
easeus.com
easeus.com › computer instruction › reset mac password if you forgot the password [with four simple methods]
Reset Mac Password if You Forgot the Password [with Four Simple ...
Top answer
1 of 2
1

There are at least three ways to reset the login password of an account.

Using Reset Password.app on the recovery partition:

  1. Hold command-R on startup.
  2. Select Utilities > Terminal.
  3. Run resetpassword, which opens the Reset Password application.
  4. Select the volume and account and reset the password.

Using dscl in single user mode:

  1. Hold command-S on startup.
  2. Run mount -uw /.
  3. Run launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plist in 10.7 or later or launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist in 10.6 or earlier.
  4. Run dscl . passwd /Users/username password where username is the name of the account and password is the new password.
  5. Run reboot.

Creating a new admin account:

  1. Hold command-S on startup.
  2. Run mount -uw /.
  3. Run rm /var/db/.AppleSetupDone.
  4. Run reboot.
  5. Go through the steps of creating a new account.
  6. Reset the password of the old account from the Users & Groups preference pane.

If FileVault 2 is enabled, you need to enter a password to start up in single user mode, and the list of accounts in Reset Password.app will be empty, so none of these methods can be used.

None of the methods above resets the password of the login keychain. If automatic login is enabled, you can print the password of the login keychain by running a command like this in single user mode before resetting the login password:

sudo ruby -e 'key=[125,137,82,35,210,188,221,234,163,185,31];IO.read("/etc/kcpassword").bytes.each_with_index{|b,i|break if key.include?(b);print [b^key[i%key.size]].pack("U*")}'

2 of 2
3

To reset password, You can force reseting admin password even if you forgot the password. This is not impacted to the installed application.

Steps:

  1. Boot Mac by pressing "command + R" until apple logo comes up which is "OSX Recovery" mode
  2. Go Utility Menu>Run Terminal
  3. Type "resetpassword" command
  4. Choose HDD and admin account which is initially created.

I'm quite new user for Mac so I'm not sure when it's implemented like this way but I heard old OSX has a menu in the recovery system(command + R) not like this way as I mentioned.

To install OSX, You can ask genius bar@apple store to install or you can install it via internet(Wired Lan) by pressing command+R option which is calls OSX recovery mode.

To backup the local disk, It's possible to backup local disk using the function called "Time Machine" on external drive and possible to restore.

FYI http://support.apple.com/kb/HT4718?viewlocale=en_US

Find elsewhere
🌐
JumpCloud
jumpcloud.com › home › blog › how to reset your mac password
4 Ways to Reset Your Mac Password - JumpCloud
... Under the Utilities menu bar item, choose Terminal (Figure 6). In the Terminal window that opens, type resetpassword and press the Return button to access the Reset Password ...
Published   July 10, 2024
🌐
EaseUS
easeus.com › computer instruction › reset mac password if you forgot the password [with four simple methods]
Reset Mac Password if You Forgot the Password [with Four Simple Methods]
September 17, 2025 - Step 4. Click "Utilities" and then choose "Terminal". Step 5. Open the Terminal, type in resetpassword, and press the Enter key. Step 6. Then you can reset the password and restart your Mac.
🌐
Dataperk
dataperk.com › kb › quick-guide-how-to-reset-mac-password-with-terminal-commands
Quick Guide: How to Reset Mac Password with Terminal Commands
July 18, 2024 - Q: What are the steps to reset ... Access “Utilities” from the Apple menu. Open “Terminal.” Type “resetpassword” (as a single word) and press “Return.” Choose your main hard drive and select your user ...
🌐
CNET
cnet.com › tech › computing › laptops › forgot your mac password? here are 4 easy ways to regain access
Forgot Your Mac Password? Here are 4 Easy Ways to Regain Access - CNET
April 11, 2025 - A new window will show up, waiting for you to enter a command. Type "resetpassword" as one word, without the quotes, and press Return. Close the Terminal window, where you will then find the Reset Password tool.
🌐
JustAnswer
justanswer.com › mac-computers › r4wdn-i-ve-forgotten-password-i-m-attempting-go.html
Resetting Your Mac Password: Step-by-Step Guide
Could you check your email inbox, ... if the reset email has arrived? ... 4.If you're prompted for an admin password, choose "Forgot all passwords?". If you're prompted to authenticate with your Apple ID, do so to continue. 5.You should now see a window with four options: Restore from Time Machine, Install macOS, Safari, Disk Utility. Don't choose any of these; instead, go to the menu bar at the top of the screen and click on Utilities. Then, choose Terminal...
🌐
Setapp
setapp.com › how-to › how-to-reset-admin-password-on-mac
How to reset admin password on Mac in a few simple steps
November 8, 2024 - In the Terminal window, type resetpassword and press Return. Choose the disk where your admin account is located and the account from the dropdown list. Then, enter your new password and confirm it.
🌐
NordPass
nordpass.com › blog › how to reset mac password
How to reset or change your Mac password | NordPass
Select “Terminal.” · Type “resetpassword” (a single word), and click “Return.” · Navigate to the main hard drive and select your user account. Reset your password and click “Save.” ·
🌐
HelloTech
hellotech.com › home › how to reset your admin password on a mac
How to Reset Your Admin Password on a Mac : HelloTech How
January 26, 2023 - Type “resetpassword” in the terminal window. Don’t use any space in between the words. Then hit Enter. This will open the Reset Password Assistant screen. Type your password and a hint.
🌐
MacRumors
forums.macrumors.com › macs › notebooks › macbook air
Locked out of password- no user account to reset! Help!! | MacRumors Forums
April 6, 2017 - Press the power button while holding down Command-R. The Mac will boot into Recovery mode. ... Select Disk Utility and press Continue. Choose Utilities > Terminal. Enter resetpassword (all one word, lowercase letters) and press Return.
🌐
MacKeeper
mackeeper.com › blog › mac tutorials › forgot your mac password? here’s how to reset it
Forgot Your Mac Password? Here’s How to Reset It
September 18, 2025 - In the Terminal line, type ‘resetpassword’. Select the volume with an admin account (usually it’s your main hard drive). Choose the account for which you want to reset the password. Enter a new password and retype it. Type the password hint and click Save. Shut down your Mac.
🌐
LastPass
blog.lastpass.com › posts › forgot-mac-password
Forgot Mac Password? Here's How to Reset It Easily - The LastPass Blog
December 4, 2024 - Type in “resetpassword” (one word) in the terminal window and hit Return. The Reset Password Assistant will open. Click on “Forgot all passwords?” and you’ll see a Reset Password window pop up.
🌐
Kandji
support.kandji.io › kb › reset-a-macos-user-password
Reset a macOS User Password
Intel processor: Turn on your Mac and immediately press and hold Command (⌘)-R until you see an Apple logo or other image. ... In Terminal, type resetpassword and press Return. At the Reset Password window, click Deactivate Mac, then click Deactivate to confirm.