many friends in ops often forget The root password of the Linux system, what should I do if the Linux system forgets the root password? Do you want to reinstall the system? Of course not! Go to single-user mode and change the root password. for CentOS, for example,redhat also works, but the version may vary slightly, but the steps are basically the same.
Method One steps are as follows :
Restart the
Linux system: At this step,Press Enter ( or press the up and down Keys )to enter in 3 seconds
.
The following interface appears :
then enter E, the method is to press the downward tip to the second line, press "E" into the editing mode.
The interface enters single after the last side of the second line is added, or the older version is added after the Kerner line of this line is 1 Linux single version High is equally compatible ) .
add a single behind and then enter
finally Press "B" to start, after the start of the single-user mode is entered
Now that you have entered the single-user mode, you can change the root password. The command for more passwords is passwd.
Change the password at this time
。
After that, the reboot command restarts to log in normally.
Linux forgot login password hack method