Centos7 reset password
1. Turn on the power and press'e' on the interface to enter the system to enter the editing page:
two。 Add: init=/bin/sh at the end of the field at the beginning of linux16
3. Press the "ctrl+X" key combination to enter single user mode
Enter the following page to indicate that you have successfully entered single-user mode. After entering single-user mode, the file system is read-only. Enter the command 'mount-o remount,rw /' to change to read-write mode.
4. Use the command 'passwd' to reset the password:
5. Use 'touch / .autorelabel' to create selinux security tags
6. Use 'exec / sbin/init' to reboot the process and restart
Verify that the login is successful: