Giulio Ferro wrote:
> Jorge Bastos wrote:
>>> I have imported users from an old vpopmail installation and all the
>>> passwords
>>> begin with "$1$...".
>>> If I try
>>> select md5("password")
>>>
>>>     
>>
>> That means that the passwords are in CRYPT format.
>>
>>   
> 
> No, crypt passwords don't begin with "$", just tried...

You are wrong, Jorge is correct. md5 passwords that begin with $1$ are
indeed crypt. The format is:

"$1$<salt>$<encoded>"

so try:


select concat('$1$', <salt> , '$', encrypt(<somepassword>,<salt>));


Please read crypt(2) for more details.

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to