[Date Prev][Date Next] [Chronological] [Thread] [Top]

Ldap ad with invalid structural object class error

Hi Team,

I am having problem with the ldapadd command wiht the ldif.
I am able to installed and run the test commmand -> ldapsearch -x -b ''
-s base '(objectclass=*)' namingContexts .It returns me result.

But when I want to add a new entry using ldif, error occured.

Contents of ldif is : 
dn: cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM
objectclass: dcObject
objectclass: organization
o: Example Company
objectclass: person
cn: Manager
sn: User

Contents of slapd.conf is:
Located in : file:/usr/local/etc/openldap
Notes: I ignored all the comments start with #
include		/usr/local/etc/openldap/schema/core.schema
include		/usr/local/etc/openldap/schema/cosine.schema
include		/usr/local/etc/openldap/schema/inetorgperson.schema

pidfile		/usr/local/var/slapd.pid
argsfile	/usr/local/var/slapd.args

database	bdb
suffix		"dc=CLIENT8,dc=MYTESQ,dc=COM"
rootdn		"cn=Manager,dc=CLIENT8,dc=MYTESQ,dc=COM"

rootpw  secrect


Contents of ldap.conf is :
Located in : file:/usr/local/etc/openldap
BINDDN  cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM
URI	ldap://localhost:389

When I issued command :
ldapadd -x -D "cn=Manager,dc=CLIENT8,dc=MYTESQ,dc=COM" -W -f add.ldif

errors retunrs is :

adding new entry "cn=Manager, dc=CLIENT8, dc=MYTESQ, dc=COM"
ldap_add: Object class violation
        additional info: invalid structural object class chain

Another problem I have is, if I removed on row in ldif, let say
cn=Manager, error return will be different.Why this happen? It seems
like the error is inconsisten when I changed the ldif.

3. Any additional configuration is needed ? 

Thanks in advanced.