ldap_add no such object (32) matched dn dc=domain dc=com

I had the same problem doing the same command:

No such object (32)
matched DN: dc=example,dc=com

I checked the LDIF file and all my OUs from LDAP and I was trying to add an entry to an OU that does not exist.

I solved changing the OU on ldif file for one that exist. And all worked fine.


i had same problem and was pulling my hair out over it, then added new OU to my ldif, like this:

dn: ou=(what your error says that is missing),o=(company name),dc=(company name),dc=country
objectclass: (class type)
objectclass: top
ou: people

just replace info in ()'s matching to yours and it should work!