Reset Root or admin password on Mac OS X

PCMacReset Root or admin password on Mac OS X

Forgot Admin account / Root (System Administrator) Password on Mac OS X ?

Let’s say you totally forgot Root (System Administrator) or an Admin account password to log on to your Mac. Or maybe you purchased a used Mac from someone else and they’ve got it locked down. How would you use this Mac now?You will need to reset its admin account password. There are numerous ways to reset admin or root password with no OS X discs.You don’t need to worry to get the recovery disk to reset the password.Normally we reset the admin password using terminal command “Resetpassword” in recovery mode which is available on Mac OS X 10.6.8 and above but OS X 10.6.7 or below does not have recovery partition so we need an OS X installation Disk to get the terminal outside of the Installed OS X to reset the Apple OS X root or admin password. Even if you’re running OS X 10.7 and above check if you have a working recovery partition before moving forward.

The information in this post is presented with the intention to help people with legitimate reasons for resetting their Mac OS X password. A few of the methods floating around the Mac community have been compiled here in one easy-to-reference place. System admins responsible for supporting entire organizations and users who bought used Macs are the folks most likely to benefit from this.Using this article you can reset Mac OS X Root password or any of the Admins account password and then you can login with admin or Root account(System Administrator) to reset password for any of the other accounts.

If you are running macOS Sierra or above then read the new post on How to Reset Forgotten macOS Sierra Password?

Steps to reset the Admin password in OS X 10.11, 10.10, 10.9, 10.7, 10.6, 10.5, 10.4

A. Reset Root or admin password in OS X 10.7 – 10.11:

Starting with 10.7 Lion,
 which was sold only through the Mac App Store, the installer disc was replaced by the Recovery partition, a small chunk of the boot disk that contains a stripped-down version of Mac OS X and essential utilities.
The passwords for all accounts on OSX 10.7 and above, including admin and standard user accounts can be reset and changed when booted from the Recovery Partition on OS X:

1. Boot into Recovery Partition to Reset Root/Admin Password Using Terminal

Reboot into the Recovery Drive by holding down the ‘command’ + ‘r’ keys on the keyboard during the start up process when you see the start up screen (Gray Screen with Apple Logo) you can let go off the keys. When the machine boots eventually you will see the OS X Utilities screen.

Reset Root or admin password on Mac OS X from Recovery Mode
Recovery Mode-Reset Root or admin password on Mac OS X

Go to the Utilities menu and select Terminal.

Reset Root or admin password on Mac OS X-Using Terminal
Reset Root or admin password on Mac OS X-Using terminal


At the prompt type ‘resetpassword’  and hit Enter/Return Key.

This launches a new Reset Password screen at the back,Click on the newly opened Window where you can select the Volume Hard Drive, containing the user account.select the Volume Hard Drive in the top part of the window pane, then select the user account from drop down list and then type the New password for this account and confirm the password by typing again, then click save to change the password for selected user.

Reset Root or admin password from recovery mode
Select the Volume hard drive containing the user Account
Select the Admin Account or Root to reset its Password
Select the Admin Account or Root to reset its Password

Note: Do not click on the Reset button at the bottom because that is used to reset permissions and access control lists of all the files and folder in selected user’s home directory.If you by mistake click on that its gonna take a long time to repair the permissions.

What if the Reset Password Window does not show any hard drive Volume?

Reset Root or admin password on Mac OS X when the FileVault is turned On

Now if you come to this Reset Password window and you don’t see any hard drive icon then how would you reset the password?

Reset Root or admin password When FileVault is Turned On
Reset Root or admin password on Mac OS X When FileVault is Turned On


This is most likely the result of FileVault encryption which is turned on.The drive is locked using FileVault encryption and cannot be accessed until you unlock the drive. This may be set to a master password you created or any of your old passwords. You may want to try older passwords to see if any of those work.

To unlock the drive:

  1. Boot into the recovery mode
  2. Launch Disk Utility
  3. Select the drive in disk utility ideally named Macintosh HD.
  4. Click unlock near the top of the disk utility window.
  5. Type the Filevault Password if you remember otherwise try any of the older passwords to see if that work.
  6. If you have the recovery key for FileVault you can try that either to unlock the partition.
Unlock the hard drive first to reset Root or admin password when FileVault is ON.
Unlock the hard drive first to reset Root or admin password When Filevault is ON.
 

once you have unlocked the hard drive, Click on the Disk Utility menu on top left hand corner and select quit.Now go back to step 1 to reset the password from terminal.You should see the hard drive Volume icon now.

