Ubuntu - Grub - Password Protect Grub Bootloader

sudo grub

At the “grub>” prompt type md5crypt:

grub> md5crypt

Enter a password at the Password: prompt, preferably something other than root password:

Password: *****

It will then give you the password encrypted:

Encrypted: $1$Rdv455345ga345GvIRgXWxcF1Vjb7tZ//

Copy the encrypted password into the clipboard.


Edit /boot/grub/menu.lst:

vi /boot/grub/menu.lst

After you see title SUSE Linux 10.0 on the next line type lock.

On the following line type password md5 [the encrypted password you copied from previous shell]:

/boot/grub/menu.lst
###Don't change this comment YaST2 identifier: Original name: linux###
title SUSE Linux 10.0
lock
password md5 $1$Rdv455345ga345GvIRgXWxcF1Vjb7tZ//
root (hd0,1)
     kernel /boot/vmlinuz root=/dev/hda2 vga=0x31a selinux=0
resume=/dev/hda1  splash=silent showopts
     initrd /boot/initrd

NOTE: You may do the above steps for each grub boot item.