linuxperson
asked on
script
[root@host ~]# grub-md5-crypt
Password:
Retype password:
$1$bQ14m1$RwVVO7svf57j9Dm3 3333
I want to script above command. Basically i want to pass the password in the script and want to save the encrypted password to a variable.
Password:
Retype password:
$1$bQ14m1$RwVVO7svf57j9Dm3
I want to script above command. Basically i want to pass the password in the script and want to save the encrypted password to a variable.
If one gets to entering grub password they are in good position to use MicroSD card to remove grub boot password.
ASKER
then what is the purpose of having this password
In GRUB - none - on physical machine adversary can boot off the CD, copy your data or/and remove password, on virtual system it will prevent system start and invite you to work on sunday to enter the password....
It is still a valid salted md5 hash that you can use in passwd file.
To protect data you need real encryption, not some password dialog.
It is still a valid salted md5 hash that you can use in passwd file.
To protect data you need real encryption, not some password dialog.
ASKER
please let me know if you can help me with my original question.
VARIABLE=`passwd`
ASKER
echo "abc" | passwd test --stdin
similar way i am trying to do
echo "abc" | grub-md5-crypt --stdin
Not working. Please let me know how to do this.
similar way i am trying to do
echo "abc" | grub-md5-crypt --stdin
Not working. Please let me know how to do this.
mkpasswd command if present takes stdin argument
ASKER
Can you please provide me the exact command for echo "abc" | grub-md5-crypt --stdin this issue
echo abc | htpasswd -1 -
echo abc | openssl passwd -1 --stdin
...
...
echo abc | openssl passwd -1 --stdin
...
...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
it works
it works