Managing Entries from the Command-Line
Chapter 2
Creating Directory Entries
59
Adding Entries Using ldapmodify
Here is a typical example of how to use the
ldapmodify
utility to add entries to the
directory. Suppose that:
• You want to create the entries specified in the file
new.ldif
.
• You have created a database administrator who has the authority to modify the
entries and whose distinguished name is
cn=Directory Manager
.
• The database administrator’s password is
King-Pin
.
• The server is located on
cyclops
.
• The server uses port number
845
.
In this example, the LDIF statements in the
new.ldif
file do not specify a change
type. They follow the format defined in “LDIF File Format,” on page 573.
To add the entries, you must enter the following command:
ldapmodify -a -D "cn=Directory Manager" -w King-Pin -h cyclops -p
845 -f new.ldif
The following table describes the
ldapmodify
parameters used in the example:
Table 2-2
Description of ldapmodify Parameters Used for Adding Entries
Parameter Name
Description
-
a
Specifies that the modify operation will add new entries to the
directory.
-D
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.
-
w
Specifies the password associated with the distinguished
name specified in the
-D
parameter.
-h
Specifies the name of the host on which the server is running.
-
p
Specifies the port number that the server uses.
-f
Optional parameter that specifies the file containing the LDIF
update statements used to define the modifications. If you do
not supply this parameter, the update statements are read
from
stdin
. For information on supplying LDIF update
statements from the command-line, refer to “Providing Input
from the Command-Line,” on page 56.
Summary of Contents for DIRECTORY SERVER 7.1
Page 1: ...Administrator s Guide Red Hat Directory Server Version7 1 May 2005 Updated February 2009 ...
Page 20: ...20 Red Hat Directory Server Administrator s Guide May 2005 Glossary 619 Index 635 ...
Page 22: ...22 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 26: ...26 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 78: ...Maintaining Referential Integrity 78 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 200: ...Assigning Class of Service 200 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 488: ...488 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 528: ...PTA Plug in Syntax Examples 528 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 572: ...572 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 612: ...Examples of LDAP URLs 612 Red Hat Directory Server Administrator s Guide May 2005 ...
Page 634: ...634 Red Hat Directory Server Administrator s Guide May 2005 ...