T
Timothy H. Schilbach
Hi Everyone,
I am trying to construct an LDAP query that will return some information.
My Cirteria is:
1. Get everyone with an email address ("MAIL")
2. Do a subtree search from the root (No problem)
3. Exclude anyone who is in the "Contractors" OU
Ok the 1st 2 are very easy and I used this query to do them:
(&(objectClass=person)(mail=*))
Ok and #3 is easy too by itself like so:
(&(objectClass=organizationalUnit)(!distinguishedName=OU=contractors,DC=doma
in,DC=com))
ok Now how do we combine them for a compound query? I have tried:
(&(objectClass=person)(mail=Timothy*)(&(objectClass=organizationalUnit)(!dis
tinguishedName=OU=contractors,DC=domain,DC=com)))
And it doesnt seem to return anything. I know this can be done, just have
the syntax all goofed I think. Anyone care to take a crack at this?
-Timothy
I am trying to construct an LDAP query that will return some information.
My Cirteria is:
1. Get everyone with an email address ("MAIL")
2. Do a subtree search from the root (No problem)
3. Exclude anyone who is in the "Contractors" OU
Ok the 1st 2 are very easy and I used this query to do them:
(&(objectClass=person)(mail=*))
Ok and #3 is easy too by itself like so:
(&(objectClass=organizationalUnit)(!distinguishedName=OU=contractors,DC=doma
in,DC=com))
ok Now how do we combine them for a compound query? I have tried:
(&(objectClass=person)(mail=Timothy*)(&(objectClass=organizationalUnit)(!dis
tinguishedName=OU=contractors,DC=domain,DC=com)))
And it doesnt seem to return anything. I know this can be done, just have
the syntax all goofed I think. Anyone care to take a crack at this?
-Timothy