My root has no password. Log on to the console with root, execute sys-unconfig, and reconfigure the system information. Leave the password blank. (Sys-unconfig clears all settings, including the root password, but does not delete the passwords of other users .) When I log on again, I suddenly need to enter the password.
Where can I steal it? Want to cry ~
View soliaris documentation 817-1985-15 systemadministration guide: Managing useraccounts and groups of basic administration
(Overview), which has the following description:
Password information is stored as follows:
· In the passwd file when you are using NIS or NIS +
· In the/etc/shadow file when you are using/etc files
· In the People container when you are using LDAP
The fields in the shadow file are separated by colons and contain the following information:
Username: Password: lastchg: min: Max: Warn: inactive: expire
Password might contain the one of following entries:
· A13-character encrypted user password
· The string * LK *, which indicates an inaccessible account
· The string NP, which indicates no password for the Account
That is to say, the root with an empty password should have the following information in/etc/shadow:
Root: NP: 6445 ::::::
I read my shadow file
# Vi/etc/shadow
Root: 6445 ::::::
Follow the solution provided by solaris10 in its document 817-1758 System Administration Guide: advanced administration.
What to do if you forgot Root Password
If you forget the root password and you cannot log into the system, you will have:
* Stop the system by using the keyboard stop sequence.
* Boot from a boot or install server or from a local CD-ROM.
* Mount the root (/) file system.
* Remove the root password from the/etc/shadow file.
* Reboot the system.
* Log in and set Root's password.
It is also described in detail:
# vi shadow
(Remove root's encrypted password string)
If this field is empty, no password is required. However, it is a fact that you cannot log on to it. Change to root: NP: 6445 :::::: (use the command "chmod + RW shadow" to change the file to readable and writable ). Ask me for a password.
I tried another method. I also have a new account cracker. Set the password to 401448ff. Its information in shadow is:
Cracker: y5mlggtoxxddm: 13723 ::::::
Copy the password section to the root password section.
Root: y5mlggtoxxddm: 6445 ::::::
Restart and log on with 401448ff!