OpenDJ: Adding your data, part II

OpenDJ logo In Adding your data, part I, I explained what needs to be done to add data to your directory, and how directory data is arranged. I did not yet demonstrate how to add data.

Let’s make this example very simple. is starting very small. In fact there’s only one person today. Here is the LDIF.

dn: dc=myCompany,dc=com
objectClass: domain
objectClass: top
dc: myCompany
aci: (target ="ldap:///dc=myCompany,dc=com")(targetattr !=
 "userPassword")(version 3.0;acl "Anonymous read-search access";
 allow (read, search, compare)(userdn = "ldap:///anyone");)

dn: ou=People,dc=myCompany,dc=com
objectClass: organizationalunit
objectClass: top
ou: People

dn: uid=mark,ou=People,dc=myCompany,dc=com
objectClass: person
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: top
uid: mark
userpassword: secret12
facsimiletelephonenumber: +1 408 555 1211
givenname: Mark
cn: Mark Craig
telephonenumber: +1 408 555 1212
sn: Craig
roomnumber: 0001
l: Barraux
ou: People

Here is the procedure for adding the data for through the Control Panel.

  1. Save the LDIF in myCompany.ldif, being careful not to add any spaces at the end of lines, and preserving a blank line at the end of the file.
  2. Open OpenDJ Control Panel. (On UNIX, ./OpenDJ/bin/control-panel. On Windows, double-click OpenDJ\bat\control-panel.bat.)
  3. Connect to your server, and notice New Base DN… and Import LDIF… in the Directory Data List.
  4. Click New Base DN…
    1. For the Backend, select New Backend: and provide the name myCompanyRoot.
    2. For the Base DN: dc=myCompany,dc=com.
    3. Leave Directory Data: Only Create Base Entry, and click OK to create the new base DN.
      At this point, you have created a new backend with a base DN entry, so you must still import data from LDIF.
  5. Click Import LDIF… in the Control Panel.
    1. For Backend: myCompanyRoot.
    2. For File to Import: myCompany.ldif, and then click OK to import the data.
      When prompted to overwrite existing data, in this case the base entry, choose Yes.

You can click Manage Entries in the Control Panel now to browse the new suffix you added.