passwd file and user accounts
dcasey at debtresolve.com
Sun Jul 8 20:02:01 UTC 2007
I didn't have as many accounts so I didn't even bother migrating them.
I add all my new accounts using pw rather then adduser. It is much
easier to script with this then adduser. My first approach would be the
1. add one account to freebsd.
2. Using chsh or vipw, copy the redhat password hash into the account,
and see if the password works as is. If I remember correctly I think
3. See if you have any accounts on your freebsd with a user or group
higher then 500.
4. Write a quick script to create the new user accounts. Make sure you
installed shells/bash. Should be simple enough using awk or cut. I would
keep the existing values from the linux passwd/shadow files, just make
them properly formatted for bsd. Keeping the old uid numbers where
possible is much less labor intensive then giving the users a new uid.
pw will let you script this easily too if you do not want to manually
edit the password files. If you create new uid's you will have to do a
find across the entire system and chown chgrp all your files for 700 users.
If you do choose to manually edit the password files, make sure to
backup and rebuild the hash properly with pwd_mkdb.
Lisa Casey wrote:
> This is probably a stupid question, but I'll ask it anyway...
> I have a Red Hat Linux system I need to get rid of. It is currently
> doing e-mail for approximately 700 users and is also doing radius
> authentication. I have setup a new FreeBSD computer to take it's
> place. I have everything setup now on the FreeBSD computer except for
> the user accounts and mailboxes. The mailboxes aren't a problem, I've
> used tar to move mailboxes before.
> 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?
> Lisa Casey
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions