OK this is a basic question showing my ignorance of sysadmin matters…
Looking at the UNIX system I work on, my /etc/passwd entry says
my_name:x:uid:gid:comments:home directory:login shell
Then when I go and look at group 'gid' in /etc/group, I see
group_name:x:gid:some_other_name
So how come /etc/passwd thinks I am a member of the group, but /etc/group doesn't? Am I a member of the group or aren't I?
Is this normal? Your help would be appreciated.
Best Answer
/etc/passwd
shows each user's primary group./etc/group
shows users who have a given group as one of their supplementary groups. For example, my usernamedan
has the groupdan
as its primary group, so that is what appears in the group field in/etc/passwd
. The userdan
is also in the groupswheel
,mailadmin
andsvn
, so the entries for those groups in/etc/group
listdan
in the final field, which denotes group members.