6.4 ldapsearch
The configurable utility named ldapsearch locates and retrieves directory entries through LDAP. This utility opens a connection to the specified server using the specified distinguished name and password and locates entries based on a specified search filter. Search scopes can include a single entry, an entry's immediate subentries, or an entire tree or subtree. Search results are returned in LDIF format.
•“ldapsearch syntax” (page 190)
•
•“Persistent search options” (page 192)
•“ldapsearch SSL options” (page 192)
•“ldapsearch SASL options” (page 193)
•“Additional ldapsearch options” (page 199)
6.4.1ldapsearch syntax
ldapsearch
For any value that contains a space ( ), the value should be enclosed in double quotation marks. For example:
Table
Option | Description |
optional_options | A series of |
| if used. |
|
|
"(filter)" | An LDAP search filter as described in |
| Do not specify a search filter if search filters are supplied in a file using the |
| option. |
optional_list_of_attributes A list of
To return operational attributes as a result of a search operation, they must be explicitly specified in the search command. To retrieve regular attributes along with
6.4.2 Commonly-used ldapsearch options
Table
The most common ldapsearch usage specifies the host and port number, bind DN and password, scope, base DN, and a filter that returns every entry under the search base:
ldapsearch
190