HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

NOTE:
To create the root entry a database suffix (such as dc=example,dc=com) using ldapmodify,
you must bind to the directory as the Directory Manager.
3.2.4.1 Adding entries using ldapmodify
Typically, to add the entries using ldapmodify, specify the DN and password to bind to the
Directory Server, the port and host of the Directory Server, and the LDIF file to use. For example:
ldapmodify -a -D "cn=directory manager" -w secret -p 389 -h server.example.com -f new.ldif
This ldapmodify example has the following values:
The entries to be created are specified in the file new.ldif. (In this example, the LDIF
statements in the new.ldif file do not specify a change type. They follow the format defined
in About the LDIF file format” (page 547)).
The Directory Manager is a database administrator who has the authority to modify the entries,
and its password is secret.
The host name is example.com.
The server uses port number 389.
Table 10 (page 113) describes the ldapmodify options used in the example.
Table 10 Ldapmodify options used for adding entries
DescriptionOption name
Specifies that the modify operation will add new entries to the directory.-a
Specifies the distinguished name with which to authenticate to the server. The value must be a DN
recognized by the Directory Server, and it must also have the authority to modify the entries.
-D
Specifies the password associated with the distinguished name specified in the -D option.-w
Specifies the name of the host on which the server is running.-h
Specifies the port number that the server uses.-p
Optional option that specifies the file containing the LDIF update statements used to define the
modifications. If you do not supply this option, the update statements are read from stdin. For
-f
information on supplying LDIF update statements from the command line, see “Providing input from
the command line” (page 111).
For information on the ldapmodify options, see the HP-UX Directory Server configuration,
command, and file reference.
3.2.4.2 Modifying entries using ldapmodify
Typically, to edit entries using ldapmodify, specify the DN and password to bind to the Directory
Server, the port and host of the Directory Server, and the LDIF file to use, as when adding entries
with ldapmodify. For example:
ldapmodify -D "cn=directory manager" -w secret -p 389 -h server.example.com -f modify_statements
This ldapmodify example has the following values:
The entries to modify are specified in the file modify_statements. Before the entries can
be modified, you must first create the modify_statements file with the appropriate LDIF
update statements; LDIF update statements are described in “LDIF Update Statements” (page
120).
The bind DN is cn=Directory Manager, which has permissions to edit any entry in the
database, and the password is secret.
3.2 Managing Entries from the Command line 113