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

ldif2ldm works but ldapadd fails.



I am trying to load data into ldap, with my schema definition, 
ldif2ldm is able to load the data and I am able to do queries from 
netscape browser, however ldapadd gives me error 'Object class violation' 

mycompany.oc.conf looks like this --

objectclass modemUser
         requires 
                 objectClass
         allows
                 modemMacAddress,
                 downStreamMinBandwidth,
                 downStreamMaxBandwidth,
 
 mycompany.at.conf looks like this --
 attribute       modemMacAddress                 cis
 attribute       downStreamMinBandwidth          bin
 attribute       downStreamMaxBandwidth          bin
 
 --
 
Now I am trying add entries to the database by providing following 
input to ldapadd
Command I use is 

ldapadd -c -D "cn=admin, o=mycompany.com, c=US" -w "secret" -f adduser.ldif

dn: o=mycompany.com,c=US
changetype: add
objectClass:organization
o:mycompany.com
 
dn: modemMacAddress="123", o=mycompany.com,c=US
changetype: add
objectClass:top
objectClass:modemUser
downStreamMinBandwidth:100
downStreamMaxBandwidth:200
 
 
dn: modemMacAddress="346", o=mycompany.com,c=US
changetype: add
objectClass:top
objectClass:modemUser
downStreamMinBandwidth:105
downStreamMaxBandwidth:300
 
 
However if I remove, changetype lines and give that as ldif2ldbm, it creates
the database. Yes  I do have schemacheck set to on in slapd.conf, is that the
reason??