]> git.proxmox.com Git - pve-access-control.git/blobdiff - PVE/Auth/AD.pm
use correct connection string for AD auth (use encryption and port info).
[pve-access-control.git] / PVE / Auth / AD.pm
index eb502f7bbf3a3348dc8fb44568fe5c1af641ea04..35396b937c77f2efffc5d93c18d8740827204c0f 100755 (executable)
@@ -80,7 +80,7 @@ my $authenticate_user_ad = sub {
     my $scheme = $config->{secure} ? 'ldaps' : 'ldap';
     my $conn_string = "$scheme://${server}:$port";
     
     my $scheme = $config->{secure} ? 'ldaps' : 'ldap';
     my $conn_string = "$scheme://${server}:$port";
     
-    my $ldap = Net::LDAP->new($server) || die "$@\n";
+    my $ldap = Net::LDAP->new($conn_string) || die "$@\n";
 
     $username = "$username\@$config->{domain}" 
        if $username !~ m/@/ && $config->{domain};
 
     $username = "$username\@$config->{domain}" 
        if $username !~ m/@/ && $config->{domain};