Linux: CentOS 5.5
Enhance system security by adding a password to the grub boot loader, so as to disable the single-user mode and prevent malicious modification of the root password by logging on to the single-user mode, you only need to modify the configuration file of grub to encrypt grub.
1. Enter the system as the root user
2. Enter the grub-md5-crypt in the terminal, then the system will prompt to enter the same password twice, this password is your grub password, and then generate a string of MD5 code, follow these steps to add the grub configuration file.
3. Modify the grub configuration file
A) vim/boot/grub. conf
B) add a line of password-md5 MD5 code under the splashimage Parameter
4. Save and exit. Restart the reboot system. 5. If you want to enter grub after the restart, enter p and your grub password if you want to enter single-user mode, then you can edit grub (that is, you can enter e, add linux single after keenel, and then enter B to start a single user)
Note: You can also use the plaintext password to change one line of password to password = password.
You can.
Share it with everyone and learn together ......