======================================= FreeBSD & Debian passwords ======================================= When migrating a server from Debian to FreeBSD you might want to preserve all the users and their passwords. You can recreate all the users in FreeBSD and then import their existing passwords from Debian /etc/shadow. --------------------------------------- The Debian /etc/shadow file has fields separated by ":" and the password field is the second field. waldo:$6$PHU39l6v$Q.UjuTDXYY1AUQ6rDzLeB5SNRXP7xq/AnMOP/GFup7JS.gd76Fm5qzVhNp6cKDU9Q0t41MLvLNVjzs7xxubAw0:17629:0:17629:7:0:: When the password encryption string begins with $6$ it means it was encrypted using sha512. --------------------------------------- 1. Create the users in FreeBSD as you normally would. 2. Run vipw and replace the password field with the ones from the Debian /etc/shadow file. waldo:$6$PHU39l6v$Q.UjuTDXYY1AUQ6rDzLeB5SNRXP7xq/AnMOP/GFup7JS.gd76Fm5qzVhNp6cKDU9Q0t41MLvLNVjzs7xxubAw0:17629:17629::0:0:Where Is Waldo:/home/waldo:/bin/sh 3. Save & quit. =======================================