>>Is there a command(or combination of) that I could use to find out the
>>number of groups and their names that exist on the machine??
>Number of groups: wc -l /etc/group
>Their names: cut -d: -f1 /etc/group
Note that due to limitations on the number of characters in a single line
in /etc/group (or its NIS equivalent) you may have been forced to split
these into several entries with the same GID. Ie, instead of
group:*:100:lots,and,lots,of,usernames (typically > 1K characters)
in some circumstances you have to use:
which will work fine, but if you really want an exact answer to the number
of groups on your system you have to take into account identical GIDs in the
group file/NIS map.
Knut Borge, Center for Information Technology Services