cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

How to search for all the parent groups membership for a child group

pnone
8-Gravel

How to search for all the parent groups membership for a child group

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

 

ACCEPTED SOLUTION

Accepted Solutions
awalsh
17-Peridot
(To:pnone)

 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. 

View solution in original post

1 REPLY 1
awalsh
17-Peridot
(To:pnone)

 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. 

Announcements


Top Tags