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

Populating the Directory Server Using ldapaddent


Note –

Before populating the directory server with data, you must configure the server to store passwords in UNIX Crypt format if you are using pam_unix. If you are using pam_ldap, you can store passwords in any format. For more information about setting the password in UNIX crypt format, see the Sun ONE Directory Server documents.


ldapaddent reads from the standard input (that being an /etc/filename like passwd) and places this data to the container associated with the service. Client configuration determines how the data will be written by default.


Note –

ldapaddent(1M) can only run on a client which is already configured for the LDAP naming service.


How to Populate Sun ONE Directory Server With User Password Data Using ldapaddent
  1. Use the ldapaddent command to add /etc/passwd entries to the server.

    # ldapaddent -D "cn=directory manager" -f /etc/passwd passwd

See ldapaddent(1M). See Chapter 13, Basic Components and Concepts (Overview) for information about LDAP security and write-access to the directory server.