Encrypt the incoming single user
Plaintext encryption
Vim / etc/grub.conf in
Hiddenmenu
Title CentOS (2.6.32-431.el6.x86_64)
Change to
Hiddenmenu
Password=12345678
Title CentOS (2.6.32-431.el6.x86_64)
2.md5 algorithm encryption
a. Enter grub-md5-crypt directly to encrypt the password.
B.vim / etc/grub.conf adds the encrypted password to the
Hiddenmenu
Title CentOS (2.6.32-431.el6.x86_64)
Get
Hiddenmenu
Lock
Password-- md5 $1$ VgHQU$hVuCrY9xtT8CogBV8ioIc/
Title CentOS (2.6.32-431.el6.x86_64)
3. Enter single-user mode
Reboot restart the system, within 3 seconds of boot, press any key to enter the boot interface, and then enter the password to enter single-user mode. Enter passwd to change the password of the root user.