2. Use Your Apple ID to Reset Password

Starting with 10.7 Lion, it also became possible to use your Apple ID to reset your Admin account password. It’s turned on by default in the Users & Groups pane of System Preferences, but double-check to make sure.

Reset Apple Mac OS X Root or admin password using Apple ID
Reset Apple Mac OS X Root or admin password using Apple ID

When this feature is active, if you enter the Admin password incorrectly at the login window three times, a popover appears with the password hint and a message saying “If you forgot your password, you can reset it using your Apple ID.” Here’s how to do that:

Reset forgotten Root or admin password using Apple ID
Reset forgotten Root or admin password using Apple ID
    1. Click the arrow icon to open the Reset Password dialog.
Reset Mac OS X Root or admin password using Apple ID
Reset Apple Mac OS X Root or admin password using Apple ID
  1. Enter your Apple ID and its password, then click Reset Password to proceed.
  2. Enter a new administrator password, verify it, and fill in the Hint field so that you’ll get a memory trigger the next time you forget.
    Reset Mac OS X Root or admin password using Apple ID
    Reset Apple Mac OS X Root or admin password using Apple ID
  3. Click Reset Password, and you’re done.

B. Reset Root or Admin user password in OS X 10.6, 10.5 and 10.4

Mac OS X 10.6 and earlier did not come with Recovery partition so you will need to use the installation Disk to boot Mac from installation Media and then get to the terminal just like in recovery mode to reset password.But there are other simple methods to reset password that does not require an Installation Disk.

This only works for Apple OS X 10.6 Snow Leopard.

1: Reboot the computer and hold down the Command and S keys together to enter single user mode.

You will need a wired/built in keyboard, a PC one will work, the Windows key is the command key.
(if a lock appears and a password request, there is a firmware password, you have to find it or take it to Apple to fix it before you can reset your root or admin password.)

Reset Mac OS X Root or admin password using Single user Mode
Reset Mac OS X Root or admin password using Single user Mode

2: When you get control, type fsck -fy and press enter, it will take a bit to finish.Wait until it finishes and you get the Prompt back.

3: Next type mount -uw /  (there is a space before and after -uw) this mounts the drive.

Reset Mac OS X Root or admin password using Single user Mode
Mount the Volume HD to Reset Root or admin password

4: Next type ls /Users this will list the Users on the machine so you can get the name of the user whom you want to reset the password for.

Find the user accounts in Single User Mode
Reset Apple Mac OS X Root or admin password- Find out all the available User Account

5: Next type passwd username (where username is the name of the account for example to reset password of user “anuj” type passwd anuj)
6: Enter the new password twice, you won’t see anything.
7: Then type command “Exit” or “Reboot” and hit enter to restart the Mac.
8. After you restart and login you will be getting a message related to Keychain so you could create a new key chain here.

To fix Keychain password related issues follow these links.
https://support.apple.com/kb/ts1544 and https://support.apple.com/kb/HT1631

Reset Apple OS X 10.5 Leopard & 10.6 Snow Leopard password

Reset forgotten root or admin Password in Apple OS X 10.5 and OS X 10.6
  1. Power on or restart your Mac.
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. This step is optional, but it’s a good idea because it checks the consistency of the hard disk before moving on. At the prompt, type fsck -fy and press Enter/Return. Wait for the checks to complete before going to the next step.
  4. Type mount -uw / and press Enter.
  5. Type launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist and press Enter.
Reset Mac OS X Root or admin password in OS X 10.5 and 10.6
Reset Mac OS X Root or admin password in OS X 10.5 and 10.6

6. Type ls /Users and press Enter. This lists all of the usernames on the computer – helpful if you don’t know or remember what these are.

7. Type dscl . -passwd /Users/username password and replace “username” with one of the users displayed in the previous step. Replace “password” with a new password of your choice. Press Enter.
Type reboot and press Enter.

If you get this error message, you may ignore it:
launchctl: Couldn’t start (“/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist”):

No such file or directory nothing found to load

Reset 10.4 Tiger password

Reset forgotten root or admin Password in Apple OS X 10.4

  1. Power on or restart your Mac.
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. Type sh /etc/rc and press Enter/Return.
  4. Type passwd username and replace “username” with the short name of the user account for which you’d like to reset the password.
  5. Type your desired password and press Enter. It won’t show itself on the screen, so be careful what you type. You will most likely have to enter it again to confirm.
  6. Type reboot and press Enter.

