Linux > Server Security & Hardening

Password Protect Grub

(1/1)

Jithin:
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!

Navigation

[0] Message Index

Go to full version