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.apple.com › en-ca › 102633
If you forgot your Mac login password - Apple Support (CA)
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 12, 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
Is there a keyboard shortcut to reset a password on a Mac laptop?
es, the keyboard shortcut to reset a password on a Mac laptop is Control + Option + Fn + Delete (Ctrl + Option + Fn + Delete).
🌐
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
What should I do if I forget my Mac password?
If you forget your Mac password, you can reset it using your recovery key by following these steps:
After incorrectly entering your password up to three times, select the option to reset using your recovery key.
Enter your FileVault recovery key.
Input your new password details, then click "Reset 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
🌐
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 ...
🌐
YouTube
youtube.com › watch
Reset mac password terminal #reset mac password recovery mode - YouTube
Reset mac password terminal #reset mac password recovery mode #reset admin password mac terminal
Published   July 4, 2021
🌐
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.” ·
Find elsewhere
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

🌐
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.
🌐
YouTube
youtube.com › watch
How to reset your Mac login password | Apple Support - YouTube
If you forgot your Mac login password, we’ll show you how to reset it using your Apple Account. We’ll also teach you how to enter macOS Recovery and reset yo...
Published   June 24, 2025
🌐
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.
🌐
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.
🌐
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.