LDAP only allows first user to login, and then doesn't work for following users #259

Closed
opened 2026-02-04 18:07:57 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @Chluz on GitHub (Feb 6, 2017).

For Bug Reports

  • BookStack Version: BookStack v0.14.3
  • PHP Version: PHP 7.0.13-0ubuntu0.16.04.1
  • MySQL Version: mysql Ver 14.14 Distrib 5.7.17
Expected Behavior

LDAP users from the group WikiGroup should be able to login

Actual Behavior

Only the initial login from a member of the group WikiGroup was successful, further logins from that user also work, but logins from other users fail with the message 'These credentials do not match our records.'

The config used is as follows (domain name sanitised). As you can see I tried a few things

# LDAP Settings
#LDAP_SERVER=ad.example.com:389
LDAP_SERVER=ldaps://ad.example.com:636
LDAP_BASE_DN=dc=ad,dc=example,dc=com
#LDAP_BASE_DN=OU=Family,OU=PhysicalUsers,DC=ad,DC=example,DC=com
LDAP_DN=cn=WikiAdmin,ou=WikiAccess,OU=LDAP_OU,dc=ad,dc=example,dc=com
LDAP_PASS=blabla
LDAP_USER_FILTER=(&(objectclass=person)(memberOf:1.2.840.113556.1.4.1941:=CN=WikiGroup,OU=WikiAccess,OU=LDAP_OU,DC=ad,DC=example,DC=com))
#LDAP_USER_FILTER=(&(objectClass=user)(sAMAccountName=%s))
#LDAP_USER_FILTER=(&(uid=${user}))
#LDAP_USER_FILTER=(&(uid=user))
LDAP_VERSION=false

Even with APP_DEBUG=true, no additional logs for ldap are being printed to storage/logs/laravel.log
The LDAP server is a samba active directory setup, samba version 4.4.5.

I'm trying to see if I can switch from dokuwiki to bookstack, but I won't be able to do that until I can sort out this ldap problem. Any ideas welcome.

Originally created by @Chluz on GitHub (Feb 6, 2017). ### For Bug Reports * BookStack Version: BookStack v0.14.3 * PHP Version: PHP 7.0.13-0ubuntu0.16.04.1 * MySQL Version: mysql Ver 14.14 Distrib 5.7.17 ##### Expected Behavior LDAP users from the group WikiGroup should be able to login ##### Actual Behavior Only the initial login from a member of the group WikiGroup was successful, further logins from that user also work, but logins from other users fail with the message 'These credentials do not match our records.' The config used is as follows (domain name sanitised). As you can see I tried a few things ``` # LDAP Settings #LDAP_SERVER=ad.example.com:389 LDAP_SERVER=ldaps://ad.example.com:636 LDAP_BASE_DN=dc=ad,dc=example,dc=com #LDAP_BASE_DN=OU=Family,OU=PhysicalUsers,DC=ad,DC=example,DC=com LDAP_DN=cn=WikiAdmin,ou=WikiAccess,OU=LDAP_OU,dc=ad,dc=example,dc=com LDAP_PASS=blabla LDAP_USER_FILTER=(&(objectclass=person)(memberOf:1.2.840.113556.1.4.1941:=CN=WikiGroup,OU=WikiAccess,OU=LDAP_OU,DC=ad,DC=example,DC=com)) #LDAP_USER_FILTER=(&(objectClass=user)(sAMAccountName=%s)) #LDAP_USER_FILTER=(&(uid=${user})) #LDAP_USER_FILTER=(&(uid=user)) LDAP_VERSION=false ``` Even with APP_DEBUG=true, no additional logs for ldap are being printed to storage/logs/laravel.log The LDAP server is a samba active directory setup, samba version 4.4.5. I'm trying to see if I can switch from dokuwiki to bookstack, but I won't be able to do that until I can sort out this ldap problem. Any ideas welcome.
Author
Owner

@ssddanbrown commented on GitHub (Feb 23, 2017):

Hi @Chluz, Sorry for my late reply and this problem you are experiencing. This is a strange one.

Could other users register via LDAP or did that fail aswell?

@ssddanbrown commented on GitHub (Feb 23, 2017): Hi @Chluz, Sorry for my late reply and this problem you are experiencing. This is a strange one. Could other users register via LDAP or did that fail aswell?
Author
Owner

@ssddanbrown commented on GitHub (May 7, 2019):

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue.

@ssddanbrown commented on GitHub (May 7, 2019): Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please open a new issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#259