From owner-freebsd-questions Tue Apr 16 12:52:18 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA03347 for questions-outgoing; Tue, 16 Apr 1996 12:52:18 -0700 (PDT) Received: from shell.aros.net (shell.aros.net [205.164.111.19]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id MAA03342 for ; Tue, 16 Apr 1996 12:52:11 -0700 (PDT) Received: (from angio@localhost) by shell.aros.net (8.7.5/Unknown) id NAA19540; Tue, 16 Apr 1996 13:50:46 -0600 (MDT) From: Dave Andersen Message-Id: <199604161950.NAA19540@shell.aros.net> Subject: Re: Converting Linux password files to FreeBSD master.passwd To: ernie@spooky.apana.org.au (Ernie Elu) Date: Tue, 16 Apr 1996 13:50:46 -0600 (MDT) Cc: questions@freebsd.org In-Reply-To: <199604161258.WAA00375@spooky.apana.org.au> from Ernie Elu at "Apr 16, 96 10:58:29 pm" X-Mailer: ELM [version 2.4ME+ PL13 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Lo and behold, Ernie Elu once said: > Is there a method if you don't run linux shadow passwords? > > I have about 450 users to convert, thats why I am still running linux on > most machines. > Ack! i realized that in my last message, I just sent pwunconv. The way I do it is to first pwunconv and then to run it through this script, which does exactly what you're asking for: -- angio@aros.net Complete virtual hosting and business-oriented system administration Internet services. (WWW, FTP, email) http://www.aros.net/ http://www.aros.net/about/virtual "There are only two industries that refer to thier customers as 'users'." $passwd_file = "linux-passwd"; $outfile = "bsd-master.passwd"; open(PASSWD, "$passwd_file") || die "Could not open passwd file: $!\n"; open(OUT, ">$outfile") || die "Could not open output: $!\n"; while () { $count++; chop; ($uname, $passwd, $uid, $gid, $name, $homedir, $shell) = split(/:/); printf(OUT "%s:%s:%d:%d::0:0:%s:%s:%s\n", $uname, $passwd, $uid, $gid, $name, $homedir, $shell); }