![Netscape NETSCAPE DIRECTORY SERVER 6.1 - ADMINISTRATOR Administrator'S Manual Download Page 518](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-1-administrator/netscape-directory-server-6-1-administrator_administrators-manual_1674675518.webp)
Using ldapsearch
518
Netscape Directory Server Administrator’s Guide • August 2002
ldapsearch Examples
In the next set of examples, suppose the following are true:
•
You want to perform a search of all entries in the directory.
•
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 213.
•
The server is located on hostname
mozilla
.
•
The server uses port number
389
. Since this is the default port, you do not have
to 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 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=*
” is a search filter that matches any entry in the directory.
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
-f
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
base
and a filter of
"objectclass=*"
.
For example:
ldapsearch -h mozilla -b "" -s base "objectclass=*"
Summary of Contents for NETSCAPE DIRECTORY SERVER 6.1 - ADMINISTRATOR
Page 1: ...Administrator s Guide Netscape Directory Server Version6 1 August 2002...
Page 20: ...20 Netscape Directory Server Administrator s Guide August 2002...
Page 24: ...24 Netscape Directory Server Administrator s Guide August 2002...
Page 142: ...Using Referrals 142 Netscape Directory Server Administrator s Guide August 2002...
Page 440: ...Miscellaneous Tuning Tips 440 Netscape Directory Server Administrator s Guide August 2002...
Page 442: ...442 Netscape Directory Server Administrator s Guide August 2002...
Page 478: ...PTA Plug In Syntax Examples 478 Netscape Directory Server Administrator s Guide August 2002...
Page 498: ...498 Netscape Directory Server Administrator s Guide August 2002...
Page 538: ...Examples of LDAP URLs 538 Netscape Directory Server Administrator s Guide August 2002...