Migrate passwords from shadow to mysql

Tero Matinlassi tero.matinlassi at edu.vantaa.fi
Tue Feb 3 20:24:03 EST 2004

Lainaus Shelley Waltz <shwaltz at cabm.rutgers.edu>:

> The more I have thought about it, I do not wish to have my users'
> passwords in plaintext anywhere.  I have about 250 users with
> already
> encrypted md5 passwords in the shadow file.  Is there a utility to
> migrate
> this information the the MySQL mail database? 

At one system I have users on a MySQL database with md5 passwords.
Passwords are simply md5 hashes (like those given by the MySQL MD5()
function). Actually, this was the situation before the system even had
an IMAP service and I decided to keep it that way. I had to use
pam_mysql and run saslauthd -a pam. Works quite nicely. (Just beware
older pam_mysql versions, as they query the database with user-entered
plaintext password and leak memory. Newer versions are better.) I also
tried to use the sasl mysql auxprop plugin (or something like that),
but it didn't work out then.


Tero Matinlassi

More information about the Info-cyrus mailing list