Linux Show All Members of a Group
Display members of a group using /etc/group file
Use the grep command as follows (we are looking group named "ftponly"):
grep ftponly /etc/group |
To get just a list of all members of a group called "ftponly", type the following awk command:
awk -F':' '/ftponly/{print $4}' /etc/group |
Display group memberships for each Linux user
Want to see group memberships for each given USERNAME under Linux? The syntax is as follows for the groups command:
groups your-user-name-here |