ldapsearch
ldapsearch
A configurable utility that allows you to locate and retrieve directory entries via
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 options
The following three sections list the options which can be specified with
ldapsearch
section lists SSL options and the third lists less common options.
Commonly Used ldapsearch options
The following lists the most commonly used ldapsearch command-line options. If
you specify a value that contains a space [ ], the value should be surrounded by
double quotation marks, for example,
-b
-D
-h
206
Netscape Directory Server Configuration, Command, and File Reference • January 2002
. The first section lists those options most commonly used, the second
Specifies the starting point for the search. The value specified here must be a
distinguished name that currently exists in the database. This option is
optional if the LDAP_BASEDN environment variable has been set to a base DN.
The value specified in this option should be provided in double quotation
marks. For example:
-b "cn=Barbara Jensen, ou=Product Development, dc=example,dc=com".
The root DSE entry is a special entry that contains a list of all the suffixes
supported by the local directory. To search this entry you must supply a
search base of "", a search scope of base and a filter of "objectclass=*".
For example:
-b "" -s base "objectclass=*"
Specifies the distinguished name with which to authenticate to the server. This
option is optional if anonymous access is supported by your server. If
specified, this value must be a DN recognized by the Directory Server, and it
must also have the authority to search for the entries. For example:
-D "uid=bjensen, dc=example,dc=com".
Specifies the hostname or IP address of the machine on which the Directory
Server is installed. If you do not specify a host, ldapsearch uses the
localhost. For example, -h mozilla.
-b "ou=groups, dc=example,dc=com"
.
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.01 and is the answer not in the manual?
Questions and answers