useradd and the default group

Bruno Wolff III bruno at wolff.to
Tue Apr 14 19:37:45 UTC 2009


On Tue, Apr 14, 2009 at 14:42:32 +0000,
  "Carl D. Roth" <roth at ursus.net> wrote:
> On Tue, 14 Apr 2009 04:29:41 +1000, Cameron Simpson wrote:
> 
> So from a UNIX programming perspective, then, a test for group membership 
> is then:
> 
>   1. is the user listed in the group membership list
> 
>   OR
> 
>   2. is the user's primary group equal to the target gid

That's not how it is done. Processes have a group list associated with them.
That list plus the gid are the lists a process is in.

The main affect is that group membership is determined when a process starts
unless something unusual is done.




More information about the users mailing list