Reprinted from: https://jingyan.baidu.com/article/a3aad71a18c2bcb1fb0096b8.html
Tools / materials
-
centos7 operating system
Method / Step
-
First start centos7 power, press the space below the graphical interface, the system stops at this interface, this interface is generally the default time is 5 seconds, to get the chance.
-
Then press the "e" key to enter the edit option, wait screen appears press the key has been the final turn. Find linux16 ..... ro crashdernel = auto .... similar words.
-
Ro then change to "rw init = / sysroot / bin / sh", press the key combination ctrl + x, operation of the system after a change.
-
After the launch, enter the command "chroot / sysroot"
-
Then enter "passwd root", set the user password, enter the same password twice.
-
Then execute the command "touch /.autorelabel" writes system information.
-
Then forced to restart the system until the system login screen to enter us to change a good password, you can log in successfully found. At this point the password change is completed.
-