How to solve the problem of forgetting the root password under Linux?

  

In the operation of Linux system, for the security of the system, the password of the root account in the system will be set, so forgetting the password is a common occurrence. What if I forget the root password? The following small series will introduce you to the solution of forgetting the root password under Linux.

Step 1: restart the countdown time by clicking the & ldquo; box & rdquo ;.

Step 2: The following will appear:

The code is as follows:

root (hd0,0)

kernel /vmlinuz-2.6.18-128 .el5 ro root=LABEL=/rhgb quiet

initrd /initrd-2.6.18-128.el5.img

Click on the keyboard “e” to enter edit mode.

Step 3: Add single after the second line as follows:

The code is as follows:

kernel /vmlinuz-2.6.18-128.el5 ro root=LABEL= /rhgb quiet single 4

After pressing Enter, press “b”, enter single-user mode, directly use the command

code is as follows:

passwd root

Change the password.

The above is the processing method for forgetting the root password under Linux. If you have forgotten the root password, don't worry, follow the steps above to modify the root password to solve your problem easily.

Copyright © Windows knowledge All Rights Reserved