Sun Directory Services 3.1 Administration Guide

Creating the Root Entry

You cannot add entries to your data store before you have created the root entry for the data store. The root entry is the top entry of the tree held by the data store. It identifies the data store. In Sun Directory Services, you can actually have up to four root entries that identify the data store and that correspond to the four possible data store suffixes that you can declare in the Admin Console.

To create the root entry, create a simple LDIF file containing the entry information, and add it to the database using the ldapadd command. An example of this procedure is given in "To Create the Root Entry for XYZ Corporation".

You can also create the root entry manually using Deja. The procedure for adding entries using Deja is explained in Sun Directory Services 3.1 User's Guide.


Note -

The root entry is created automatically if it does not already exist when you first load entries in the directory using the dsimport command.


To Create the Root Entry for XYZ Corporation

  1. Create an LDIF file called root-file that contains:

    dn: o=XYZ, c=US
    objectClass: organization

    The LDIF file format is described in detail in the ldif(4) man page.

  2. Add this file using ldapadd(1):

    prompt% ldapadd -c -D "cn=admin-cn, o= XYZ, c=US" -w admin-pw -f root-file

    where:

    • -c specifies to continue processing even if errors occur

    • -D introduces the distinguished name of the data store administrator. The DN must be given in quotes because it is likely to contain blank spaces.

    • -w introduces the administrator password

    • -f introduces the file holding the information to add to the database.

    If you want to avoid your password showing up in a command listing, you can omit the -w option. The ldapadd command will prompt you for your password.

    The root entry now exists.