Admin-Ahead Community

Linux => Server Security & Hardening => Topic started by: Jithin on November 08, 2013, 09:56:19 pm

Title: Password Protect Grub
Post by: Jithin on November 08, 2013, 09:56:19 pm
Hi Guys,

Protect Grub using a password is always a good security practice. It is also very easy to do.

Please follow the steps given below.

1) Login to system via SSH

2) Generate a MD5 password using " grub-md5-crypt" tool

# grub-md5-crypt
Password:
Retype password:
$1$19oD/1$NklcucRUpoNYul8OfEURc2

3) Now you got the md5 password. Save it a safe place and open "/boot/grub/grub.conf" and add the below line.

vi /boot/grub/grub.conf

password --md5 $1$19oD/1$NklcucRUpoNYul8OfEURc2

Reboot the system and if you try to edit the grub, it will ask you for the password.

Give it a try!