List:General Discussion« Previous MessageNext Message »
From:J Gao Date:July 18 2013 6:45pm
Subject:Transfer ENCRYPT password field to another server
View as plain text  
Hi, All,

I am having trouble to transfer email user account which is saved in 
MySQL to another server. Here is the detail:

I have an old email server which using MySQL to store user account 
information. The password field uses MySQL ENCRYPT function to save the 
users password. So if I want change the user's password I can do:
  UPDATE  `mail`.`users` SET  `password` = ENCRYPT(  '12345' ) WHERE 
CONVERT(  `users`.`email` USING utf8 ) =  'g@stripped' LIMIT 1 ;

Then the new password "12345" saved in the table as string of " 

Now I build a new server using iRedMail. When I try to transfer user 
account I have trouble to transfer the password field. Because the 
iRadMail/dovecot is using MD5-CRAM to encrypt the password then save it 
in the MySQL. All the password string is started with "$1$".

So, is there a way to make the MySQL encrypted password string 
"2I6JOeg.JukJ." convert to MD5 hash "$1$................."?

Thanks for help.



Transfer ENCRYPT password field to another serverJ Gao18 Jul
  • Re: Transfer ENCRYPT password field to another serverJohan De Meersman19 Jul
    • Re: Transfer ENCRYPT password field to another serverRik Wasmus20 Jul