Date: Wed, 30 Jan 2008 19:26:20 +0000 From: Vince <jhary@unsane.co.uk> To: Sean Murphy <smurphy@calarts.edu> Cc: freebsd-questions@freebsd.org Subject: Re: Password file migration help Message-ID: <47A0CF5C.6000400@unsane.co.uk> In-Reply-To: <47A0CA04.7060100@calarts.edu> References: <47A0CA04.7060100@calarts.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47A0CF5C.6000400>