'Auding branch of NFS to find unique groups

Is there a way to audit all the different groups used in a directory tree on my NFS system? I want to see all the different groups that are used in hopes of condensing the total amount of groups on my system.

Currently Ive been running into permissions issues for users related to NFS 16 group limit, where creation of a new group to deal with a specific permissions case causes users elsewhere to loose permission because they are in more than 16 groups.

https://www.xkyle.com/solving-the-nfs-16-group-limit-problem/



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source