PDA

View Full Version : Change password hash algorithm



SirAdminALot
06-28-2012, 09:16 AM
Hi,

I'm trying to change the hash algorithm of my Dovecot server from MD5 to SSHA256. I wanted to generate the new hash when a user is logging in, because than I have the plain password. But it seems that this is not so easy. I don't know how to store the password, so that I can easily run a script with it.

I'm running Dovecot 1.2.15 on Debian Squeeze.

I hope you have any tips for me ;)

zEitEr
06-28-2012, 12:10 PM
Hello,

What you want to do? To change password of an email account as soon as a user login into his email box? Right?

SirAdminALot
06-28-2012, 01:01 PM
Not exactly. My users are stored in a MySQL table. I added a new column called "new_password" where the new SSHA256 hashes should be stored. So if a user is logging in, the new hash should be generated and stored there. After a while I should have the most of the passwords in SSHA256, so I can change the dovecot-password-query to use the new column instead of the old (where the MD5 hashes are).

nobaloney
06-28-2012, 01:10 PM
This is a DirectAdmin forum. You may need to find a more generic forum, as we're using DirectAdmin, which does not use MySQL to store users.

Jeff