How do I view the members of a group?
You can use getent
to display the group's information. getent
uses library calls to fetch the group information, so it will honour settings in /etc/nsswitch.conf
as to the sources of group data.
Example:
$ getent group simpsons
simpsons:x:742:homer,marge,bart,lisa,maggie
The fields, separated by :
, are—
- Group name
- Encrypted password (not normally used)
- Numerical group ID
- Comma-separated list of members
list members:
getent group <group>
And what rights? On filesystem, sudo, ssh? On filesystem:
find / -xdev -group <group>