I am trying to add a new user in LDAP by using the below command:
ldapadd -H ldap://localhost:1389 -x -D cn=root -w secret -f ./user.ldif
user.ldif file contains the data as
dn: cn=ldapjs, ou=users, o=myhost
objectClass: unixUser
cn: ldapjs
shell: /bin/bash
description: Created via ldapadd
When I try to run the ldapadd command, I got the below error and I could not find where I made the mistakes:
**ERROR**
ldap_add: Constraint violation (19)
matched DN: ou=users, o=myhost
**additional info: cn required**
Here I am running the ldapjs server in the url: 'ldap://127.0.0.1:1389' with root mode.