Saturday, March 25, 2006

Securing Your Grub boot loader

Anyone can easily log in as root through single usermode through grub. The way is already posted in this blog.Please check archive for that.This really compromises your system security. This is how to prevent that cracking. For entering into single user mode you need to press p followed by password.
The way to do
Type grub-md5-crypt command to create password in MD5 format:
# grub-md5-crypt
The output will be something like this
Password:
Retype password:
$1$NYof7ff$$ffdgfd6fdfLG4GXpihIJy
Then you need to copy and paste MD5 password ($1$NYof7ff$$ffdgfd6fdfLG4GXpihIJy) to grub configuration file
This is how to do that
Under Debian GNU/Linux the Grub configuration file is located at /boot/grub/menu.lst. (Red Hat / Fedora user use /boot/grub/grub.conf file)
# vi /boot/grub/menu.lst
Next edit /boot/grub/menu.lst and add a password line as follows:
password --md5 $1$NYof7ff$$ffdgfd6fdfLG4GXpihIJy
save the file exit

No comments: