pcstru Posted April 24, 2013 Posted April 24, 2013 I'm using the MS Active Directory Users and Computers Management Console, using find, selecting custom search and then clicking on teh advanced tab to run queries. Simple queries, (objectClass=person) work fine. I'm trying to build a query which lists the members of a group, it should be : (&(objectClass=person)(memberOf=CN=,OU=,DC=,DC=org,DC=uk)) But it doesn't work. Infact, even (ObjectClass=person, OU=Users,DC=,DC=org,DC=uk) Doesn't work. I need to know what stupid I am doing!
mavhc Posted April 25, 2013 Posted April 25, 2013 I use (&(objectCategory=person)(ObjectClass=user)(memberof=CN=groupname,OU=Groups,DC=school,DC=local)(!(userAccountControl:1.2.840.113556.1.4.803:=2)) for enabled users in a group groupname in an ou Groups in a domain school.local, so remove the last part for all users (&(objectCategory=person)(ObjectClass=user)(memberof=CN=groupname,OU=Groups,DC=school,DC=local)) 1
pcstru Posted April 25, 2013 Author Posted April 25, 2013 Where I seem to be struggling is where the group lives in a container or OU other than the root I'm searching from. So we have something like School.Local->Users School.Local->Teachers School.Local->Students The group "Domain Users" lives in the container Users, but the people I want listed will be in Teachers or Students. So (&(objectCategory=person)(ObjectClass=user)(memberof=CN=Domain Users,CN=Users,DC=)) will list people/users in the container Users, but (&(objectCategory=person)(ObjectClass=user)(memberof=CN=Domain Users,OU=Teachers,DC=)) Returns no results. Does that make sense to anyone? If so, any thoughts?
Hedghog Posted April 25, 2013 Posted April 25, 2013 I think if your domain name inclues the .local suffix there should be an entry for DC=local
pcstru Posted April 25, 2013 Author Posted April 25, 2013 The domain is something.org.uk , so where I have written DC= the actual content expands to DC=something,DC=org,DC=uk
mavhc Posted June 6, 2013 Posted June 6, 2013 Don't confuse OUs and Groups, you're wanting to restrict the search to within an OU?
pcstru Posted June 7, 2013 Author Posted June 7, 2013 Don't confuse OUs and Groups, you're wanting to restrict the search to within an OU? I want the search to run across all OU's in the domain, regardless of what OU the group is in. The solution seems to be to make sure the group itself is at the root of the domain organisational structure.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now