top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Transfer ENCRYPT password field to another server of MySQL

0 votes
647 views

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@veecall.com' LIMIT 1 ;

Then the new password "12345" saved in the table as string of "2I6JOeg.JukJ."

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$................."?

posted Jul 18, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

Nope. Encrypt() calls unix crypt(), which is really more a hash - you can't go back to the original.

The proper way to handle this, is to notify the users that passwords will expire upon moving to the new system, and sending each of them a personal, unique link to set their new password.

answer Jul 19, 2013 by anonymous
Similar Questions
+2 votes

In my web application I need to encrypt the database password and and that should be stored in the properties file?

+1 vote

In my web application I have a requirement database password should be stored in properties fie and that should be encrypted and during login that it needs to check the username password and database password database password should be decrypt during login and and encrypt during log out.

+1 vote

I have some problem
I have store the data in the database without encrypt but i am view the data encrypt method after 1 day and doesn't know the details.

I am using php and mysql, Could the experts please comment on this, and offer some advice?

...