Reset Password by Tricking your Mac into creating a new user account

This another easiest Apple Mac OS X Password reset method which works on all the version of OS X.

  1. Power on or restart your Mac (should work for any Mac OS X system).
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. This step is optional, but it’s a good idea because it checks the consistency of the hard disk before moving on. At the prompt, type fsck -fy and press Enter/Return. Wait for the checks to complete before going to the next step.
  4. Type mount -uw / and press Enter.
  5. Type rm /var/db/.AppleSetupDone and press Enter.
  6. Type shutdown -h now or reboot and press Enter.
Reset Mac OS X Root or admin password by deleting AppleSetupDone File
Reset Mac OS X Root or admin password by deleting AppleSetupDone File
This method of resetting your Mac’s password requires some additional explanation. Rather than simply changing the password like the previous two methods do, this one fools the operating system into believing it has never been started before. This means when you restart the machine, it will take you through the entire setup & registration process all over again. Do not worry, all of your pre-existing data is still available. Just continue with this Setup assistant process and do not choose the option to transfer or migrate information to the Mac.Following are the screenshots of Apple setup Assistant.
Reset Apple Mac OS X Root or admin password
Apple Mac Root / Admin Password reset-Setup Assistant Screen-1

 

Reset Apple Mac OS X Root or admin password
Apple Mac Root / Admin Password reset-Setup Assistant Screen-2
Reset Apple Mac OS X Root or admin password
Apple Mac Root / Admin Password reset-Setup Assistant Screen-3

 

Reset Apple Mac OS X Root or admin password
Reset Root or admin password on Mac-Setup Assistant Screen-4
Reset Apple Mac OS X Root or admin password
Reset Root or admin password on Mac-Setup Assistant Screen-5

Once you’re done, log in with your new admin account and go to System Preferences > Accounts. You may have to click on the lock icon in the lower-left corner before making changes here. You should see your original user account(s) in the left column. Try clicking on one of them to change the password. You should be able to successfully log in to that account now and access all of your files and programs.

C. Reset Root / Admin Password – with installer CD/DVD

Reset Password For Mac OS X Snow Leopard (10.6), Leopard (10.5), and before with install DVD/CD:

Snow leopard is the only OS X version which is still available to buy from Apple and Amazon, you can buy the Snow Leopard DVD from this link – Buy Snow Leopard

  1. Insert the OS X bootable DVD into the Mac and restart or start your Mac.
  2. Hold down the “C” key at system start to boot from CD / DVD.
  3. Select your language preferences and then under the “Utilities” menu select “Password Reset” (it may say “Reset Password” instead, depends on the version of Mac OS X)
    Apple Password reset using install DVD
    Reset Root or admin password from DVD
  4. Select the hard disk which contains the user account whose password you want to reset to, then select the username and type the new password and confirm password by re-entering the same and click on Save just as you did in step 1 to reset the password from terminal.
    Apple Password reset using Install DVD
    Reset Root or admin password for Mac using Install DVD
  5. Reboot as usual from the hard drive, and login to your account with the new password.

That should cover it! As always, remember messing with single-user mode and Terminal is risky and may lead to trouble if you make mistakes.Mentioned above were some easiest and effective way of resetting Mac OS X root or admin password.If you know the password of any admin account in your computer then you could reset password for any other account or even for root ( System Administrator) by typing the following command at Terminal.

To reset the Root Password:

> sudo passwd root
Type the current admin password
Type the new password to root
Re-type new password to root

Nasir Sohail
Nasir Sohail
Nasir is a software engineer with an M.Sc. degree in software engineering and various certifications related to computer hardware and networking, such as MCSE, CCNA, RHCE. He has more than 15 years of mixed industry experience mostly related to IT Support, Web development and Server administration. He also offers his freelancing gig for IT support and consultancy and has more than 300 five-star reviews across platforms like Fiverr, Google, TrustPilot, etc.
Watch & Subscribe Our YouTube Channel
YouTube Subscribe Button

Latest From Hawkdive

You May like these Related Articles

5 COMMENTS

  1. This is a great collection of information. It would appear, however, that all of these methods will not work on newer versions of OS X when FileVault is turned on.

    I'm working on a MacBook running 10.10 (Yosemite). It won't boot into Single-User Mode. And the Reset Password utility won't recognize the internal hard drive.

    I'm assuming that the same will apply with any version of OS X starting with 10.7 (Lion) when FileVault2 was introduced. The new FileVault, when enabled, encrypts the entire OS X startup volume.

    🙁

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.