In my previous post we talked about changing password for root account on a Linux machine. If you have read it then I am sure you won’t like a naughty geek doing any kind of hanky-panky with your GRUB. So as I promised here we’ll discuss about protecting GRUB with a password.
The steps required do this is quite simple. So let’s start our job–
- First of all open the command prompt and type the following command:
grub-md5-crypt
- Now type the password you want to apply to GRUB and you’ll get an encrypted string as output. Now select it with your mouse and right-click on it to copy it.
- Now go to the file /etc/grub.conf and write the following line:
password –md5 paste the string we just copied by again a right-click.
- Save the file and quit. Now if someone wants to change kernel parameters through the way we saw previously he’ll be asked to enter the password and this way you can make your GRUB safe from the mischievous fellows.