From: Jason H. <gl...@LU...> - 2000-05-28 05:12:04
|
Hi, I'm new to LDAP and I'm trying to get a simple search to a new LDAP server happening and I'm getting nowhere fast. Any help/advice would be wonderful. SITUATION: - I've installed: perl-ldap-0.16 and Convert-ASN1-0.06 onto a Digital Unix box running Perl 5.004_04. - I'm connecting to a new PABX phone database which uses LDAPv2 (I believe). HOST: pe-pabx-dna.stservices.latrobe.edu.au BASE: o=Latrobe University, c=AU LOGIN: Not required I've been able to query this server using the "Directory Services" window in Eudora. (Note: "o=Latrobe University" may change to "o=La Trobe University" soon) - I've grabbed a copy of the "simplesearch.pl" code from Mark Wilcox's article in PerlMonth to test things out with. WHAT HAPPENS: - When I run simplesearch.pl, I get the error message "failed to bind with 1", so it's not even getting to make an anonymous bind to the server. WHAT NOW? - I'm at a loss to know what to try from here. Any suggestions? (grovel... grovel..) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= SIMPLESEARCH.PL #!/usr/local/bin/perl use strict; use Net::LDAP; my $host = 'pe-pabx-dna.stservices.latrobe.edu.au'; my $ldap = new Net::LDAP($host); #authenticate to the LDAP server anonymously my $mesg = $ldap->bind(); die ("failed to bind with ",$mesg->code(),"\n") if $mesg->code(); #now perform a simple search $mesg = $ldap->search( base => 'o=Latrobe University, c=AU', scope => 'sub', filter => '(objectclass=*)', ); die ("search failed with ",$mesg->code(),"\n") if $mesg->code(); #display results and disconnect from the server while (my $entry = $mesg->shift_entry()) { $entry->dump(); } $ldap->unbind(); =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The only other info that I have is that during the install of Convert-ASN1 "make test" reported some failed tests (and the Unix admin fella isn't around for me to query about what this means, sorry): t/00prim............FAILED tests 43, 55, 59, 86, 132, 136 Failed 6/137 tests, 95.62% okay t/01tag.............ok t/02seq.............ok t/03seqof...........ok t/04opt.............ok t/07io..............ok Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------ t/00prim.t 137 6 4.38% 43, 55, 59, 86, 132, 136 Failed 1/6 test scripts, 83.33% okay. 6/208 subtests failed, 97.12% okay. *** Exit 2 Stop. "make test" for the install of perl-ldap-0.16 also reported some failures: t/53schema..........Can't emulate - on #! line at t/53schema.t line 1. dubious Test returned status 2 (wstat 512, 0x200) Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------ t/53schema.t 2 512 ?? ?? % ?? Failed 1/7 test scripts, 85.71% okay. 0/143 subtests failed, 100.00% okay. *** Exit 2 Stop. -- __________________________________________________________________ Jason Hellwege J.H...@la... Webmaster - Information Technology Services La Trobe University Melbourne, Australia __________________________________________________________________ |