Previous Topic: Failed Search: 0 Records Returned

Next Topic: Determine which Attribute Names have Values

Narrow Your Search

Use the -f parameter with the pdm_ldap_test command to specify a filter to be added to the base filter for narrowing the search criteria. You must use appropriate LDAP syntax and LDAP schema attribute names in your filter. Surround your filter with double quotation marks and use parenthesis to clarify the order of operator precedence.

For example, use the following command to search for all records where sn=Account_10001:

pdm_ldap_test -f “(sn=Account_10001)”

The pdm_ldap_test utility supports the following equality operators:

Equality Operator

Description

=

equal to

<=

less than or equal to

>=

greater than or equal to

~=

like

The pdm_ldap_test utility supports the following Boolean operators:

Boolean Operator

Description

&

AND

|

OR

!

NOT

The AND and OR operators affect each set of parenthesis () in the search filter. The NOT only affects the first set of parenthesis. Always place these operators before the search filters to be operated on, rather than between them. They can be applied to any number of filters, as shown in the following examples:

“(&(sn=Brown)(initials=A)) “
“(|(sn=Brown)(sn=Smith))”
“(!sn=Brown)”