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

I need help in adding data to database



Hello all,

I have a problem in adding data to my database using this command:

ldapadd -f test.ldif -x -D "cn=admin,dc=raisaur,dc=mydomain,dc=com" -w
secret

It has an error: No such object

This is what I got when I run the command ldapadd:
adding new entry "dc=raisaur,dc=mydomain,dc=com"
adding new entry "o=raisaur"
ldap_add: No such object
ldif_record() = 32

Does it inseting data to my database completely because when I tried to to
add it again it says Already exist.
Anyone can help why it has an error No such object?

I am inserting my configs so that you can check it if theres an error.
Im using ldap version 2.1.3

my slapd.conf file
----snip---
include         /usr/local/etc/openldap/schema/core.schema
include         /usr/local/etc/openldap/schema/cosine.schema
include         /usr/local/etc/openldap/schema/inetorgperson.schema
include         /usr/local/etc/openldap/schema/nis.schema
include         /usr/local/etc/openldap/schema/authldap.schema
---snip----
database        bdb
suffix             "dc=raisaur,dc=mydomain,dc=com"
rootdn           "cn=admin,dc=raisaur,dc=mydomain,dc=com"
rootpw          secret
directory        /usr/local/var/data
index   objectClass     eq
--- EOF ----

My ldif test file
#Test data
dn:dc=raisaur,dc=mydomain,dc=com
objectClass:top
objectClass:dcObject
objectClass:organization
o:raisaur
dc:raisaur
description:My Company Corporation Domain

dn:o=raisaur
objectClass:top
objectClass:organization
o:raisaur
description:MyCompany Corporation

dn:ou=users,o=raisaur
ou:users
objectClass:top
objectClass:organizationalUnit
description:My Company users

dn:uid=Jose,ou=users,o=raisaur
objectClass:top
objectClass:person
objectClass:organizationalPerson
objectClass:inetOrgPerson
uid:Glynn
userPassword:test
sn:Condez
cn:Glynn
ou:users
description:user

dn:cn=admin,dc=raisaur,dc=mydomain,dc=com
objectClass:top
objectClass:organizationalRole
cn:admin
roleOccupant:cn=Glynn,ou=users,o=raisaur
description:Webadmin

#Create certmap
dn:ou=AuthzLDAPCertmap,o=raisaur
objectClass:top
objectClass:organizationalUnit
ou:AuthzLDAPCertmap

#add certificate data
#added object class 'device' because any data requires a structuralobject
#and device seemed to be a simple one plus it has a 'owner' attribute
dn:uid=Glynn,ou=AuthzLDAPCertmap,o=raisaur
objectClass:top
objectClass:authzLDAPmap
objectClass:uidObject
objectClass:device
owner:uid=Glynn,ou=users,o=raisaur
issuerDN:/C=ZA/ST=WP/L=Cape
Town/O=raisaur/OU=MyCompany/CN=Root/Email=condez@raisaur.mydomain.com
subjectDN:/C=ZA/ST=WP/O=raisaur/OU=users/CN=Glynn
uid:Glynn
cn:Glynn
------ EOF---------

# My authldap.scheme
attributetype ( 1.3.6.1.4.1.4263.5.1 NAME 'issuerDN'
        DESC 'The user friendly version of the distinguished name of the
issuer of a certificate'
        EQUALITY caseExactIA5Match
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE )

attributetype ( 1.3.6.1.4.1.4263.5.2 NAME 'subjectDN'
        DESC 'The user friendly version of the distinguished name of the
subject of a certificate'
        EQUALITY caseExactIA5Match
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 SINGLE-VALUE )

objectclass ( 1.3.6.1.4.1.4263.5.3 NAME 'authzLDAPmap'
        DESC 'Map Entry for mod_authz_ldap'
        SUP top AUXILIARY
        MUST ( issuerDN $ owner )
        MAY ( userCertificate $ serialNumber $ subjectDN ) )

TIA
--- Glynn ---