How can I reset the root password when centos forgets the root password? When using Linux, the root password is a critical security mechanism. However, if the root password is lost that day, the problem is serious. The following describes how to reset the root password. For more information, see 1. restart the system. you can view the boot directory when starting the system.
How can I reset the root password when centos forgets the root password?
When using Linux, the root password is a critical security mechanism.
However, if the root password is lost that day, the problem is serious.
The following describes how to reset the root password. For more information, see
1. restart the system. when starting the system, you can see the boot directory. use the up and down arrow keys to select the system where you forgot your password. then
Press "E" e '.
2. Select Option 2-kernel and then press "E"
3. enter single or 1 after rhgb quiet, and then press Enter
4. press enter and return to the interface. then Press B to reboot the system.
5. after the instance is started, we find that the instance directly enters the system without entering the account and password.
6. after entering, we can modify the password based on passwd root.
Note:
1. restart the boot system of the machine to avoid skipping the boot suggestions and pressing the letter "E" without interruption ".
2. select the kernel item with "kernel.
3. when guiding the editing item, pay attention to the English prompt information of the "B, E, C" letter below.
How to crack the root password of CentOS?
After the instance is started, press any key during countdown and jump to the screen, and then press the E key to go to the following interface:
In this case, move the cursor to the second line and press the E key (meaning: edit this command in the startup order). For example, enter a space
+ Single"
After entering the information, press enter. Return to the previous page, and the cursor will be positioned in the second line of kernel, and then press B (start ),
Wait a moment and the following page will be started. input vi/etc/shadow (edit shadow)
The following figure is displayed:
Delete the parameters in the yellow box. Save and exit. Enter exit to restart the system. the root password is missing.