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

(ldap_add: Object class violation) problem



I am not sure about the problem existing in my slapd.conf file (or rather
with ignorance).
I am trying to something very simple. Iwant to add an entry using ldapadd
from command prompt.
I first use ldif2ldbm command to initialize the database with some entries
and then start the slapd.
I starts successfully and even responds the search requests.
Next I try to add and it fires back with Object class violation error.
My commands are as follows and corresponding files are given below.

Can anyone please help with thi.
Thanks a ton
Himanshu


ldif2ldbm -f slapd.conf -i start.ldif
slapd -f slapd.conf -p 10000
ldapmodify -a -h bergamot -p 10000  -D "cn=root, o=cs.uky.edu, c=US" -w
secret -f add.ldif

----------------------------slapd.conf----------------
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include		/homes/himanshu/Project/code/server/slapd.at.conf
include		/homes/himanshu/Project/code/server/slapd.oc.conf

schemacheck	on
#referral	ldap://ldap.itd.umich.edu

#######################################################################
# ldbm database definitions
#######################################################################

database	ldbm
suffix		"o=cs.uky.edu, c=US"
directory	/tmp/himanshu
rootdn		"cn=root, o=cs.uky.edu, c=US"
rootpw		secret

# cleartext passwords, especially for the rootdn, should
# be avoid.  See slapd.conf(5) for details.


---------------------END OF slapd.conf------------------------------

-----------------------start.ldif-----------------------------------
dn: c=US
objectclass: top
objectclass: country
c: US

dn: o=cs.uky.edu, c=US
o: cs.uky.edu
objectclass: top
objectclass: organization

dn: cn=root, o=cs.uky.edu, c=US
objectclass: top
objectclass: person
cn: root
sn: root
userpassword: secret
mail: root@cs.uky.edu

dn: cn=himanshu, o=cs.uky.edu, c=US
objectclass: top
objectclass: person
cn: himanshu
sn: him
mail: himanshu@cs.uky.edu

---------------------------------End of start.ldif----------------------

----------------------------------------add.ldif----------------

dn: cn=Ashley, o=cs.uky.edu, c=US
objectclass: top
objectclass: person
cn: Ashley
sn: dukes
mail: ash@cs.uky.edu

-------------------------------------------End of add.ldif------