I am runninga simple win2k an getting the follwoing error> Please help me. thanks in advance

------------------
Return code: 49 Message: LDAP_INVALID_CREDENTIALS :The wrong password was supplied or the SASL creden
MessageID: 1 DN: Total entries returned: 0
----------------------------


_______code------------------

#!/usr/bin/perl

use strict;
use Net::LDAP;
use Authen::SASL;
#use Net::LDAP::Constant qw(LDAP_CONTROL_PAGED);
use Net::LDAP::Util qw( ldap_error_name
                          ldap_error_text) ;


my $ad = Net::LDAP->new("ddxmoline3.jdnet.deere.com") or die "Could not connect!";



my $mesg = $ad->bind("[EMAIL PROTECTED]", password=>"<password>", version => 3);


 if ( $mesg->code ) {
        #
        # if we've got an error... record it
        #
        LDAPerror("Searching",$mesg);
        }
# Declare the necessary search variables

# What is the search base?

my $searchbase = 'OU=TeamSite,OU=Apps,OU=Computer Center Moline,DC=jdnet,DC=deere,DC=com';

# What are we searching for?

my $filter = "CN=dlrdocausjdcompassgeneralworkarea";

# Which attributes should be returned?

my $attrs = "mail";

# Execute the search

my $results = $ad->search(base=>$searchbase,filter=>$filter,attrs=>$attrs);

# How many entries returned?
#print "Result:: $results->error \n";

 if ( $results->code ) {
        #
        # if we've got an error... record it
        #
        LDAPerror("Searching",$results);
        }


sub LDAPerror { my ($from,$mesg) = @_; print "Return code: ",$mesg->code ; print "\tMessage: ", ldap_error_name($mesg->code); print " :", ldap_error_text($mesg->code); print "MessageID: ",$mesg->mesg_id; print "\tDN: ",$mesg->dn;

}

my $count = $results->count;

print "Total entries returned: $count\n";



# Unbind from the server

$ad->unbind;






Reply via email to