From owner-freebsd-questions@FreeBSD.ORG Sun Jul 8 11:30:13 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6829216A535 for ; Sun, 8 Jul 2007 11:30:13 +0000 (UTC) (envelope-from aharrison@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.freebsd.org (Postfix) with ESMTP id 289EB13C468 for ; Sun, 8 Jul 2007 11:30:12 +0000 (UTC) (envelope-from aharrison@gmail.com) Received: by py-out-1112.google.com with SMTP id a73so1220658pye for ; Sun, 08 Jul 2007 04:30:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fBMWcyoIexlQmOhU7jzRB8Iu03/YTvzvgl5y08ytNFa5pYXqQeHMYPb5pfxo/WTO0MUPD21VtKXSVjOQhopwfYZg5mFK1ATDbwo3n1cWkYrAYzPus2Wywz3LCrCCZyKMs6skQCNUuNmbtJ55B5GS7ynCKQblwN5c7ElKlP0c/zY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=W88oKGEOjIOZix6pSxWonA2SYw839fwPK41BV9TXEALvy/IqFeodo+nQmF48o9+oMem4bY3LcEf+6OPJpmhCPXjS1602syIblYYicHPwxVEuogs5Egy7H/gN074Fv98bps4vOIUbhb8xxKmyz/0CB/yQy2IHZgmu1pyhwoCKor0= Received: by 10.64.143.12 with SMTP id q12mr3302818qbd.1183894212328; Sun, 08 Jul 2007 04:30:12 -0700 (PDT) Received: by 10.65.211.8 with HTTP; Sun, 8 Jul 2007 04:30:12 -0700 (PDT) Message-ID: Date: Sun, 8 Jul 2007 07:30:12 -0400 From: "Andy Harrison" To: "Lisa Casey" In-Reply-To: <003701c7c0ac$f7a6f350$d5b9bfcf@lisac> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <003701c7c0ac$f7a6f350$d5b9bfcf@lisac> Cc: freebsd-questions@freebsd.org Subject: Re: passwd file and user accounts X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2007 11:30:13 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 7/7/07, Lisa Casey wrote: > I suppose I cannot simply copy /etc/passwd, /etc/group and /home from the > Redhat computer to the FreeBSD computer due to the password hash in > /etc/passwd. Am I correct on this? Would it be possible to copy /etc/passwd > then (before the new system goes "live") reset all the passwords with the > passwd command? That might be easier than adding in close to 700 accounts > using adduser. Does anyone have a better idea of how I might go about > doing this? The other answers to your question are more informative, but I just thought I'd point out the chpass command. I no longer have access to the script I wrote before, but it wasn't difficult. I just wrote a little script that read the passwd and shadow files, ignored the system accounts, and then constructed a valid line for the master.passwd file, then just fed it to the system with chpass -a "$new_entry" - -- Andy Harrison public key: 0x67518262 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGkMryNTm8fWdRgmIRAl7+AJ0SHBQGrtESAgj3uAyCvj0y57fReACgw5po Ueuco3rkR/VseXPMqOjzb+4= =d8g0 -----END PGP SIGNATURE-----