July 15th, 2004, 11:58 AM
filter on 2 organizational units
I need to run a query on an LDAP server but rather than pass a base DN for my search, I need to look in 2 different organizational units. ie.
baseDN = "ou=People,o=Company"
but I want to look in 2 org units under people, there may be 100s of units but I only want to search within 2.
I thought it would be something like...
July 15th, 2004, 12:24 PM
Your filter WILL work and just put the base dn as o=Company should get you the results but it's not how you think it works.
You DON'T specify the base dn within the filter, it is added seperately. If your server is indexed on cn then searching with a basedn of o=Company should get you a pretty fast result.