From: Chris R. <chr...@me...> - 2002-04-29 11:31:12
|
Tina Mueller <ti...@ze...> wrote: > hi, i've searched the archive and also ldap_search-archives, but > with no success. > we have an ldap-server (don't know which software...), > and besides netscape there is a tool ldapsearch on the > unix-machines. > now if I do > my $ldap = Net::LDAP->new('ldap.company',debug=>15) or die "$@"; > my $bind = $ldap->bind(); > $bind->code && die $bind->error; > my $base = "o=company, c=DE"; > my $mesg = $ldap->search ( > base => $base, > filter => "sn=schade", > attr => ["sn"], > ); > print "\tMessage: ", ldap_error_name($mesg->code); > print " :", ldap_error_text($mesg->code); > print "MessageID: ",$mesg->mesg_id; > print "\tDN: ",$mesg->dn; > > I get > Message: LDAP_NO_SUCH_OBJECT :The server cannot find an object specified > in the request MessageID: 2 DN: > > if i use ldapsearch directly i get: > $ ldapsearch -v -h ldap.company -b 'c=DE' 'uid=some_uid' (or even 'sn=*') > ldap_init( ldap.company, 389 ) > filter pattern: uid=some_uid > returning: ALL > filter is: (uid=some_uid) > ldap_search: No such object > > does anybody know what this errormessage means? > > thanks for any hints, tina Either the base DN does not exist, or if it does, you are not allowed to search it (maybe your server doesn't allow anonymous searches). Try reading the namingContexts attribute from the root DSE (an entry with DN of a zero-length string) to find out what the server thinks it holds: ldapsearch -h ldap.company -b "" -s base "(objectclass=*)" namingContexts Cheers, Chris |