[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving from BSDi

At 05:39 PM 10/28/2002 +0100, Russell Coker wrote:
Debian supports both DES and MD5 hashing of passwords.  If the BSD passwords
for your accounts are in one of those formats then it'll be trivial to
convert them.

You could create a test account and set a password, then post the lines from
/etc/passwd and /etc/shadow here and we'll try and devise some sort of
proceedure for you...

I just found a script that may do this and I copied it below. I have considered using
Postfix with MySQL, is there a way to get the accounts into MySQL even though
the passwords are encrypted?

Here is the script:

# Simple FreeBSD-to-Linux password converter
#  -- Linux must be using shadow passwords
# Nickolai Zeldovich, 1998
# http://kolya.net/, kolya@zepa.net
# Config stuff:
# "/etc/passwd" on a FreeBSD machine
# "/etc/master.passwd" in a FreeBSD machine
# Where you want the Linux version of passwd file
# Where you want the Linux version of shadow file
# Go for it..
while(<FM>) {
    chop $_;
    ($user,$cryptpw,@etc)= split(/\:/);
$count = 999;
while(<FP>) {
    chop $_;
    print LP "$user:x:$count:100:$gecos:/home/$user:/bin/bash\n";
    print LS "$user:$pw{$user}:10000:0:99999:7:::\n";

Reply to: