HOWTO password protect your GRUB

Procedure to password protect your grub menu is simple. Steps are mentioned below.

1. Use the command grub-md5-crypt to generate an encrypted password in MD5 (Message Digest Algorithm 5) format.

[root@localhost ~]# grub-md5-crypt
Password:
Retype password:
$1$POwoW$3.ean3fFinACXjN9Ch/qG/

2. Open your /boot/grub/grub.conf file and copy the encrypted password.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
password --md5 $1$POwoW$3.ean3fFinACXjN9Ch/qG/
title Fedora (2.6.23.1-42.fc8)
root (hd0,0)
kernel /boot/vmlinuz-2.6.23.1-42.fc8 ro root=LABEL=/
initrd /boot/initrd-2.6.23.1-42.fc8.img

Enter the password --md5 ENCRYPTED-PASSWORD line just before the title line.

3. Restart your computer and to modify the GRUB menu first enter p and then enter the password that you encrypted.

4. Now your GRUB is MD5 password protected.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions. Please don't mind guys!
- five = four
Solve this math question and enter the solution with digits. E.g. for "two plus four = ?" enter "6".