LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS
optional_options Specifies a series of command-line options. These must be
specified before the search filter, if used.
optional_list_of_attributes are spaces-separaed attributes that reduct the scope of the
attributes returned in the search results. This list of attributes
must appear after the search filter. For more information ,
see the HP-UX Directory Server administrator guide.
9.4.3.2 ldapsearch options
This section lists the most commonly used ldapsearch command-line options. For more information,
see the HP-UX Directory Server configuration, command, and file reference.
-b Specifies the starting point for the search. The value specified here must be a distinguished
name that currently exits in the database.
-D Specifies the distinguished name (DN) with which to authenticate to the server. If specified,
this value must be a DN recognized by the directory server, and it must also have the authority
to search for the entries.
-h Specifies the host name or IP address of the directory server. If you do not specify a host,
ldapsearch uses the local host.
-l Specifies the maximum number of seconds to wait for a search request to complete.
-P Specifies the TCP port number that the directory server uses. The default is 389.
-s Specifies the scope of the search. The scope can be one of the following:
• base: Search only the entry specified in the —b option or defined by the LDAP_BASEDN
environment variable.
• one: Search only the immediate children of the entry specified in the -b option.
• sub: Search the entry specified in the -b option and all of its descendants. Perform a
subtree search starting at the point identified in the -b option. This is the default.
-w Specifies the password associated with the distinguished name that is specified in the -D
option.
-x Specifies that the search results are sorted on the server rather than on the client. In general,
it is faster to sort on the server rather than on the client.
-f Specifies the file containing the search filters to be used in the search. Omit this opiton if you
want to supply a search filter directly to the command-line.
9.4.4 The ldapmodify tool
You use the ldapmodify command-line utility to add or modify entries in an existing LDAP
directory. ldapmodify opens a connection to the specified server using the distinguished name
and password you supply, and adds or modifies the entries based on the LDIF update statements
contained in a specified file. Because ldapmodify uses LDIF update statements, ldapmodify
can do everything ldapdelete can do. For detailed information, see the HP-UX Directory Server
administrator guide available at:
http://www.hp.com/go/hpux-security-docs
Click HP-UX Directory Server.
9.4.4.1 Syntax
ldapmodify [optional_options]
where
optional_options Specifies a series of command-line options.
9.4 LDAP directory tools 357