Hi I am extremely new to perl, ldap and ldap perl but the bos has
thrown me to the sharks on this one, I need to perform a search for
authentication and have it work but my filter is not being set
of what I have:
&GetFormInput;
my $name = $field{'name'} ;
my $password = $field{'password'} ;
use strict;
use NET::LDAP;
my $matchAttr = "uid";
my $baseDN = "ou=People,o=alcdsb.on.ca";
#connect to LDAP server
my $ldapServer = "mail.alcdsb.on.ca";
my $ldapPort = 389;
my $ldap = new Net::LDAP($ldapServer, port => $ldapPort, debug=>1) or die
"LDAP Server Connection Failed :$error";
#Annonymous Query to LDAP baseed on DN
$mesg = $ldap->search(
base => $baseDN,
$filter = $filter => ($matchAttr == $name)
);
#search error
if (my $error == $mesg->code()) {
die"Sorry $name: LDAP search Connection Failed: $error";
}
unless ($mesg->count()) {
die"User entry not found for filter:$filter";
}
and the messege I get is: User entry not found for filter: at ldapauth.pl
line 29.
Any help would be apreciated, Chris
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
|