Solution for MAC system to forget the root password-My test is successful

Source: Internet
Author: User

From: http://osxdaily.com/2011/04/25/change-admin-password-mac/

Since air is not used for a long time, the previous root password is forgotten, and many commands cannot be executed, so I found this solution (I successfully tested it in Mac OS X 10.6.8 !), Let's share it with you.

    • Boot, and quickly press command + S to enter the command line mode
    • Enter the command (sometimes the command path may be different. Refer to the two lines on the screen), check the system error and fix it.
      /Sbin/fsck-fy

    • Enter the command so that you have the permission to change the system configuration.
      /Sbin/Mount-UW/
    • Finally, according to the command
      Passwd Root

      To change the password!

Then, press the reboot command to restart the machine!

The original text is as follows:

Change an admin password in Mac OS X Single User Mode

This is a multistep process but it's easy to follow:

    • first you need to enter single user mode. reboot the Mac and hold down Command + S at boot to enter into the command line.
    • you'll see a note where Mac OS X tells you that you need to run two commands in order to make filesystem changes, this is necessary so let's handle that first
    • the First Command checks the Mac OS X filesystem for errors and fixes them, it can take a few minutes to run:

      fsck-fy

    • the next command mounts the root Mac OS X drive as Writable, allowing you to make changes to the filesystem:

      Mount-UW/

    • after the filesystem is mounted, You can reset any users password using the following command:

      passwd username

    • you'll need to enter the new password twice to reset and confirm the changes

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.