where
-f # file name which contains the entry
-x # Use simple authentication instead of SASL
-D # Use the Distinguished Name binddn to bind to the LDAP directory. (Username, usually rootdn)
-w # the password for simple authentication (password for rootpw)

4. On successful adding, you should see the following on the stdout

adding new entry "dc=example,dc=com"

adding new entry "cn=Manager,dc=example,dc=com"

Adding Multiple Users

1. Create a LDIF file, ie, users.ldif
2. Add the following into users.ldif

where
-f # file name which contains the entry
-x # Use simple authentication instead of SASL
-D # Use the Distinguished Name binddn to bind to the LDAP directory. (Username, usually rootdn)
-w # the password for simple authentication (password for rootpw)

4. Verify your entry with ldapsearch

ldapsearch -x -b 'dc=example,dc=com' '(objectclass=*)'

where

-x # Use simple authentication instead of SASL
-b # the starting point for the search
(objectclass=*) # It is the filter to be applied for the search. In this case, any objectClass