From owner-freebsd-questions@FreeBSD.ORG Wed Jan 30 19:29:43 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADA6F16A46C for ; Wed, 30 Jan 2008 19:29:43 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from unsane.co.uk (www.unsane.co.uk [85.233.185.162]) by mx1.freebsd.org (Postfix) with ESMTP id 3A70F13C4E1 for ; Wed, 30 Jan 2008 19:29:43 +0000 (UTC) (envelope-from jhary@unsane.co.uk) Received: from crab.unsane.co.uk (crab.unsane.co.uk [10.0.0.111]) (authenticated bits=0) by unsane.co.uk (8.14.0/8.14.0) with ESMTP id m0UJRs4i006524 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 30 Jan 2008 19:27:54 GMT (envelope-from jhary@unsane.co.uk) Message-ID: <47A0CF5C.6000400@unsane.co.uk> Date: Wed, 30 Jan 2008 19:26:20 +0000 From: Vince User-Agent: Thunderbird 2.0.0.9 (X11/20080125) MIME-Version: 1.0 To: Sean Murphy References: <47A0CA04.7060100@calarts.edu> In-Reply-To: <47A0CA04.7060100@calarts.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Password file migration help 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: Wed, 30 Jan 2008 19:29:43 -0000 Sean Murphy wrote: > I have a FreeBSD 5.4 system and would like to migrate users in the > password file with UIDs 3000 through 5000 to a FreeBSD 6.3 system on a > running on a separate box. Is there a way to export just those users? > hmm very roughly just a for uid in $(jot 2001 3000); do grep $uid /etc/master.passwd > accountstokeep.txt ; done should extract the accounts from the old server (no error checking though so if any other account has a gid in the range 3000 to 5000 it will also be caught. Then in theory cat accountstokeep.txt >> /etc/master.passwd followed by pwd_mkdb -p /etc/master.passwd should be enough. Again care should be taken that there are no conflicting accounts already in the /etc/master.passwd file. (a quick for uid in $(jot 2001 3000); do grep $uid /etc/master.passwd ; done on the new machine before adding to it should give you a quick check.) dont forget to ensure shells and home directories are available as needed Vince > Thanks > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"