Comments: The procedure is as follows: Enter grub in the command line to enter the GRUB interface, enter md5crypt (or password -- md5), and then enter your password (Be careful when entering the password, because it can only be entered once), generate an md5 encrypted string and copy it. Enable/boot/grub. conf: add the lock and password -- md5 clauses after the title clause. The result is as follows: Enter grub in the command line to enter the GRUB interface, and enter md5crypt (or password -- md5 ), enter your password (note that you must be careful when entering the password only once), generate an md5 encryption string, and copy it. Open/boot/grub. conf and add lock and password -- md5 clause after the title clause. The result is as follows: title CentOS (2.6.9-42.0.3.EL)
Lock
Password -- md5 $1 $ G7A00 $ S9iQ9fN9IME2gpECHS7CV1
Root (hd0, 9)
Kernel/vmlinuz-2.6.9-42.0.3.EL ro root = LABEL =/rhgb quiet
Initrd/initrd-2.6.9-42.0.3.EL.img
After restarting, you must enter the correct password to enter CentOS (2.6.9-42.0.3.EL.