Autor: Peter Bowyer Data: Para: exim-users Asunto: Re: [Exim] SMTP Authentication: Migrating from /etc/passwd to MySQL DB
Chris.Mason@??? wrote :
> The users all use SMTP Authentication to send email through the box and their usernames > are now stored in this MySQL database. Is there anyway to migrate their password from > the /etc/passwd file into my MySQL user database so they do not need to go through and > change their password for it to work
Depends how you've implemented passwords in the DB. Assuming they're crypted
(unix crypt), you can copy the crypted passwords out of /etc/passwd or
/etc/shadow into the password column of the db. (you or a script, depending
on how many to do vs time vs script capability.....)
Otherwise, if you've got plain text passwords in the db, you're a bit
stuck - one possible way is a web page and a cgi which prompts for the
id/password, authenticates it against /etc/passwd with crypt, and if
successful, writes the password to the db in in plain text (or in whatever
other crypt method you're using.)