Set GRUB Password after the Installation of any Distro
If you forgot to set the password during the time of installing the linux distribution, and if you feel to set the password for your grub boot loader. Then here is the answer…
Switch to root using ‘su’ command and execute ‘grub’ command in terminal/konsole. Prompt will change to ‘grub>’
execute md5crypt to generate password hash.
grub> md5crypt
it will prompt you for password, enter the password which you are going to set for GRUB. it will display encrypted password hash.
Password: *******
Encrypted: $1$X2jZi$KeCC6NuRp0BJDt32jCvnw0
note down encrypted password hash or copy it and exit grub mode using the grub command.
grub> quit
Now edit the
edit /boot/grub/menu.lst file and insert encrypted password above the “title” lines or insert near commented examples of password line.
password –md5 <password-hash>
## ## End Default Options ##
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
save edited file and reboot.





