LDAP Bind over SSL not working #235

Closed
opened 2026-02-04 17:51:16 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @ghost on GitHub (Jan 16, 2017).

Hi,

I can't bind to ldap over an SSL connection on port 636. I use the same settings as on other services, where LDAP bind works fine.

.env config

# General auth
AUTH_METHOD=ldap

# LDAP Settings
LDAP_SERVER=ldap.avionix.ee:636
LDAP_BASE_DN=dc=ldap,dc=avionix,dc=ee
LDAP_DN=uid=randomuser,cn=users,dc=ldap,dc=avionix,dc=ee
LDAP_PASS=randomepassword.
LDAP_USER_FILTER=(&(uid=${user}))
LDAP_VERSION=3

Error message:

ErrorException in Ldap.php line 94:
ldap_bind(): Unable to bind to server: Can't contact LDAP server
in Ldap.php line 94
at HandleExceptions->handleError('2', 'ldap_bind(): Unable to bind to server: Can't contact LDAP server', '/var/www/bookstack/app/Services/Ldap.php', '94', array('ldapConnection' => resource, 'bindRdn' => 'uid=randomuser,cn=users,dc=ldap,dc=avionix,dc=ee', 'bindPassword' => 'randompassword.'))

Am I missing some configuration (i.e. deine ssl or tls)?

Originally created by @ghost on GitHub (Jan 16, 2017). Hi, I can't bind to ldap over an SSL connection on port 636. I use the same settings as on other services, where LDAP bind works fine. .env config ``` # General auth AUTH_METHOD=ldap # LDAP Settings LDAP_SERVER=ldap.avionix.ee:636 LDAP_BASE_DN=dc=ldap,dc=avionix,dc=ee LDAP_DN=uid=randomuser,cn=users,dc=ldap,dc=avionix,dc=ee LDAP_PASS=randomepassword. LDAP_USER_FILTER=(&(uid=${user})) LDAP_VERSION=3 ``` Error message: ``` ErrorException in Ldap.php line 94: ldap_bind(): Unable to bind to server: Can't contact LDAP server in Ldap.php line 94 at HandleExceptions->handleError('2', 'ldap_bind(): Unable to bind to server: Can't contact LDAP server', '/var/www/bookstack/app/Services/Ldap.php', '94', array('ldapConnection' => resource, 'bindRdn' => 'uid=randomuser,cn=users,dc=ldap,dc=avionix,dc=ee', 'bindPassword' => 'randompassword.')) ``` Am I missing some configuration (i.e. deine ssl or tls)?
OVERLORD added the 🐕 Support label 2026-02-04 17:51:16 +03:00
Author
Owner

@lommes commented on GitHub (Jan 16, 2017):

This might be fixed in current master branch with this pull request/merge

@lommes commented on GitHub (Jan 16, 2017): This might be fixed in current master branch with this [pull request/merge](https://github.com/BookStackApp/BookStack/pull/236)
Author
Owner

@ssddanbrown commented on GitHub (Jan 16, 2017):

Hi @av8orch, Sorry to hear you're having problems with SSL LDAP. Your config looks fine, but you're likely just running into this issue: #236

SSL LDAP will be fixed in the next release, At which point you'll need to update your LDAP_SERVER setting to ldaps://ldap.avionix.ee:636.
If you need to get around the issue until the next release and you have some development experience you could apply the fix shown in #236 as a temporary fix.

@ssddanbrown commented on GitHub (Jan 16, 2017): Hi @av8orch, Sorry to hear you're having problems with SSL LDAP. Your config looks fine, but you're likely just running into this issue: #236 SSL LDAP will be fixed in the next release, At which point you'll need to update your `LDAP_SERVER` setting to `ldaps://ldap.avionix.ee:636`. If you need to get around the issue until the next release and you have some development experience you could apply the fix shown in #236 as a temporary fix.
Author
Owner

@ssddanbrown commented on GitHub (Jan 16, 2017):

Ah, Thanks @lommes, You beat me to it while I was typing 😄

@ssddanbrown commented on GitHub (Jan 16, 2017): Ah, Thanks @lommes, You beat me to it while I was typing 😄
Author
Owner

@ghost commented on GitHub (Jan 16, 2017):

Thanks @ssddanbrown and @lommes

This temporary fix did it. LDAPS now works.

@ghost commented on GitHub (Jan 16, 2017): Thanks @ssddanbrown and @lommes This temporary fix did it. LDAPS now works.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#235