migrating from shadow passwords to mysql database

Discussion in 'Server Operation' started by templas, Feb 28, 2008.

  1. templas

    templas New Member

    Maybe someone has already done such migrations and could share the knowlege how to do this. I want to migrate old mail server with shadow passwords to a new one with mysql database. How should the scripts look for reading and parsing users with passwords to the database?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    The passwords are the problem because they are saved in encrypted form (crypt or md5) in /etc/shadow. This means you can't convert them into any other format, but would have to store them in the MySQL database as they are. Then your mail server would have to authenticate against these passwords.
     
  3. koukouviou

    koukouviou New Member

    Sorry for asking the same question a few years later!! I have the same issue here and I didn't want to open a new thread for it.

    Just to be sure here, I didn't understand if you are saying that the migration of the encrypted passwords is NOT possible in mysql databases, or if I can copy the encrypted password of a user to the password field in my database and then the user can login with his/her unencrypted password after authentication??

    I'm sorry if my question is trivial, I just have to study so I don't mess up my clients' accounts!
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What I tried to say is that you cannot undo the encryption. You cannot convert encrypted passwords to unencrypted ones.
     

Share This Page