nslookup -type=srv _ldap._tcp.domain
nslookup -type=srv _ldap._tcp.domain.tld (?)
I got many replies, I chose one that sounded (phonetically) like it looked geographically compatible with my location in my domain.
There's no error at the time of bind but the bind error occurs when I try to execute the search.
script:
#!/usr/bin/perl
use strict;
use warnings;
use Net::LDAP;
my $ldap_server = "svlitdc1.shoretel.com";
my $ldap = Net::LDAP->new($ldap_server) or die "$@";
my $mesg = $ldap->bind ('', password => '', version => 3) or die "FATA
+L ERROR: LDAP bind did not succeed: $!\n";
my $username = "tienle";
$mesg = $ldap->search (base => "c=US", filter => "(&(sn=" . $usernam
+e . ")(o=ShoreTel))");
$mesg->code && die $mesg->error;
foreach my $entry ($mesg->entries) { $entry->dump; }
$mesg = $ldap->unbind;
print "Done!\n";
Results:
000004DC: LdapErr: DSID-0C0906E8, comment: In order to perform this op
+eration a successful bind must be completed on the connection., data
+0, v1db1 at ./ldap_try1.pl line 12, <DATA> line 751.
Thanks,
Ken |