ldapsearch208 Netscape Directory Server Configuration, Command, and File Reference • May 2002ldapsearchldapsearch is a configurable utility that enables you to locate and retrievedirectory entries via LDAP. This utility opens a connection to the specified serverusing the specified distinguished name and password, and locates entries based ona specified search filter. Search scopes can include a single entry, an entry’simmediate subentries, or an entire tree or subtree. Search results are returned inLDIF format.ldapsearch OptionsThe following three sections list the options which can be specified withldapsearch. The first section lists those options most commonly used, the secondsection lists SSL options, and the third lists less common options.Commonly Used ldapsearch OptionsThe following lists the most commonly used ldapsearch command-line options. Ifyou specify a value that contains a space [ ], the value should be surrounded bydouble quotation marks, for example, -b "ou=groups, dc=example,dc=com".-b Specifies the starting point for the search. The value specified here must be adistinguished name that currently exists in the database. This option isoptional if the LDAP_BASEDN environment variable has been set to a base DN.The value specified in this option should be provided in double quotationmarks. 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 suffixessupported by the local directory. To search this entry you must supply asearch base of "", a search scope of base and a filter of "objectclass=*".For example:-b "" -s base "objectclass=*"-D Specifies the distinguished name with which to authenticate to the server. Thisoption is optional if anonymous access is supported by your server. Ifspecified, this value must be a DN recognized by the Directory Server, and itmust also have the authority to search for the entries. For example:-D "uid=bjensen, dc=example,dc=com".