Print Download PDF Send Feedback

Previous

Next

ldapsearch

Description ldapsearch queries an LDAP directory and returns the results.

Syntax

ldapsearch [options] filter [attributes] -d

Parameter

Description

options

See the options attributes below.

filter

RFC-1558 compliant LDAP search filter. For example,

objectclass=fw1host.

attributes

The list of attributes to be retrieved. If no attributes are given, all attributes are retrieved.

-d

Debug flag.

The following are the attributes for options:

Example ldapsearch -p 18185 -b cn=omi objectclass=fw1host objectclass

This means that the LDAP directory will be queried for fw1host objects using port number 18185 with DN common name "omi". For each object found, the value of its objectclass attribute will be printed.