What if you retrieve the root password you forgot when you use Lilo/grub?
1. In the system into a single user state, directly with passwd root to change;
2. With the installation CD-ROM boot system, into the Linux rescue State, the original/partition hook up, the order is as follows:
Cd/mnt
mkdir HD
Mount-t Auto/dev/hdax (the partition number of the original partition) HD
CD HD
Chroot./
passwd Root
This can be done;
3. Take down the hard drive of the machine and hang it on the other Linux system, using the same method as the second
Taking Rh8 as an example, the 1th method is shown below:
I. Lilo
1 Type Linux single in the presence of Lilo: prompt
Screen Display Lilo:linux single
2 to go directly to the Linux command line
3 Vi/etc/shadow
Deletes the first row, that is, the line that begins with Root: After and Next: the contents of the previous
The first row is similar to
Root:: ...
Save
4 reboot reboot with null root password
Two. Grub
1 in the presence of grub screen, use the up and down key to select the one you normally start Linux (do not choose Dos), and then press e key;
2 again with 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;
3 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=/
4 return to the car, and then press the B key to start, you can go directly to the Linux command line
5 Vi/etc/shadow
Deletes the first row, that is, the line that begins with Root: After and Next: the contents of the previous
The first row is similar to
Root:: ...
Save
6 reboot reboot with null root password