CONFIGURING


Table of operators used in ldapsearch search filters
There are a number of operators you can use in ldap searches.

About this task

Table 1. Operators to use in a search filter
OperatorUse toExample
=Find entries that contain an attribute with a value equal to a specified value"cn=John Browning"
= <string>*<string>Find entries that contain an attribute with a value equal to a specified substring"cn=John*"

"cn=J*Brown"

>=Find entries that contain an attribute with a value that is numerically or alphabetically greater than or equal to a specified value"cn>=D"
<=Find entries that contain an attribute with a value that is numerically or alphabetically less than or equal to a specified value"roomNumber<=300"
=*Find entries that contain a value for a specified attribute, regardless of the attribute value."sn=*"
~=Find entries that contain an attribute with a value approximately equal to a specified value."sn~=Brning" could return sn=Browning
&Find entries that meet the criteria specified in all search filters"(&(cn=John Browning)(l=Dallas))"
|Find entries that meet the criteria specified in at least one specified search filter"(|(cn=John Browning)(l=Dallas))"
!Find entries that do not meet the criteria specified in search filter"(!(cn=John Browning))" or "(!(l=Dallas))"

Related concepts
ldapsearch utility

Related tasks
Using search filters with ldapsearch
Table of ldapsearch parameters
Using ldapsearch to return operational attributes
Examples of using ldapsearch