Date: Thu, 15 Jan 1998 13:53:53 -0500 From: "John M. Vandette" <vandj@securenet.net> To: isp@FreeBSD.ORG Subject: Re: Moving from Linux to FreeBSD Message-ID: <3.0.5.32.19980115135353.00a97340@mail.securenet.net> In-Reply-To: <Pine.BSF.3.96.980115160554.10133A-100000@datorn.teligent.s e>
next in thread | previous in thread | raw e-mail | index | archive | help
At 04:09 PM 1/15/1998 +0100, you wrote: >Hello. > >I'm going to upgrade our mail/www-server. It's now running a very old >version of Linux, and on the new server I want to run FreeBSD. My >question is if there is an easy way of moving the user accounts from Linux >to FreeBSD? Can I just copy the password file and home directory? Or is >there some other way to do this? Any other things I should have in mind >when doing this? > >TIA > >/Jakob Alvermark > >------------------------------------------------------- > Teligent AB, P.O. Box 213, S-149 23 Nynäshamn, Sweden >Telephone +46-(0)8 520 660 00 * Fax +46-(0)8 520 193 36 > Direct +46-(0)8 520 660 32 * GSM +46-(0)70 792 16 57 Linux uses DES encryption so you will need the secure version of FreeBSD then convert the Linux PassWord file to the FreeBSD PassWord file format. There are probably better ways of doing this, but this well get the two in sync, and you can go from there. --begin-- #!/usr/bin/awk -f BEGIN { FS = ":" ; OFS = ":" } { print $1, $2, $3, $4, "", 0, 0, $5, $6, $7 } --end-- Use it like this (on the BSD machine): - put the above in a file, eg. /tmp/pw_convert. - make a backup of your /etc/master.passwd file. - make another copy of /etc/master.passwd in /tmp - get the password file off the Linux machine, and put it in /tmp/linux.passwd. Edit out all the users that aren't your customers. (eg. 'root' 'bin' and all them) - use the script : # cd /tmp # awk -f pw_convert < linux.passwd >> master.passwd be VERY SURE that you use the _two_ '>' signs for the output. - edit the /tmp/master.passwd file, and make sure that it looks right. Check it : # pwd_mkdb -c master.passwd - install it as the new password database with # pwd_mkdb -p master.passwd John M. Vandette **John M. Vandette, Consultant vandj@securenet.net** **SecureNet Information Services Inc. Internet Providers** **100 Alexis Nihon Blvd #940 St. Laurent, Quebec, Canada** **"Who does BSD Unix....?" "We do Chucky... We do..."**
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.19980115135353.00a97340>