Linux recovery root password two methods

  
                

Linux root password is forgotten, how to recover? Although this is not very common, you will forget it if you have not logged into the system for a long time. Don't say that it is a Linux root password. If you have a normal account and password for a while, you will forget it. This is a normal thing! The Linux root user is the highest privileged user of the Linux system. Once the password is forgotten, it will cause a lot of troubles. How can I recover the Linux root password? Then let me talk about two solutions to restore the Linux root password.

The first recovery mode: password recovery in single-user mode

1. Restart the Linux system and press the “e” key when you see the following interface;

2 After pressing the “e” button, we will see the following interface, press the “e” key again;

3. After pressing the last <;e” key, we have come to the following interface If it appears different from this picture, find the line with the word kerner, and then press the <quo;e” key again;

4. We will go to the following page, empty one after quiet Then enter single;

5, after hitting the Enter key (ie Enter) will return to the interface shown below, press "ld"; b”;

Then we will enter this page;

7, enter the following class to indicate the change of the root password, we can see an update successfully indicating that the modification is successful, then enter reboot to restart, it will enter the user Login interface, enter the password you just modified. To log in;

The second recovery mode: CD recovery (mainly through the CD into rescue mode to recover)

1, assuming we can not use the first way to password repair, will Insert the Linux installation disk into the CD-ROM drive, then start the computer, we will see the page shown below;

2, then enter the content on the picture, then press Enter, the system will enter the rescue mode;

3, after entering the rescue mode, ask us to choose the language, generally we default to enter the car to determine;

4, select the keyboard mode;


5, tips Whether to set the network card information, generally not set, we use the tab key to switch to no;

6, then will reach this interface, we directly enter, it will automatically detect the system;

7, after the completion we will see the following interface, he will display the system's mount information, we just press Enter to select OK;

8, then type the following as follows, then restart The computer will do, pay attention to the weight Before we disconnected from the CD-ROM drive, we will enter the user login interface and enter the previously changed password to log in;

Note: This version is the password recovery for Linux red hat 5.0 system, but It is also applicable to root password recovery with other Linux systems. The steps are almost the same, and there is not much difference.

The above is to bring you two solutions to restore the Linux root password, friends who need it can refer to the next, two solutions can choose one!

Copyright © Windows knowledge All Rights Reserved