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

problems using ldap_add command line tool



I have problems inserting entries into my LDAP tree.
When I enter

--------------------------------------------------------------------------------

ldapadd -h localhost -D "cn=root" -w "secret"
caname=ca4
objectclass=top
objectclass=ca
caname=ca4
--------------------------------------------------------------------------------

then I get the following:

--------------------------------------------------------------------------------

caname=ca4
objectclass=top
objectclass=ca
caname=ca4

adding new entry caname=ca4
ldap_add: No such object
--------------------------------------------------------------------------------

I am running slapd in debug mode with -d 65535 which results in the
following output during my add request:

--------------------------------------------------------------------------------

select activity on 1 descriptors
new connection on 7
conn=0 fd=7 connection from localhost (127.0.0.1) accepted.
activity on:
listening for connections on 6, activity on: 7r
before select active_threads 0
select activity on 1 descriptors
activity on: 7r
read activity on 7
ber_get_next
ber_get_next: tag 0x30 len 25 contents:
ber_dump: buf 0x80804f0, ptr 0x80804f0, end 0x8080509
          current len 25, contents:
        02 01 01  ` 14 02 01 02 04 07  c  n  =  r  o  o
         t 80 06  s  e  c  r  e  t
listening for connections on 6, activity on: 7r
before select active_threads 1
do_bind
do_bind: version 2 dn (cn=root) method 128
conn=0 op=0 BIND dn="CN=ROOT" method=128
==> ldbm_back_bind: dn: CN=ROOT
dn2entry_r: dn: "CN=ROOT"
=> dn2id( "CN=ROOT" )
=> ldbm_cache_open( "/usr/local/TopDir/dn2id.dbb", 66, 600 )
<= ldbm_cache_open NULL "/usr/local/TopDir/dn2id.dbb" errno 22 reason
"Invalid argument")
<= dn2id could not open dn2id.dbb
dn2entry_r: dn: ""
=> dn2id( "" )
=> ldbm_cache_open( "/usr/local/TopDir/dn2id.dbb", 66, 600 )
<= ldbm_cache_open NULL "/usr/local/TopDir/dn2id.dbb" errno 22 reason
"Invalid argument")
<= dn2id could not open dn2id.dbb
do_bind: bound "cn=root" to "cn=root"
send_ldap_result 0::
ber_flush: 14 bytes to sd 7
         0 0c 02 01 01  a 07 0a 01 00 04 00 04 00
conn=0 op=0 RESULT err=0 tag=97 nentries=0
select activity on 1 descriptors
activity on: 7r
read activity on 7
ber_get_next
ber_get_next on fd 7 failed errno 0 (Success)
*** got 0 of 0 so far
conn=0 op=-1 fd=7 closed errno=0
listening for connections on 6, activity on:
before select active_threads 0
--------------------------------------------------------------------------------

The contents of /usr/local/TopDir/id2entry.dbb is (via ldbmcat):

--------------------------------------------------------------------------------

1
dn: cn=root
objectclass:person
cn:root

2
dn: caname=ca1
objectclass:top
objectclass:ca
caname:ca1

3
dn: caname=ca2
objectclass:top
objectclass:ca
caname:ca2

4
dn: caname=ca3
objectclass:top
objectclass:ca
caname:ca3

5
dn: caname=ca1, algID=123456==, issuerNameHash=123456==,
issuerKeyHash=123456==
objectclass:top
objectclass:ca
objectclass:caid
algID=123456==
issuerNameHash=123456==
issuerKeyHash=123456==
--------------------------------------------------------------------------------

Where is the error here?
If additional info is needed please ask.

--
Heiko Nardmann (Dipl.-Ing.), h.nardmann@secunet.de, Software Development

secunet Security Networks AG - Sicherheit in Netzwerken
(www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50