How to enable Superuser in Mac OS x

Source: Internet
Author: User

Root user, also known as Superuser, is one of the most powerful UNIX accounts, and root accounts can perform any "operations" on any part of the system, including copying files, moving/removing files, executing programs, and so on. As a result, usually Root accounts are assigned only to advanced professional users. As a result, Apple hides root user in Mac OS X.

But sometimes we have to enable the root user to do some action, you can use the following three ways to start the root account.

Method One:

Put the Mac OS X installation CD into the CD drive, start the system with the CD-ROM and choose "Password Reset" option in the installation menu to change your password and start Superuser mode. (Copy this tool to the hard drive is not able to boot, must start from the CD to be effective.) )

Method Two:

Starting terminal in Mac OS X (in the folder in the application/utility), enter the following command:

sudo passwd Root

The system will require that the Root user's new password be entered in real time and then entered again to make sure the password is correct.

Method Three:

Start the NetInfo Manager application (in the folder of the application/utility), and then follow these steps:

1. Select "Domain" → "user" → "Start root user" from the menu

2. Click the "Lock" button at the bottom of the window and enter the user name and password registration provided during the installation process.

3. Select the * number column from the list in the lower half of the window and enter the new password that is encrypted by Root user.

You can enter the following "htpasswd" command in Terminal to generate the new encrypted password:

[localhost:~] currentuser% htpasswd -nb anylogin yourpassword

PU9FQGDZVHRB2 is the new password that has been encrypted

4. Click the "Lock" button at the bottom of the window, and then save the changes and leave NetInfo Manager.

You can now try the new password for Root user in Terminal.

[Return]

[localhost:~] currentuser% ANYLOGIN:PU9FQGDZVHRB2

Related Article

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.