Linux System 7 version, forget the root password reset

1, in the grub boot menu, select Edit option to start

2, the keyboard key e to enter the editing interface, Linux find the line 16, to the ro rw init = / sysroot / bin / sh

3, pressing Ctrl + x, single-user mode
4, can now access the system using the following command CHROOT / sysroot
. 5, the root password reset the passwd
. 6, system information update /.autorelabel Touch
. 7, Exit Exit CHROOT
. 8, reboot your system reboot

 

Guess you like

Origin www.cnblogs.com/devops-docker/p/11495676.html