Problem
You want to match more one or another pattern, in your LDAP search.
Solution
To match more one pattern or another we use the pipe symbol “|” .
Example
This is how to perform a logical OR LDAP search.
ldapsearch -x -v-D"cn=Manager,dc=demo,dc=net"-w secret
-b"dc=demo,dc=net" "(|(sn=Doe)(sn=Smith))"
Reference
[tags]ldapsearch syntax, openldap ldapsearch, LDAP Training School[/tags]