Ldap configuration not working

Hi!
So I have a very simple ldap setup where I have some users, and I want gitea to use those ldap users.
I have configured my ldap settings like this
LDAP (via BindDN)
(I will not put the basic parameters here)
User search base: ou=people,dc=domain,dc=lan
User filter: (&(objectClass=posixAccount))
User Attribute: uid
Email attribute: mail.

I have tried to synchronize but no users seems to be added.

I have make sure that the user filter works, using this:

ldapsearch -x -b ‘ou=people,dc=domain,dc=lan’ -H ldap://"(&(objectClass=posixAccount))"

And I got all my users so the filter is working

Still the log of my lda server only show this when I try to synchronize:

May 27 17:22:54 pdrldap01 slapd[9281]: conn=5422 fd=22 ACCEPT from IP=192.168.4.22:44528 (IP=0.0.0.0:389)
May 27 17:22:54 pdrldap01 slapd[9281]: conn=5422 op=0 BIND dn=“cn=ldapadmin,dc=digitalrat,dc=lan” method=128
May 27 17:22:54 pdrldap01 slapd[9281]: conn=5422 op=0 BIND dn=“cn=ldapadmin,dc=domain,dc=lan” mech=SIMPLE ssf=0
May 27 17:22:54 pdrldap01 slapd[9281]: conn=5422 op=0 RESULT tag=97 err=0 text=
May 27 17:22:54 pdrldap01 slapd[9281]: conn=5422 fd=22 closed (connection lost)

192.168.4.22 is my gitea server. For what I see, gitea was able to bind using the user ldapadmin but after that…nothing.

I can’t find on gitea any logs explain this so any help to make it works will be more than welcome :slight_smile:
Thanks!

Hello,
So I found this in the log:

2020/05/27 21:42:25 …es/auth/ldap/ldap.go:353:SearchEntries() [E] LDAP Search failed unexpectedly! (LDAP Result Code 201 “Filter Compile Error”: ldap: finished compiling filter with extra at end: %!(EXTRA string=*))
2020/05/27 21:42:25 models/user.go:1772:SyncExternalUsers() [E] SyncExternalUsers LDAP source failure [pdrldap01], skipped

Not sure what it means…

Helllo,
So (uid=%s) seems to work right now, I can see the user. No I need to go more granulart to only after a subset of users in this group