Hi

I have been trying to generate a script which will generate the md5 hash for
a string taken as input from the command line . For that , I used
/sbin/grub-md5crypt
, and used it as follows ->
****************************

#!/bin/sh

# File name -> md5.sh

# This script will generate the md5 password for the string entered on the
command line

# for use as the boot-loader password

#

# initialize a few variables

# echo $1

/sbin/grub --batch --device-map=/dev/null <<EOF \

| grep "^Encrypted: " | sed 's/^Encrypted: //'

md5crypt $1

****************************

The problem is that I get the correct password , but if I re-direct it to a
file , GRUB does not authenticate using that password i.e.

$ ./md5.sh karan >> /boot/grub/grub.comf

And then I paste the password in the desired location.

Could you please help ?

Karan





_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to