Mac Tutorial: How to reset the MAC administrator password in single-user mode

Source: Internet
Author: User
Tags administrator password

recently, Langren34 shared a tutorial on the use of Single-user mode in MAC devices to reset the password of the user's administrator account, if you have this need, may wish to refer to.

Single user mode can reset the MAC Administrator account password?

If your Mac device's current system is El Capitan, Yosemite, mavericks, mountain lion or lion, you can do this by using the following procedure:

1. Start the MAC device in Single-user mode.

2. Open the Terminal window and enter the following command:

MOUNT-UW/

3. Capitan or Yosemite system users enter the following two commands, respectively:

Launchcti load/system/library/launchdaemons/com.apple.taskgated.plist

Launchctl load/system/library/launchdaemons/com.apple.opendirectoryd.plist

The Mavericks, mountain Lion or Lion system users enter the following command:

Launchctl load/system/library/launchdaemons/com.apple.opendirectoryd.plist

Note that if you don't know the user's short name, you can enter the following command to get the user list (the short name is on the left and the full name is on the right):

DSCL localonly ls/local/default/users Realname

4. Enter the following command and replace ShortName with the short name of the administrator user (name of the user's personal folder):

passwd ShortName

When prompted, enter a new account password, but you may not see any indication that you are typing.

5. Enter the reboot command to restart the Mac.

If your Mac device's current system is snow Leopard, you can reset the password by following these steps:

1. Start the Mac in Single-user mode.

2. Open the Terminal window and enter the following command:

MOUNT-UW/

If you do not know the user's short name, enter the following command to obtain a list of short names:

Ls/users

3. Enter the following command:

Launchctl load/system/library/launchdaemons/com.apple.directoryservices.plist

4. Enter the following command and replace the shortname with the user's short name (name of the user's personal folder):

passwd ShortName

5. When prompted, enter a new account password, again, you may not see any indication that you are typing.

6. Enter the reboot command to restart the Mac.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.