Appendix B. Finding Directory Entries

Option

Description

 

 

 

useful for sorting according to a matching

 

rule, as with an international search. In

 

general, it is faster to sort on the server rather

 

than on the client.

 

 

-z

Sets the maximum number of entries to return

 

in response to a search request. For example,

 

-z 1000. Normally, regardless of the value

 

specified here, ldapsearch never returns

 

more entries than the number allowed by the

 

server'snsslapd-sizelimitattribute.

 

However, this limitation can be overridden by

 

binding as the root DN when using this

 

command-line argument. When binding as the

 

root DN, this option defaults to zero (0). The

 

default value for the nsslapd-sizelimit

 

attribute is 2000 entries.

 

 

For detailed information on all ldapsearch utility options, refer to the Directory Server Configuration, Command, and File Reference.

2.4. ldapsearch Examples

The next set of examples assumes the following:

The search is for all entries in the directory.

The directory is configured to support anonymous access for search and read. This means that no bind information has to be supplied in order to perform the search. For more information on anonymous access, see Section 4.2, “Defining User Access - userdn Keyword”.

The server is located on a host named mozilla.

The server uses port number 389. Since this is the default port, the port number does not have to be sent in the search request.

SSL is enabled for the server on port 636(the default SSL port number).

The suffix under which all data is stored is dc=example,dc=com.

2.4.1. Returning All Entries

Given the previous information, the following call will return all entries in the directory (subject to the configured size and time resource limits):

556

Page 576
Image 576
HP UX Red Hat Direry Server Software manual Ldapsearch Examples, Returning All Entries