Date: Sun, 8 Jul 2007 07:30:12 -0400 From: "Andy Harrison" <aharrison@gmail.com> To: "Lisa Casey" <lisa@jellico.com> Cc: freebsd-questions@freebsd.org Subject: Re: passwd file and user accounts Message-ID: <a22ff2940707080430q7ec085efkdac78df240cae248@mail.gmail.com> In-Reply-To: <003701c7c0ac$f7a6f350$d5b9bfcf@lisac> References: <003701c7c0ac$f7a6f350$d5b9bfcf@lisac>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a22ff2940707080430q7ec085efkdac78df240cae248>