I'm still having trouble trying to get output from my LDAP MS Exchange
script.
I'm getting error 11 and error 87 when I do searches and no data.
How do I translate the error code to a description? It might help me make
more progress:
use Net::LDAP;
use Net::LDAP::LDIF;
$server="172.16.1.15"; # IP ADDRESS OF EXCHSH01 Exchange box
$port=389;
$c = Net::LDAP->new($server, port=>$port, diag=>1) or die "Unable to connect
to server $server: $@\n";
# Anonymous bind
$c->bind() or die "Unable to bind: $@\n";
$basedn="o=NavTrak Limited";
$scope="sub";
$filter="(objectclass=organizationalperson)";
#$searchobj = $c->search(base=>$basedn,scope=>$scope,filter=>$filter);
$searchobj = $c->search(base=>$basedn,scope=>$scope);
die "Bad search, errorcode #".$searchobj->code()." $!" if
$searchobj->code();
foreach $entry ($searchobj->all_entries){
$entry->dump;
};
# Disconnect from the LDAP server
$c->unbind();
****************************************************************************
Note
****************************************************************************
The information in this Email message, and any files transmitted with it,
are confidential and intended only for use of the individual or entity named
as recipient. If the reader of this message is not the intended recipient
you are hereby notified that any dissemination, processing, distribution or
copy of this material is strictly prohibited. If you have received this
Email in error, please immediately notify our network manager on the
telephone number below and delete the message. Your co-operation is
appreciated.
Any personal opinions expressed in this message are those of the sender and
should not be taken as representing the views of ITIS Holdings.
****************************************************************************
Contact Details
ITIS Holdings
The Warrant House
1 The High Street
Altrincham
WA14 1PZ
Telephone - (44) 161 929 5788
|