is there a way to query LDAP with a syntax similar to the “IN” statement in SQL? I mean by providing a list of value instead of repeating the field name again and again.
Let me explain:)
I have a query similar to:
(|(name=joe)(name=bill)(name=mark)(name=john)(name=rob))
Is there a way to shrink this query to get something like this:
(name=joe,bill,mark,john,rob)
Thanks
Unfortunatelly no. The ldapsearch filter has to conform to the RFC2254 standard.
But you can always write your own wrapper (for example shell script invoking ldapsearch) that will rewrite your list-like syntax into proper RFC2254 syntax 🙂