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