Global Linux Knowledge Base…
GRUB Password Setting in Linux
| When your system is rebooted, grub presents the boot option menu called splace screen. From here, you or anybody can easily login into a single user mode (sometimes it is called Rescue Mode) without the password which might result into breaching computer security. You can set a password for the GRUB boot loader. This prevents users from rescue or Singe-User mode or changing settings at boot time. |
| For example, without grub password, any one can access the data or change the settings. After configuring grub password, GRUB forces you to enter a password before making any changes or entering into single user mode. You need to type p followed by password. |
| STEP 1: Generate GRUB password using MD5 algorithm, |
| # grub-md5-cryptOutput: |
| Password: <enter your password> |
| Retype password: <enter your password> |
| $1$0D1pm/$edQzRApldSKdvhe7aX4v30 |
| STEP 2: Add MD5 Password to GRUB configuration file by, |
| Note: Under Debian GNU/Linux the Grub configuration file is located at /boot/grub/menu.lst. For Red Hat / Fedora / CentOS user, use /boot/grub/grub.conf file. |
| # vim /boot/grub/menu.lst |
| Add a password line as follows: |
| password –md5 $1$0D1pm/$edQzRApldSKdvhe7aX4v30 |
| Save and close the file. |
| If you are using Dual Booting system, edit grub.conf file as mentioned below. Consider adding lock command to Windows XP right after title command: |
| title Windows NT/2000/XP |
| root (hd0,1) |
| chainloader +1 |
| Restart your system and make sure that GRUB password is working. |
| Print article | This entry was posted by Dhaval Soni on December 29, 2010 at 11:12 PM, and is filed under All, CentOS, Debian, Fedora, Linux OS, Red Hat. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |