[support] Migrating old passwords to Drupal

WATSON Michael mick.watson at roslin.ed.ac.uk
Mon Nov 8 10:55:36 UTC 2010


Hi

I have an old website/DB that I would like to migrate into Drupal.

At present, it has a user/password setup that encodes the passwords in MySQL using the native MySQL password() function.

Ideally, I'd like to take those users and replace them with Drupal users, in a seamless way and without having to re-set user passwords, such that users can log into the new Drupal website without having to change or re-set their passwords.

Clearly this is difficult as Drupal stores passwords as md5 encoded strings, whereas my passwords are encoded by password().

I notice that the user.module file includes several calls to md5.  If I changed all of these to a function which mimics the MySQL password() function, would that enable me to migrate my users into Drupal, allowing them to log into Drupal with their existing passwords?

If that wouldn't work, suggestions are welcome!

Thanks
Mick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20101108/7c2cbf95/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://lists.drupal.org/pipermail/support/attachments/20101108/7c2cbf95/attachment.pl 


More information about the support mailing list