diff --git a/ldap.go b/ldap.go index d2b372e..a652a31 100644 --- a/ldap.go +++ b/ldap.go @@ -67,7 +67,7 @@ func loginLDAPAccount(uname string, pwd string) error { 0, 0, false, - fmt.Sprintf("(&(objectClass=organizationalPerson)(uid=%s))", uname), + fmt.Sprintf("(&(objectClass=organizationalPerson)(%s=%s))", Conf.Ldap.UserAttr, uname), []string{"dn"}, nil, ))