Linux root password Retrieve method a
1th step: In the system into a single user state, directly with passwd root to change.
2nd: The installation of CD-ROM boot system, Linux rescue State, the original/partition hook up, the following practices:
CD/MNT mkdir HD mount-t auto/dev/hdax (the partition number where the original/partition is located) HD CD HD chroot./passwd Root
The 3rd step: Take down the hard drive of this machine, hang on to other Linux system, adopt the method and the second kind is same.
Linux root password Retrieve method two
Step 1th: When you boot the system with Lilo: Type Linux single when the Lilo: prompt appears
Screen Display Lilo:linux single
2nd step: Enter directly into the Linux command line
Step 3rd: Use the following command "Vi/etc/shadow" to delete the first row, which begins with Root: After and next: Before, the first line is similar to root:: ... Save
Vi/etc/shadow
4th step: Reboot reboot, the root password is empty.
Linux root password Retrieve method three
1th Step: When you boot the system with grub: When the Grub screen appears, use the up and down key to select the one you normally start Linux (do not choose Dos yo), and then press e key
2nd step: Again use the up and down key to select the one you normally start Linux (similar to kernel/boot/vmlinuz-2.4.18-14 ro root=label=/), and then press e key
Step 3rd: Modify the command line you see now, add single, and the result is as follows:
Kernel/boot/vmlinuz-2.4.18-14 single RO root=label=/single
4th step: Enter return, and then press the B key to start, you can go directly to the Linux command line.
Step 5th: Use the following command "Vi/etc/shadow" to delete the first row, which begins with Root: After and next: Before, the first line is similar to root:: ... Save
Vi/etc/shadow
6th step: Reboot reboot, the root password is empty.