Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LDAP Query "OR"

Status
Not open for further replies.

djwatts

Programmer
Joined
Nov 10, 2004
Messages
91
Location
GB
Hi,

I'm normally ok writing SQL queries and whatnot but LDAP seems to have a bit more to it (i guess because its lightweight). I'm trying to query AD to return two users from a domain by their names. I can't seem to get the OR function to work using the pipe | operator. Is this right or am I way off? Are my () all in the wrong place? It#s a friday afternoon and its starting to get the better of me... See the query below

Code:
(&(!cn=SystemMailbox{*})(&(objectCategory=user)(cn=UserName1*)) | (&(objectCategory=user)(cn=UserName2*)))

Any help greatly appreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top