strange /etc/group behavior

I was under the impression that the /etc/group file only shows ids that belong to a group, as in:

staff::10:www,test

when the id's are added as secondary groups. On some of my systems I see that the id's are shown when it is their primary group. Others only show when added to secondary groups with the usermod -G command. Anybody know the rhyme or reason that is used to show the id's that belong to a group? All my systems seem to show differently...

[481 byte] By [mvmurphy] at [2007-11-25 23:39:19]
# 1

> I was under the impression that the /etc/group file

> only shows ids that belong to a group, as in:

>

> staff::10:www,test

"shows"? It's a plain text file. It'll show whatever has been placed into it.

> when the id's are added as secondary groups. On some

> of my systems I see that the id's are shown when it

> is their primary group. Others only show when added

> to secondary groups with the usermod -G command.

> Anybody know the rhyme or reason that is used to show

> the id's that belong to a group? All my systems seem

> to show differently...

I don't think useradd or usermod will add it to that file for the primary group, but some other utility or administrator may be doing so. It shouldn't hurt anything unless you're up against length limits on the contents.

--

Darren

Darren_Dunham at 2007-7-5 18:22:59 > top of Java-index,General,Talk to the Sysop...