Chapter 2. Creating Directory Entries
22
2.2.2. Creating a Root Entry from the Command-Line
The
ldapmodify
command-line utility can be used to create a new root entry in a database. For
example:
ldapmodify -a -D
bindDN
-w
password
The
ldapmodify
utility binds to the server and prepares it to add an entry. The new root object can
then be added, as follows:
dn:
Suffix_Name
objectclass:
newobjectclass
The DN corresponds to the DN of the root or sub-suffix contained by the database. The
newobjectclass
value depends upon the type of object class you are adding to the database. You may
need to specify additional required attributes depending on the type of root object being added.
NOTE
You can use
ldapmodify
to add root objects only if you have one database per suffix. If
you create a suffix that is stored in several databases, you must use the
ldif2db
utility
with the
-noption
parameter to specify the database that will hold the new entries. For
information, see
Section 4.1.4, “Importing from the Command-Line”
.
2.2.3. Adding Entries Using LDIF
You can use an LDIF file to add multiple entries or to import an entire database. To add entries using
an LDIF file and the Directory Server Console:
1. Define the entries in an LDIF file.
LDIF files are described in
Appendix A, LDAP Data Interchange Format
.
2. Import the LDIF file from the Directory Server Console.
See
Section 4.1.2, “Importing a Database from the Console”
for information about LDIF file
formats. When you import the LDIF file, select
Append to database
in the
Import
dialog box so
that the server will only import entries that do not currently exist in the directory.
You can also add entries described in an LDIF file from the command-line using the
ldapmodify
command with the
-f
option.
2.2.4. Adding and Modifying Entries Using ldapmodify
The
ldapmodify
1
command can add and modify entries in an existing Directory Server database.
The
ldapmodify
command opens a connection to the specified server using the supplied
distinguished name and password and modifies the entries based on LDIF update statements
contained in a specified file. Because
ldapmodify
uses LDIF update statements,
ldapmodify
can
do everything that
ldapdelete
can do.
Consider the following when using
ldapmodify
:
Содержание DIRECTORY SERVER 8.0
Страница 18: ...xviii ...
Страница 29: ...Configuring the Directory Manager 11 6 Enter the new password and confirm it 7 Click Save ...
Страница 30: ...12 ...
Страница 112: ...94 ...
Страница 128: ...110 ...
Страница 190: ...Chapter 6 Managing Access Control 172 4 Click New to open the Access Control Editor ...
Страница 224: ...206 ...
Страница 324: ...306 ...
Страница 334: ...316 ...
Страница 358: ...340 ...
Страница 410: ...392 ...
Страница 420: ...402 ...
Страница 444: ...426 ...
Страница 454: ...436 ...
Страница 464: ...446 ...
Страница 484: ...466 ...
Страница 512: ...494 ...
Страница 522: ...504 ...