Essay record reset the root password 2019.8.7

Method 1 : single-user mode

1, boot into the system to start the selection screen by e

 

 

2 , find the line behind asterisk add the init = / bin / sh

 

 

3 , hold down Ctrl + x execution

4 , single-user mode

 

5, if the passwd command fails, you can directly enter the shadow files directly to the root password deleted

 

 

 

 

Method 2 : Go to the emergency mode

1, into the hard disk

 

 

2, directly into the shadow files directly to the root password deleted

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/lyqlyqlyq/p/11314499.html