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

Re: Fw: RE: No Such Object Error: I can't solve



> Ben ,
>       I have already checked and noticed that is not a problem of
> permissions
> on the db directory. Any other clue??

yes.

>
>
>
>
>
> ---------- Forwarded Message -----------
> From: "Ben Booble" <oneoutof100@hotmail.com>
> To: victor@tre-pb.gov.br
> Sent: Fri, 07 May 2004 00:42:25 +0000
> Subject: RE: No Such Object Error: I can't solve
>
> Hi Victor,
>
> What do your logs say?  I had similar problems due to permissions on the
> directory where the db was stored.  Maybe you should check that.  Also
> running as user ldap gives different results to root and has different
> permissions.
>
> You might have already check this so forgive me if the answer is too low
> level - I am struggling with openldap.
>
> Ben
>
>>From: "Victor Souza Menezes" <victor@tre-pb.gov.br>
>>To: openldap-software@OpenLDAP.org
>>Subject: No Such Object Error: I can't solve
>>Date: Thu, 6 May 2004 17:25:45 -0300
>>
>>Hi Everybody,
>>Would you please give a little of your time and help me??
>>
>>1) when i run:
>>ldapsearch -b '' -s base '(objectclass=*)' namingContexts -x
>>
>>i got :
>>
>>version: 2
>>
>>#
>># filter: (objectclass=*)
>># requesting: namingContexts
>>#
>>
>>#
>>dn:
>>namingContexts: dc=tre-pb3,dc=gov,dc=br

This says that you configured your database with suffix
"dc=tre-pb3,dc=gov,dc=br"; if you agree on this, let's go on.

>>
>># search result
>>search: 2
>>result: 0 Success
>>
>># numResponses: 2
>># numEntries: 1
>>
>>2) i run ./migrate_base.pl >base.ldif and the first three entries of my
>> base.ldif file are :
>>
>>dn: dc=gov,dc=br
>>dc: gov
>>objectClass: top
>>objectClass: domain
>>objectClass: domainRelatedObject
>>associatedDomain: tre-pb3.gov.br


This says that you're trying to add an entry whose DN is "dc=gov,dc=br";
if you agree on this, let's go on.

>>
>>dn: dc=tre-pb3,dc=gov,dc=br
>>dc: tre-pb3
>>objectClass: top
>>objectClass: domain
>>objectClass: domainRelatedObject
>>associatedDomain: tre-pb3.gov.br
>>
>>dn: ou=Hosts,dc=tre-pb3,dc=gov,dc=br
>>ou: Hosts
>>objectClass: top
>>objectClass: organizationalUnit
>>objectClass: domainRelatedObject
>>associatedDomain: tre-pb3.gov.br
>>
>>3) when i run ldapadd -x -D "cn=root,dc=tre-pb3,dc=gov,dc=br" -W -f
>> base.ldif
>>i got :
>>
>>adding new entry "dc=gov,dc=br"
>>ldap_add: No such object

This is telling you that poor slapd is so stupid that it is unable to add
an entry "dc=gov,dc=br" into a database that's been configured to be
rooted
at "dc=tre-pb3,dc=gov,dc=br"; whatever entry you try to add, it has to be
"dc=tre-pb3,dc=gov,dc=br" itself ot a child of it, i.e. something that has
at least "dc=tre-pb3,dc=gov,dc=br" at the rightmost of its DN.

It is any clearer now?

>>
>>ldif_record() = 32
>>
>>i read the documentation, which was talking about not having the entrie
>> "dc=gov,dc=br". I don't understand this because the entrie exists in my
>> base.ldif file.

The base.ldif file is not the database; the file contains what you wish
could make it into the database, while slapd replies based on what
currently is into the database.

>>
>>And when i run :  ldapsearch -b 'dc=gov,dc=br' -s base
>> '(objectclass=*)' -x
>>
>>i got:
>>
>>version: 2
>>
>>#
>># filter: (objectclass=*)
>># requesting: ALL
>>#
>>
>># search result
>>search: 2
>>result: 32 No such object

Exactly: your database is empty yet; everything is still in your .ldif
file, waiting for you to remove the first entry before anything from the
entry whose DN is equal to the suffix in your database up to the outermost
leave can be written into the database.

p.

-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it




    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497