Hello,
I try to use URI:LDAP to find a user's email from a Windows login name. However
this is not working:
use URI::LDAP
$uri = URI->new("ldap:");
$uri->host("ldap_svr:389");
$uri->dn("dc=aa,dc=bb");
$uri->attributes(qw(mail));
$uri->scope('sub');
$uri->filter('(sn=xxx)');
$uri->extensions(bindname => "cn=id,DC=aa,DC=bb", BINDPW => "abc");
print $uri->as_string,"\n";
print $uri->query, "\n";
The output is:
ldap://ldap_svr:389/dc=aa,dc=bb?mail?sub?(sn=xxx)?bindname=cn=id%2CDC=aa%2CDC=bb,BINDPW=abc
mail?sub?(sn=xxx)?bindname=CN=id%2CDC=aa%2CDC=bb,BINDPW=abc
It did not return the email as expected. Can anyone shed some light here?
Thanks,
Andrew
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/201469230/direct/01/