上哪儿去偷呢?想哭~
(Overview)部分,里面有说明:
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
也就是说,空密码的root,在/etc/shadow中应该有如下信息:
root:NP:6445::::::
我看了我的shadow文件
#vi /etc/shadow
root::6445::::::
按照solaris10在其文档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 to:
* 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.
还描述得甚为详细:
# vi shadow这里为空就没有密码了,然而登陆不上却是事实。改成root:NP:6445::::::(先用命令"chmod +rw shadow"将文件改为可读写)。还要问我要密码。
(Remove root's encrypted password string)
又想了一个办法。我还有一个新建的帐户cracker。设了密码为401448ff。其在shadow中的信息为:
cracker:y5mLgGTOxxDdM:13723::::::
将其密码部分复制到root的密码部分
root:y5mLgGTOxxDdM:6445::::::
重启,用401448ff成功登陆!