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
Retype password:

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
password --md5 $1$POASwwdRoW$3.eaRn3fFinARCXjN9CRh/qG/
title Fedora (
root (hd0,0)
kernel /boot/vmlinuz- ro root=LABEL=/
initrd /boot/initrd-

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.

Similar posts

Ravi Sagar Newsletter

Honestly I hardly send out mails but I guess there is no harm in at least having a newsletter. I will only send newsletter when I have something important to share or an update. People are busy and no one has time to read emails these days. If you really like my content then I guess you will remember my site and come back for more.

Want to contact me?