From owner-freebsd-questions Fri Jun 28 09:04:28 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA10143 for questions-outgoing; Fri, 28 Jun 1996 09:04:28 -0700 (PDT) Received: from tombstone.sunrem.com (tombstone.sunrem.com [206.81.134.54]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id JAA10131 for ; Fri, 28 Jun 1996 09:04:25 -0700 (PDT) Received: (from brandon@localhost) by tombstone.sunrem.com (8.6.12/8.6.12) id JAA00431; Fri, 28 Jun 1996 09:45:51 -0600 Date: Fri, 28 Jun 1996 09:45:50 -0600 (MDT) From: Brandon Gillespie To: Weldon S Godfrey 3 cc: questions@freebsd.org Subject: Re: Linux passwd -> FBSD passwd utility In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Fri, 28 Jun 1996, Weldon S Godfrey 3 wrote: > I would like to setup a FBSD box to replace an Linux system, but there is > the issue of porting the passwords over. Does anyone have, or know where > to get, an utility/method to import linux passwords into a FreeBSD box? > > Weldon I dont know about a linux system with shadow passwords, but this will work elsewhere (assuming they are using the same password encryption scheme ----cut here---- #!/usr/bin/perl ## ## syntax: frobpwd < linux.passwd > freebsd.passwd ## ## No guarantees about the suitability or functionality of this script, ## I just hacked it up from memory of one I have used before ## while () { chomp; ($name, $pwd, $uid, $gid, $gcos, $home, $shell) = split(/:/); print "$name:$pwd:$uid:$gid::0:0:$gcos:$home:$shell\n"; }