/build/static/layout/Breadcrumb_cap_w.png

How do I query devices in OU for LDAP label?

I am trying to create LDAP labels based on AD OU groups.  I have the following AD structure that is structured the same for 6 locations:

Base DN--

    --Office1 (OU)

        --Servers (OU)

        --Workstations (OU)


When trying to create a search filter that selects the correct devices for the label, I am getting all devices in the domain or none.  I have read just about every article I can find on the topic, but I am still missing something somewhere.  Please help me understand the LDAP query feature and the LDAP Browser.

Here is what I am testing on:

Base DN:  DC=domain,DC=com

Advanced search and results: 

  • (&(objectClass=computer)) - I get a list of all computers on the domain as expected
  • (&(name=KBOX_COMPUTER_NAME)(objectClass=computer)) - I get "No matching Entries" but that is expected, if I use actual device name it matches on the one device, so I know the query is working

However, I need to query the specific OUs

  • (&(objectClass=computer)(memberOf=OU=Servers,OU=Office1,DC=domain,DC=com)) - any time I try to include the "memberof" criteria I get "No matching Entries"
  • (&(objectClass=computer)(memberOf=DC=domain,DC=com)) - I still get "No matching Entries" even without the OUs listed

I am fairly certain that I understand that I will need the "(name=KBOX_COMPUTER_NAME)" in the final query to make the LDAP label work correctly, but I would like to be able to test that I am selecting the correct computers in an OU.  How can I do this?

Thank you...


0 Comments   [ + ] Show comments

Answers (1)

Answer Summary:
Posted by: getElementById 8 years ago
Third Degree Blue Belt
1

Top Answer

My AD is structured in a similar manner so I found it easier to just change the Base to the OU I'm searching in. 

ex: Base DN: ou=workstation,ou=office1,dc=your,dc=domain,dc=com.

Here are some other articles:
http://www.itninja.com/question/ldap-label-help
http://www.itninja.com/question/k1000-create-a-smart-label-for-computers-in-an-ou

Hope this helps!

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