Solaris for ISPs Administration Guide

Creating Directory Entries: General Procedure

Sun Directory Services has the following command-line utilities for creating and modifying directory entries:

These directory services command-line utilities require root access. They are fully documented in reference manual pages (section 1).

Both ldapadd and ldapmodify can take input from the command line or from a specified file. Because information for an entry can be rather lengthy and complex, the sections that follow describe the form requiring a text file.

In each case, creating an entry (or entries) requires the following steps:

  1. Write a file specifying the entry or entries to be made in the directory. The format for this file is specified in the ldif(4) reference manual page.

  2. Obtain root access and create the entry using ldapadd, specifying the file with the entry information.

In every case, the form of the ldapadd command should be:

# ldapadd -D "BindDN" -w password -f file

Where the BindDN is the distinguished name (DN) for binding to the directory with write access to this part of the directory tree, and password the password for binding. Replace the file option with the name of the ldif file you have created.