On 03/11/2013 08:20 PM Thomas Pries wrote:
Hi,
I want to write some php code that users can change there dovecot password via a roundcube plugin. I'm using php function crypt(...) to generate the hashes and everything works well so far.
I'm using doveadm pw to generate testhashes e.g.:
srv:~ # doveadm pw -r 5 -s BLF-CRYPT -p abc {BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y
I expected an "ok" when using -t the hash when entering abc as a password, but I got:
srv:~ # doveadm pw -r 5 -s BLF-CRYPT -t \{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y Enter password to verify: doveadm(root): Fatal: reverse password verification check failed: Password mismatch
What went wrong?
Usage would be: doveadm pw -t '{BLF-CRYPT}$2a$05$W82/Vw4ZEcHBC00M8cNwe.g8fOHuAeV7L5Q/q4W6VWl9V5kjoiz8y'
Your shell expands $2a and $05$W8… to empty strings. Therefore you should single quotes around strings that contains the dollar sign.
Regards, Pascal
The trapper recommends today: cafebabe.1307022@localdomain.org