kvspb / nginx-auth-ldap

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

Could not find user DN #133

Open and1990 opened 8 years ago

and1990 commented 8 years ago

when i input a valid username and password, it always shows the error log,what should i do with this?

error log

2016/05/04 08:37:13 [error] 4365#0: *2 http_auth_ldap: Could not find user DN, client: 192.168.223.1, server: localhost, request: "GET / HTTP/1.1", host: "192.168.223.129:8081"

ldap server config

ldap_server benmu_ldap {
    # user search base.
    url "ldap://127.0.0.1:389/DC=benmu,DC=org?sAMAccountName?sub?(objectClass=*)";
    # bind as
    binddn "CN=admin,DC=benmu,DC=org";
    # bind pw
    binddn_passwd 1234;
}
and1990 commented 8 years ago

I have solved the above problem. Here is my before config url "ldap://127.0.0.1:389/DC=benmu,DC=org?sAMAccountName?sub?(objectClass=*)";

Here is my now config url "ldap://127.0.0.1:389/DC=benmu,DC=org?uid?sub?(&(objectClass=CiscoPerson))";

when i added 'uid' in the url, the problem solved. If without the 'uid' field, the error occurs and the message is 'Could not find user DN'.