GRUB Protection
Server Training - Server Management

Encrypted Password for GRUB
If you want to protect GRUB when the system boots, you can add a password using MD5.  The first thing you do is create the MD5 string by using the grub-md5-crypt command.

Lesson 3 | Lesson 5


grub-md5-crypt
Password:  
Retype password:  
$1$1InOC/$pIW/8A.tcbBldV3LoKhyP.

Now take the string and add it after the password –md5, see the example.


default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
password --md5  $1$1InOC/$pIW/8A.tcbBldV3LoKhyP.
title CentOS (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-128.el5.img

Now if you stop the system during boot you cannot access GRUB without a password.  Enter “p” so it will prompt for the password.

brub bootloader