Using ldapsearch506 Netscape Directory Server Administrator’s Guide • January 2002• You have configured your directory to support anonymous access for searchand read. You do not have to specify any bind information in order to performthe search. For more information on anonymous access, see “Defining UserAccess - userdn Keyword,” on page 206.• The server is located on hostname mozilla.• The server uses port number 389. Since this is the default port, you do not haveto identify the port number on 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.Returning All EntriesGiven the previous information, the following call will return all entries in thedirectory:ldapsearch -h mozilla -b "dc=example,dc=com" -s sub "objectclass=*"“objectclass=*” is a search filter that matches any entry in the directory.Specifying Search Filters on the Command LineYou can specify a search filter directly on the command line. If you do this, be sureto enclose your filter in quotation marks (“filter”). Also, do not specify the -foption. For example:ldapsearch -h mozilla -b "dc=example,dc=com" "cn=babs jensen"Searching the Root DSE EntryThe root DSE, is a special entry that contains a list of all the suffixes supported bythe local directory server. You can search this entry by supplying a search base of“”. You must also specify a search scope of base and a filter of "objectclass=*".For example:ldapsearch -h mozilla -b "" -s base "objectclass=*"Searching the Schema EntryDirectory Server stores all directory server schema in the special cn=schema entry.This entry contains information on every object class and attribute defined for yourdirectory server.You can examine the contents of this entry as follows:ldapsearch -h mozilla -b "cn=schema" -s base "objectclass=*"