installing on a virtual machine Denyhost do the test, the result Root The password has been changed to forget it. So:
1. Enter single-user mode
when booting, press e to enter the grub Edit page, select the second line, add single to the last face , enter Press b boot into single user
650) this.width=650, "width=" 547 "height=", "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
650) this.width=650; "Width=" 554 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
650) this.width=650; "Width=" 554 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
2. Change the password with passwd root
This time tip:Authentication token manipulation Error
<1> suspicion is the problem of insufficient authority, so ls–alh/etc/passwd and the Ls–alh/etc/shadow
we found two of them . - exclude this cause.
<2> Span style= "font-family: ' The song Body '; > suspect is shadow fourth field added limit modification days so cat/etc/shadow discover root Span style= "font-family: ' The song Body '; > The fourth field is 0
<3> Span style= "font-family: ' The song Body '; > Suspect is disk full, df–h and df -I and touch xxx Span style= "font-family: ' The song Body '; > tested
<4> Span style= "font-family: ' The song Body '; > Suspect is a special attribute i cause, lsattr /etc/passwd and lsattr/etc/shadow found no -i properties, excluding.
<5> Span style= "font-family: ' The song Body '; > Consider using the password of the existing user to cover, so the /etc/shadow Inside the linzb user password overrides to root shadow The output of the second field inside is not the same. Specific reasons to be studied)
<6> try emptying Shadow Record and use Pwconv Sync /etc/passwd and the /etc/shadow . Failed
3. try rescue mode repair
After many failures, the brain shorted out passwd also deleted, so the single-user mode also does not come up. So:
<1> Enter Rescue mode
turn on the F2quickly, switch to boot , put cdrom to the first place, F10 Save Restart
650) this.width=650; "Width=" 463 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
Follow the instructions Enter .
650) this.width=650; "width=" 499 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
This is the final interface, the system is mounted by default on the /mnt/sysimage under Use Chroot/mnt/sysimage can switch to system
take the rescue mirror. passwd and the Shadow Copy to System
cp/etc/passwd/mnt/sysimage/etc/passwd
Cp/etc/shadow/mnt/sysimage/etc/shadow
Failed after reboot
<2> try to re-pretend the corresponding rpm Package
First Find passwd belongs to that bag .
650) this.width=650; "Width=" 434 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
rpm-e 650) this.width=650; "Width=" 244 "height=" "src="/e/u261/themes/default/images/spacer.gif "" style= " Background:url ("/e/u261/themes/default/images/word.gif") no-repeat center;border:1px solid #ddd; "alt=" spacer.gif "/ > --nodeps forced uninstallation
Mount the rescue image to the corresponding path and copy the corresponding package installation
650) this.width=650; "Width=" 554 "height=" "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ( "/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
RPM–IVH 650) this.width=650; "Width=" 244 "height=" src= "Background:url ("/e/u261/themes/default/images/word.gif ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif" /> Installation
at this passwd Root no longer has an error .
<3> Change Password after login found flash back, repeat several times, confirm even if the password is correct
View Secure Log Discovery:
650) this.width=650; "Width=" 553 "height=" 102 "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/images/localimage.png") no-repeat center;border:1px solid #ddd; "alt=" Spacer.gif "/>
Suspicion is Pam there is a problem. the Pamwas then re-installed according to step <2>, and the problem was still
ls/lib/security found no pam_stack.so This module
so the same environment is opened CENTOS3 and Found CENTOS3 There's no such module .
Suspicion is Pam There is a problem with the configuration file
then each contrast, finally in /etc/pam.d/login I found it inside. pam_stack.so words, found CENTOS3 does not have this configuration, so del after resetting the password, reboot success. This solves the problem
This article is from the "single Season rice" blog, please be sure to keep this source http://linzb.blog.51cto.com/5192423/1740882
A Linux root password error modification process