Using ldapsearch
•
You have configured your directory to support anonymous access for search
and read. You do not have to specify any bind information in order to perform
the search. For more information on anonymous access, see "Defining User
Access - userdn Keyword," on page 208.
•
The server is located on hostname
•
The server uses port number
to identify the port number on the search request.
•
SSL is enabled for the server on port
•
The suffix under which all data is stored is
Returning All Entries
Given the previous information, the following call will return all entries in the
directory:
ldapsearch -h mozilla -b "dc=example,dc=com" -s sub "objectclass=*"
"
objectclass=*
Specifying Search Filters on the Command Line
You can specify a search filter directly on the command line. If you do this, be sure
to enclose your filter in quotation marks ("filter"). Also, do not specify the
option. For example:
ldapsearch -h mozilla -b "dc=example,dc=com" "cn=babs jensen"
Searching the Root DSE Entry
The root DSE, is a special entry that contains a list of all the suffixes supported by
the local directory server. You can search this entry by supplying a search base of
"". You must also specify a search scope of
For example:
ldapsearch -h mozilla -b "" -s base "objectclass=*"
Searching the Schema Entry
Directory Server stores all directory server schema in the special
This entry contains information on every object class and attribute defined for your
directory server.
You can examine the contents of this entry as follows:
ldapsearch -h mozilla -b "cn=schema" -s base "objectclass=*"
508
Netscape Directory Server Administrator's Guide • May 2002
. Since this is the default port, you do not have
389
" is a search filter that matches any entry in the directory.
.
mozilla
(the default SSL port number).
636
dc=example,dc=com
and a filter of
base
.
-f
.
"objectclass=*"
entry.
cn=schema
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.02 - ADMINISTRATOR and is the answer not in the manual?
Questions and answers