Bootloader Password

I’m trying to install a password on the Grub bootloader on my 11.2 box. I ran
yast2 bootloader & then clicked on bootloader options, then the checkbox for using a password, and then typed in my password twice. It isn’t working. I’ve tried various different passwords to see if something was throwing it off like special characters or too many characters but no matter what I do I can’t use the password to unlock the bootloader on bootup. It just tells me that I entered the incorrect password. Can anyone help?

Thanks.

I don’t know if this will help help but this is how I set the grub password.

First I create the MD5 password string from the grub-md5-crypt command


grub-md5-crypt

I take that string and it add it the menu.lst file


password --md5 <md5_string>

Good luck,
Hiatt

On 05/23/2011 11:06 PM, blank888 wrote:
>
> Can anyone help?

check your caps lock key…in linux all words are case sensitive…

Password, and password and passWord are all different and not
interchangeable passwords…


dd CAVEAT: http://is.gd/bpoMD
[NNTP via openSUSE 11.4 [2.6.37.6-0.5] + KDE 4.6.0 + Thunderbird 3.1.10]
Dual booting with Sluggish Loser7 on Acer Aspire One D255

Does your grub use the same keyboard layout as the desktop environment in
which you defined the password?


PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.3 | GeForce
9600 GT | 4GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
ION | 3GB Ram

On 2011-05-23 23:46, martin_helm wrote:
> Does your grub use the same keyboard layout as the desktop environment in
> which you defined the password?

IIRC, grub uses the US keyboard.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Thanks! This one worked. I have no idea why doing it through yast didn’t work, but then again if I knew I probably would have been able to fix it myself.

Do you know if it matters what line it goes on? Like if I just put in a script


echo `grub-md5-crypt` >> /etc/Wherever_it_goes/menu.lst

would it prompt for my input and then be done?

When you read the GRUB documentation it shows that the statements are executed from top to bottom. Thus if you havv your password command at the bottom it is to no avail.

I would put the password under the “default” section

Try something like this


##Get MD5 password
GRUBPASS=`/usr/sbin/grub-md5-crypt &lt;&lt;EOF 2&gt; /dev/null | tail -1
password
password
EOF`

##Add password to menu.lst
sed -i /^default/s/$/"
password -md5 ${GRUBPASS}" /boot/grub/menu.lst

If this is going to be part of a script I would add a check to see if the password section has already been added to the menu.lst file

Good luck,
Hiatt