There are at least three ways to reset the login password of an account.
Using Reset Password.app on the recovery partition:
- Hold command-R on startup.
- Select Utilities > Terminal.
- Run
resetpassword, which opens the Reset Password application. - Select the volume and account and reset the password.
Using dscl in single user mode:
- Hold command-S on startup.
- Run
mount -uw /. - Run
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plistin 10.7 or later orlaunchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plistin 10.6 or earlier. - Run
dscl . passwd /Users/username passwordwhereusernameis the name of the account andpasswordis the new password. - Run
reboot.
Creating a new admin account:
- Hold command-S on startup.
- Run
mount -uw /. - Run
rm /var/db/.AppleSetupDone. - Run
reboot. - Go through the steps of creating a new account.
- 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*")}'
Anyone know how to reset the password? There are some important files i need to access to.
macos - How can I reset a Mac's password from Single User Mode? - Ask Different
Only one Admin in Rec Mode Password Reset via Term?
Locked out of password- no user account to reset! Help!! | MacRumors Forums
How can I retrieve my Mac password using Terminal?
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.
How to reset your MacBook password when locked out?
You can reset your MacBook password with your Apple ID:
- 1. Make sure you are in the login window.
- 2. Enter the password up to three times, and then you will see the password reset option.
- 3. Click Reset it using your Apple ID.
- 4. Enter your Apple ID and the password, and then you can reset your password.
- 5. Click the account you want to reset the password.
- 6. Please enter the new password and verify it.
- 7. Now, you can restart your Mac and enter the new password.
How to reset the password on the MacBook air m2?
You can change the login password on MacBook Air in the System Preferences:
- 1. Choose the Apple menu and click System Preferences.
- 2. Then click Users and Groups.
- 3. Click Change Password.
- 4. Enter your old password and set the new one.
Videos
There are at least three ways to reset the login password of an account.
Using Reset Password.app on the recovery partition:
- Hold command-R on startup.
- Select Utilities > Terminal.
- Run
resetpassword, which opens the Reset Password application. - Select the volume and account and reset the password.
Using dscl in single user mode:
- Hold command-S on startup.
- Run
mount -uw /. - Run
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plistin 10.7 or later orlaunchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plistin 10.6 or earlier. - Run
dscl . passwd /Users/username passwordwhereusernameis the name of the account andpasswordis the new password. - Run
reboot.
Creating a new admin account:
- Hold command-S on startup.
- Run
mount -uw /. - Run
rm /var/db/.AppleSetupDone. - Run
reboot. - Go through the steps of creating a new account.
- 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*")}'
To reset password, You can force reseting admin password even if you forgot the password. This is not impacted to the installed application.
Steps:
- Boot Mac by pressing "command + R" until apple logo comes up which is "OSX Recovery" mode
- Go Utility Menu>Run Terminal
- Type "resetpassword" command
- 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
Once you mount the file system, you should be able to use passwd username and then put in the password twice.
Try loading com.apple.opendirectoryd.plist instead.
- Hold command-S on startup.
- Run
mount -uw /. (fsck -fyis not necessary.) In 10.7 and later, run:
launchctl load /System/Library/LaunchDaemons/com.apple.opendirectoryd.plistor in 10.6 and earlier:
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist- Run
passwd usernameand reset the password. - Run
reboot.
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.
- Run
resetpassword, which opens the Reset Password application. - Select the volume and account and reset the password.
A third way is to create a new admin account:
- Hold command-S on startup.
- Run
mount -uw /. - Run
rm /var/db/.AppleSetupDone. - Run
reboot. - Go through the steps of creating a new account.
- Reset the password of the old account from the Users & Groups preference pane.
None of these options resets the password of the login keychain.
If FileVault 2 is enabled, you have to enter a password to start up in single user mode, and you can't use Reset Password.app to reset the password of an account.