1. Open a text editor and create an entry that conforms with your schema. For example, add the following entry in the file and save the file as add-user.ldif. For the userPassword attribute, enter the cleartext password. 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.
    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. Use the ldapmodify tool to add the entry specified in the LDIF file. You will see a confirmation message of the addition. If the command is successful, you will see generated success messages with the "#" symbol.
    $ bin/ldapmodify --defaultAdd --filename add-user.ldif
    # 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