From owner-freebsd-isp Thu Jan 15 10:49:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA26280 for freebsd-isp-outgoing; Thu, 15 Jan 1998 10:49:07 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from qc.securenet.net ([198.168.76.43]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA26275 for ; Thu, 15 Jan 1998 10:48:58 -0800 (PST) (envelope-from vandj@securenet.net) Received: from office (office.securenet.net [205.236.147.3]) by qc.securenet.net (8.8.7/8.8.5) with SMTP id NAA09444 for ; Thu, 15 Jan 1998 13:49:16 -0500 (EST) Message-Id: <3.0.5.32.19980115135353.00a97340@mail.securenet.net> X-Sender: vandj@mail.securenet.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Thu, 15 Jan 1998 13:53:53 -0500 To: isp@FreeBSD.ORG From: "John M. Vandette" Subject: Re: Moving from Linux to FreeBSD In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by hub.freebsd.org id KAA26277 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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..."**