bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub-md5-crypt question


From: Karan Saberwal
Subject: grub-md5-crypt question
Date: Tue, 23 Mar 2004 13:51:20 +0530

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







reply via email to

[Prev in Thread] Current Thread [Next in Thread]