see which groups a user is in linux code example
Example 1: check which users are part of a group linux
grep 'group-name-here' /etc/group
Example 2: linux user groups
groups $username
grep 'group-name-here' /etc/group
groups $username