Red Hat Directory Server 8.0 Administrator's Guide
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 1.3, “Importing from the
Command-Line”.
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 1.1, “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.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:
• If the server detects an attribute or object class in the entry that is not known to the server,
Chapter 2. Creating Directory Entries
26