I have n early th same problem. Maybe we could help each other. Try:
my $m;#=Net::LDAP::Message->new(); # Answer from LDAP-Server
$ldap = Net::LDAP->new($LDAPhost) or die "Can't find Server";
$m=$ldap->bind(dn=>$userDN,password=>$userPasswd); # Auth User if ($m->is_error()) # on Error { print "error: ".$m->error()."\n"; # error from server return $m->error(); }
I hope this will help you. My problem is, that my LDAP-Server wonl't accept my userDN and userPasswd... I think it is a thing like:
$userDN="cn=Elflein,ou=root"; userPasswd="PwdInPlain"; # Password as I would type it into a Passwordfield
Any sugestions?
Andreas Elfein
Choudary Asad Mumtaz wrote:
Hi All,
I need to authenticate users accessing my CGI page against an Active Directory Server. I have gone through the NET::LDAP, but I haven't been able to figure out the right method to do so. I just need to authenticate the users and carry on with CGI page. If anyone has been able to accomplish this, please provide me an example.
Thank you.