Ldap login problem: "LDAP Result Code 201"



I am trying to setup gogs with an LDAP connection, but I am getting a strange error that I have problems tracking it down, maybe someone has an idea on how to fix it.

Here is what I see in the log:

2017/05/24 11:42:31 [TRACE] Dialing LDAP with security protocol '0' without verifying: false
2017/05/24 11:42:31 [TRACE] LDAP will use BindDN
2017/05/24 11:42:31 [TRACE] Search for LDAP user: XXX
2017/05/24 11:42:31 [TRACE] Bound as BindDN: de\lYYY
2017/05/24 11:42:31 [TRACE] Searching for DN using filter '(&(objectCategory=person)(objectClass=user))%!(EXTRA string=XXX)' and base 'CN=users,DC=de,DC=ZZZ,DC=com'
2017/05/24 11:42:31 [TRACE] Failed search using filter '(&(objectCategory=person)(objectClass=user))%!(EXTRA string=XXX)': LDAP Result Code 201 "": ldap: finished compiling filter with extra at end: %!(EXTRA string=XXX)
2017/05/24 11:42:31 [ WARN] Failed to login 'XXX' via 'ZZZ': user does not exist [user_id: 0, name: XXX]
2017/05/24 11:42:31 [TRACE] Template: user/auth/signin

And the users cannot login. Any ideas?


Hi, I your filter doesn’t contain placeholder %s.


I have the same problem. Any ideas?

I’m using the version.


My fault. I was configuring bad my User Filter :slight_smile: Sorry


Where you get this log?