I'm trying to add entries to an ldap database I compiled, so I have the default configuration from the openldap site. The thing is, I exported an ldif file from an existing ldap server in order to make it easy to create those entries in my local openldap, but I get an error on when running ldapadd.
When I run the ldapadd command:
ldapadd -v -x -D "cn=Manager,dc=my-example,dc=com" -w password -f /entries.ldif
I get the following output:
adding new entry "cn=users,o=ctc,c=cl"
ldap_add: Invalid syntax (21)
additional info: objectclass: value #0 invalid per syntax
And this is part of the file I'm trying to add:
dn: o=ctc,c=cl
objectclass: domain
objectclass: top
dc: ctc,c=cl
o: ctc
dn: cn=users,o=ctc,c=cl
cn: users
objectclass: container
objectclass: top
dn: cn=AccesoWeb,o=ctc,c=cl
cn: users
cn: AccesoWeb
objectclass: container
objectclass: top
dn: cn=usuarios,cn=AccesoWeb,o=ctc,c=cl
cn: users
cn: usuarios
objectclass: container
objectclass: top
My guess is that there is something missing from the main slapd.ldif file, but I'm not sure since I just started learning about this service.
The comment by @EricLavault turned out to be the actual answer. I noticed the difference in the amount of objectClasses in both ldap servers and the objectClass container was missing from the one I was trying to build. Since I didn't have any objectClass named like that in the default openldap schemas I used one named corbaContainer which had the exact same attributes and it worked inmediately.
Thank you very much.