Primary and Supplementary Group Memberships

Hearn, Stan J. stan.hearn at nscorp.com
Wed Oct 1 16:30:48 UTC 2008


I'm under the impression that if an account has a primary group it
doesn't need to be (or shouldn't be) listed in /etc/group as a member.
I have some admins that want to put everyone in the /etc/group file.
That way you'll have all group memberships in one place.  I have a
script that will generate a new report based on the /etc/group file with
supplementary members and primary members from the /etc/passwd file.
I'm wanting to use that when we need "everything in place" for some
reason.

I've always been under the impression that populating /etc/group with
primary members is not desired.

Why does RHEL out of the box, do this with system accounts?  Is it just
to keep things from breaking if someone decides to change the primary
group for a system account?  When you add a new user using the GUI and
it creates a new GID, does it put the user in /etc/group even though it
is it's primary group?

For example from RHEL 5.2:

/etc/shadow
root:x:0:halt,operator,root,shutdown,sync
bin:x:1:bin,daemon,root
daemon:x:2:bin,daemon,root
adm:x:4:adm,daemon,root
lp:x:7:daemon,lp

/etc/passwd
root:x:0:0:
bin:x:1:1:
daemon:x:2:2:
adm:x:3:4:
lp:x:4:7:

Thanks,
Stan




More information about the redhat-sysadmin-list mailing list