System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

ProcedureHow to Populate a Server With host Entries Using ldapaddent

  1. Make sure that Sun Java System Directory Server was set up using idsconfig.

  2. On a client machine, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  3. Make the machine an LDAP client.

    # ldapclient init -a profileName=new -a \ 
  4. Populate the server with data.

    # ldapaddent -D “cn=directory manager” -f /etc/hosts hosts

    You will be prompted for a password.

    In this example, ldapaddent will use the authentication method that has been configured in the profile new. Selecting simple will cause the password to be sent in the clear. For more information, refer to the ldapaddent(1M) man page.