Re: Password file migration help
- From: Jonathan McKeown <jonathan+freebsd-questions@xxxxxxxxxx>
- Date: Thu, 31 Jan 2008 09:34:38 +0200
On Wednesday 30 January 2008 21:03, 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?
I'd probably sort /etc/master.passwd and pipe through awk:
sort -t ':' -k3,3n /etc/master.passwd | \
awk -F ':' '$3 ~ /^3[0-9][0-9][0-9]/, $3 ~ /^5/ { print }'
This will sort /etc/master.passwd numerically on the third field, uid, and
then give you all the lines starting with the first one where the uid is a
3 followed by at least three digits, up to and including the first one after
that where the first digit of the uid is a 5.
If you capture the output you should be able to merge it on the new host.
Jonathan
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
- References:
- Password file migration help
- From: Sean Murphy
- Password file migration help
- Prev by Date: Re: vi+urxvt8.9+oxim for traditional chinese, HOW??
- Next by Date: cron to attach a gz file
- Previous by thread: Re: Password file migration help
- Next by thread: Re: Password file migration help
- Index(es):
Relevant Pages
|
|