On Thu, Dec 21, 2006 at 03:06:38AM -0800, John W. Krahn wrote: > Chad Perrin wrote: > > On Wed, Dec 20, 2006 at 05:28:46PM -0800, John W. Krahn wrote: > >> > >> Since you are only reading from /etc/group you are not picking up the > >> primary > >> group stored in /etc/passwd. > > > > Singling out the primary group wasn't a requirement for the Perl script, > > as far as I recall. If I'm mistaken, then yeah, you might want to check > > /etc/passwd for the primary group. If not, you'll get the primary group > > along with the rest of them from /etc/group (but it won't be identified > > as any different from the rest of them). > > > > At least, that's how it works here. > > According to the FreeBSD group(5) man page[1]: > > <QUOTE> > A user is automatically in a group if that group was speci- > fied in their /etc/passwd entry and does not need to be added to that > group in the group file. > </QUOTE> > > And on my current system (SuSE 9.3) that is the case as well, which is why I > said that you have to get the primary group from the /etc/passwd file.
Interesting. On this FreeBSD machine, all primary groups for user accounts are listed in the group file, along with any other group memberships. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] Brian K. Reid: "In computer science, we stand on each other's feet." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>