How to recover Linux root password

Ideas: into single-user mode and change the root password is not required because the single-user mode root password to login

 

After entering   

 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ press the Enter ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ Press e ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ cursor to highlight the second line and then enter the e ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ 

  ↓ ↓ ↓ ↓ ↓ ↓↓ ↓ ↓ ↓ ↓ ↓ later add a space to write a 1 ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

This step is to enter into single-user mode (linux run levels)

 ↓ ↓ ↓ ↓ ↓↓ ↓ ↓ ↓ ↓ ↓ ↓↓ ↓ Enter ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

 ↓ ↓ ↓ ↓ ↓↓ ↓ ↓ ↓ ↓ ↓ ↓↓ ↓ input b ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

And then it will go directly to single-user mode

You can change the root password  

passwd root

 

Published 24 original articles · won praise 10 · views 3099

Guess you like

Origin blog.csdn.net/qq_43091847/article/details/88089432