LDAP auth type cant work via BindDN and SimpleAUTH


#1

Hello! I,m can’t login into ldap server.
I,m will setup options on admin panel :


But i,m cant login via any ldap user (user in ldap group developers)

I,m test ldap query in console via ldapsearch app and users are recieved.

Why ldap auth may not work ?


#2

You need to change log level to TRACE and post logs from logs/gogs.log here. https://github.com/gogs/gogs/blob/master/conf/app.ini#L331

Besides, be respectful to the post template…


#3

Hello!

2019/02/18 05:11:15 [TRACE] Session ID: eb0940466baf26c2
2019/02/18 05:11:15 [TRACE] CSRF Token: 2fDZPlV9DPsqtMIEM2BdgkCCS2g6MTU1MDQ2NjY2NjI1NDc3MzExNA==
2019/02/18 05:11:15 [TRACE] LDAP: Dialing with security protocol ‘0’ without verifying: false
2019/02/18 05:11:15 [TRACE] LDAP will use BindDN
2019/02/18 05:11:15 [TRACE] Search for LDAP user: dev
2019/02/18 05:11:15 [TRACE] LDAP: Bound as BindDN: cn=admin,dc=ccord,dc=local
2019/02/18 05:11:15 [TRACE] LDAP: Searching for DN using filter ‘cn=dev’ and base ‘cn=developer,ou=groups,dc=ccord,dc=local’
2019/02/18 05:11:15 [TRACE] LDAP: Failed search using filter ‘cn=dev’: LDAP Result Code 201 “”: ldap: filter does not start with an ‘(’
2019/02/18 05:11:15 [TRACE] Template: user/auth/login


#4

I think the log says pretty much clear.


#5

Hello!
Do you see any user filter on screens with out “(” ?


#6

Logs say this.


#7

I think you might need to look for problems on LDAP server side, this is error given by it.


#8

Ok. Thank you


#9

How correctly write admin filter , if admin is a member of cn=admin,ou=groups,dc=cord,dc=local ?