On Fri, Feb 21, 2014 at 01:31:13PM +0100, Joel Carnat wrote:
> Hum, I tried it but it doesn't work.
>
> I have a slappasswd else where to test. And here's what I get :
> # print passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk
> '{print "{SHA}"$0}'
> {SHA}ZLvhLmLU88dUQwzfUgsq6IV8ZRE=
> # echo passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk
> '{print "{SHA}"$0}'
> {SHA}ZLvhLmLU88dUQwzfUgsq6IV8ZRE=
> # slappasswd -h {SHA} -s passphrase
> {SHA}YhAnRDQFLyD8uD4dD0kiBPyxGIQ=
"echo passphrase" include a return at end of line: you should avoid it.
$ echo -n passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk
'{print "{SHA}"$0}'
{SHA}YhAnRDQFLyD8uD4dD0kiBPyxGIQ=
Bye.
--
Sébastien Marie