cent OS 7 forget the root password

1. In the interface is as follows, according to the system selected e

2. Move the cursor to the bottom of the file, modifying the following two places (setting initialization shell document and read-write), Ctrl x exit and start a shell

 

3. Enter the following interface command mount -o remount, rw / (mount the file system to write mode)

 

4. Enter the command passwd, follow the prompts to change the root password.

5. touch /.autorelabel (update file after modify the password, be sure to change the success)

6. Run command exec / sbin / init to start properly, or with the command exec / sbin / reboot reboot.

Guess you like

Origin www.cnblogs.com/520zm/p/11576099.html