hi
i am trying to build a small LDAP database but have difficulty in adding
using ldap and could not find any solution, it would be great if
somebody can point at my mistake. I am including slapd.conf file and the
commands i am using to add and search and their results.
working on RH8 and LDAP 2.0.27
-----------------------------------------------------------
slapd.conf
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
pidfile /var/run/slapd.pid
argsfile /var/run/slapd.args
database ldbm
suffix "dc=itslinuxhelp,dc=com"
rootdn "cn=Manager,dc=itslinuxhelp,dc=com"
rootpw secret
directory /var/db/openldap-ldbm
index objectClass eq
access to * by * write
access to * by * read
----------------------------------------------------------
After starting LDAP i ran the following search
------------------------------------------------------
ldapsearch -x -b '' -s base '(objectclass=*)' namingContext
version: 2
#
# filter: (objectclass=*)
# requesting: namingContexts
#
#
dn:
namingContexts: dc=itslinuxhelp,dc=com
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
----------------------------------------------------------------
ldapsearch worked as it was suppose to work then i wrote a ldif file as
follows
-------------------------------------------------------------------
dn: dc=itslinuxhelp,dc=com
objectclass: dcObject
objectclass: organization
o: Example Company
dc: itslinuxhelp
dn: cn=Manager,dc=itslinuxhelp,dc=com
objectclass: organizationalRole
cn: Manager
----------------------------------------------------------------------
trying to add it with ldapadd command
----------------------------------------------------------------------
ldapadd -x -D "cn=Manager,dc=itslinuxhelp,dc=com" -W -f example.ldif
Enter LDAP Password:
adding new entry "dc=itslinuxhelp,dc=com"
ldap_add: Operations error
ldif_record() = 1
---------------------------------------------------------------------
can sombody point at my error, i spent two days trying to debug this but
could not find it.
Thanks for all the help, i appreciate it.
Anil