1. Open a text editor and create an entry that conforms with your schema.

    The Directory Server encrypts the password and stores its encrypted value in the server. Make sure that the LDIF file has limited read permissions for only authorized administrators.

    The following example adds the entry in the file and saves the file as add-user.ldif. For the userPassword attribute, enter the cleartext password.

    dn: uid=user.2000,ou=People,dc=example,dc=com 
    objectClass: top 
    objectClass: person 
    objectClass: organizationalPerson 
    objectClass: inetOrgPerson
    postalAddress: Toby Hall$73600 Mash Street$Cincinnati, OH 50563 postalCode: 50563 
    description: This is the description for Toby Hall. 
    uid: user.2000
    userPassword: wordsmith employeeNumber: 2000 
    initials: TBH 
    givenName: Toby
    pager: +1 596 232 3321 
    mobile: +1 039 311 9878 
    cn: Toby Hall 
    sn: Hall 
    telephoneNumber: +1 097 678 9688 
    street: 73600 Mash Street 
    homePhone: +1 214 233 8484
    l: Cincinnati 
    mail: user.2000@maildomain.net 
    st: OH
  2. To add the entry specified in the LDIF file, run the ldapmodify tool.
    $ bin/ldapmodify --defaultAdd --filename add-user.ldif

    A confirmation message of the new addition appears. If the command is successful, you'll see generated success messages with the "#" symbol.

    # Processing ADD request for uid=user.2000,ou=People,dc=example,dc=com 
    # ADD operation successful for DN uid=user.2000,ou=People,dc=example,dc=com