Managing Entries From the Command LineChapter 2 Creating Directory Entries 53Adding Entries Using LDIFYou can use an LDIF file to add multiple entries or to import an entire database. Toadd entries using an LDIF file and the Directory Server Console:1. Define the entries in an LDIF file.LDIF is described in Appendix A, “LDAP Data Interchange Format.”2. Import the LDIF file from the Directory Server Console.See “Performing an Import From the Console,” on page 140 for information.When you import the LDIF file, select “Append to database” on the Importdialog box so that the server will only import entries that do not currently existin the directory.You can also add entries described in an LDIF file from the command line using theldapmodify command with the -f option.Adding and Modifying Entries Using ldapmodifyYou use the ldapmodify command to add and modify entries in an existingDirectory Server database. The ldapmodify command opens a connection to thespecified server using the distinguished name and password you supply, andmodifies the entries based on LDIF update statements contained in a specified file.Because ldapmodify uses LDIF update statements, ldapmodify can do everythingthat ldapdelete can do.If schema checking is turned on when you use this utility, then the server performsschema checking for the entire entry when it is modified:• If the server detects an attribute or object class in the entry that is not known tothe server, then the modify operation will fail when it reaches the erroneousentry. All entries that were processed before the error was encountered will besuccessfully added or modified. If you run ldapmodify with the -c option (donot stop on errors), all correct entries processed after the erroneous entry willbe successfully added or modified.• If a required attribute is not present, the modify operation fails. This happenseven if the offending object class or attribute is not being modified. Thissituation can occur if you run the Directory Server with schema checkingturned off, add unknown object classes or attributes, and then turn schemachecking on.For more information, see “Turning Schema Checking On and Off,” on page 339.