Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hello Support,
Can you please tell me how to search for all the parent groups to which a particular child group is a member?
Commanline or Admin GUI. Anything will work.
Thank you.
Regards
Pashan
Solved! Go to Solution.
If you are using LDAP groups, then we cannot find this information from Integrity. The only way to find a list of members for a group is with "aa groups --members [groupname]". This command lists all users, including those in a subgroup, but does not list subgroups.
If you are using MKS Domain groups, then this is possible, but not easy.
"integrity viewmksdomaingroup [groupname]" will show the group members including groups.
ou would need to get a list of the groups (integrity mksdomaingroups), then run the integrity viewdomaingroup command on each group, then search the output for the subgroup you are looking for.
For example:
D:/>integrity mksdomaingroups > grouplist.txt
D:/>integrity viewmksdomaingroup -Fgrouplist.txt > viewgroups.txt
D:/>grep -e Group -e Name viewgroups.txt
Name: Administrators
Group Members:
Name: Analysts
Group Members:
Name: Developers
Group Members:
Name: Executives
Group Members:
Developers:Group
Name: Inputs Review Team
Group Members:
Name: Managers
Group Members:
Name: Requirements Review Team
Group Members:
Name: Specifications Review Team
Group Members:
Name: Tests Review Team
Group Members:
Name: test
Group Members:
Administrators:Group
Analysts:Group
Name: test2
Group Members:
Requirements Review Team:Group
Specifications Review Team:Group
test:Group
Name: test3
Group Members:
Analysts:Group
Developers:Group
If the subgroup I'm looking for is Analysts, then from this output I can see that it is part of test3 and test, and test is part of test2. (Note: you can use findstr or another search utility instead of grep)
With more groups, you would want to script this. Performance will depend on number of groups and users, and whether users are in MKS Domain or LDAP.
.
If you are using LDAP groups, then we cannot find this information from Integrity. The only way to find a list of members for a group is with "aa groups --members [groupname]". This command lists all users, including those in a subgroup, but does not list subgroups.
If you are using MKS Domain groups, then this is possible, but not easy.
"integrity viewmksdomaingroup [groupname]" will show the group members including groups.
ou would need to get a list of the groups (integrity mksdomaingroups), then run the integrity viewdomaingroup command on each group, then search the output for the subgroup you are looking for.
For example:
D:/>integrity mksdomaingroups > grouplist.txt
D:/>integrity viewmksdomaingroup -Fgrouplist.txt > viewgroups.txt
D:/>grep -e Group -e Name viewgroups.txt
Name: Administrators
Group Members:
Name: Analysts
Group Members:
Name: Developers
Group Members:
Name: Executives
Group Members:
Developers:Group
Name: Inputs Review Team
Group Members:
Name: Managers
Group Members:
Name: Requirements Review Team
Group Members:
Name: Specifications Review Team
Group Members:
Name: Tests Review Team
Group Members:
Name: test
Group Members:
Administrators:Group
Analysts:Group
Name: test2
Group Members:
Requirements Review Team:Group
Specifications Review Team:Group
test:Group
Name: test3
Group Members:
Analysts:Group
Developers:Group
If the subgroup I'm looking for is Analysts, then from this output I can see that it is part of test3 and test, and test is part of test2. (Note: you can use findstr or another search utility instead of grep)
With more groups, you would want to script this. Performance will depend on number of groups and users, and whether users are in MKS Domain or LDAP.
.