kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
739 stars 253 forks source link

please help me #244

Closed zzzzl13 closed 3 years ago

zzzzl13 commented 3 years ago

I got a very confused problem. when I use: ldap_servers xxx{ url ldap://ip:389/dc=xx,dc=xx?sAMAccountName?sub?(objectClass=person); binddn xxx; binddn_passwd psw; group_attribute memberOf; group_attribute_is_dn on; require valid_user; I open the website it comes out nothing. And I check the error.log, I find an error "Authentication times out" but when change the url into 'url ldap://ip:389/dc=xx,dc=xx?sAMAccountName?;' I get the login website, but no matter what I input, it failed and comes up with "could not find user DN"

please help me, thanks

davama commented 3 years ago
ldap_server ldap_local {
        url "ldap://localhost/dc=Bla,dc=net?uid?sub?(objectClass=posixAccount)";
        binddn "cn=authuser,dc=Bla,dc=net";
        binddn_passwd "blabla";
        require group "cn=config,ou=Group,dc=Bla,dc=net";
        group_attribute "memberUid";
        group_attribute_is_dn off;
        require valid_user;
        satisfy all;
}

what we use with no issues

zzzzl13 commented 3 years ago
ldap_server ldap_local {
        url "ldap://localhost/dc=Bla,dc=net?uid?sub?(objectClass=posixAccount)";
        binddn "cn=authuser,dc=Bla,dc=net";
        binddn_passwd "blabla";
        require group "cn=config,ou=Group,dc=Bla,dc=net";
        group_attribute "memberUid";
        group_attribute_is_dn off;
        require valid_user;
        satisfy all;
}

what we use with no issues

Thanks for your reply. I change port into 3268 and it worked magically. It seems like there is different function in port 3268