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.



[1]
http://www.freebsd.org/cgi/man.cgi?query=group&apropos=0&sektion=5&manpath=FreeBSD+7-current&format=html

John
-- 
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order.       -- Larry Wall

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to