On Tue, 2013-04-16 at 03:54 +0200, Marcin Czupryniak wrote:
I'm trying to configure SSHA512 passwords and when testing discovered that they were not working as expected. At first i was using Centos 6.4 which doesn't have the glibc CRYPT newest functions ($6$salt$pass) so had to rollback to the Dovecot format ({SSHA512.HEX}saltedpassword+salt ) but I'm unable to let dovecot authenticate properly.
I have one CentOS server (5.9) and only one, so can't test any others (they are all slackware) but...
crypt($pass, '$6$' . $salt)
"dino", results in:
$6$n.vM3bqg3C6LPtJv $keF2z/6VXv99NKf92Abbz/sPLBcWHV2hBXOkDf41OKLqe9p7V39xcFc92K1S4WvWQ3rK0konAw.pV.YEQspuM.
So if 6.4 does not work, you are missing something.
try this #!/path/to/perl $pass ="dino"; @pschars = ("A" .. "Z", "a" .. "z", 0 .. 9, ".", "/"); $salt= join '', @pschars[map {rand @pschars} (1..16)]; $sha512p = crypt($pass, '$6$' . $salt); print "\n $sha512p \n";