Anyone can lose something, what if you lose the root password of your server?
It doesn't matter, we use the following method to recover.
Recovery method
Method One: Directly through the Lilo development init= "/bin/bash start to modify the password method two: through the CD-ROM boot, mount/partition, modify the/etc/shadow file to clear the password
Method One realization process starts Linux first, when Lilo appears, we press a button to let Lilo stop (don't press Enter OH)
This time will appear similar to the following picture
Here we see that there is only one system in the Lilo list, which is the system with the startup item name called Slack.
We enter the following command to start the system
Slack Init=/bin/bash RW
Note: The slack in our above command corresponds to the name of the startup item. What is the name of the system you set up in your Lilo, and replace it with what?
When the system enters the system, the following prompts appear
bash-3.00#, we'll type it after the prompt.
PASSWD in accordance with the instructions to us, enter two to three times the new password can be.
Because now the system is just a small kernel system, we do not do any other operation, and do not exit the shell with exit. After the password is modified, we use the following command to make/directory read-only
Mount-o REMOUNT,RW/
Now it's safe to reboot the system.