CentOS7 into single-user mode to change the password

1, the system startup, the startup screen grub2 i.e. the interface displays the figure, by "↑ ↓" key to stay in this interface, press the "e" key to enter the edit mode
CentOS7 into single-user mode to change the password
2, to find the beginning of the period "linux16", in "UTF-8" is added after "init = / bin / sh" , find "rhgb" and "quiet" parameter removed
CentOS7 into single-user mode to change the password
3, press "Ctrl + X" next step, single-user mode, as in FIG
CentOS7 into single-user mode to change the password
. 4, rw way remount "/", mount -o remount, rw /, otherwise no write permissions, the following picture
CentOS7 into single-user mode to change the password
5, use the passwd command to change the root password
CentOS7 into single-user mode to change the password
6, run the command touch / .autorelabel the selinux take effect
CentOS7 into single-user mode to change the password
7, and then run the exec / sbin / init reboot the system is OK

Guess you like

Origin blog.51cto.com/14132521/2411578