ldap_search(): Search: Partial results and referral received #634

Closed
opened 2026-02-04 21:32:40 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @coolool on GitHub (Apr 11, 2018).

  • BookStack Version: v0.20.3
  • PHP Version: 7.0.27
  • MySQL Version: 10.1.26
AUTH_METHOD=ldap
LDAP_SERVER=ldaps://serverIP:386
LDAP_BASE_DN=dc=DOMAIN,dc=com
LDAP_DN=false
LDAP_PASS=false
LDAP_USER_FILTER=(&(uid=${user}))
LDAP_VERSION=false
LDAP_EMAIL_ATTRIBUTE=mail

These are the current settings, it keeps throwing this error "ldap_bind(): Unable to bind to server: Can't contact LDAP server" when I try logging in.

image

image

Still sort of new to the whole Linux scene, please speak slowly because I am kinda slow. Thanks in advance! 😄

Originally created by @coolool on GitHub (Apr 11, 2018). * BookStack Version: v0.20.3 * PHP Version: 7.0.27 * MySQL Version: 10.1.26 ``` AUTH_METHOD=ldap LDAP_SERVER=ldaps://serverIP:386 LDAP_BASE_DN=dc=DOMAIN,dc=com LDAP_DN=false LDAP_PASS=false LDAP_USER_FILTER=(&(uid=${user})) LDAP_VERSION=false LDAP_EMAIL_ATTRIBUTE=mail ``` These are the current settings, it keeps throwing this error "ldap_bind(): Unable to bind to server: Can't contact LDAP server" when I try logging in. ![image](https://user-images.githubusercontent.com/18150773/38617262-837017be-3d64-11e8-887f-ca25dad625bc.png) ![image](https://user-images.githubusercontent.com/18150773/38617252-7a144082-3d64-11e8-8cf8-88d66a4628f5.png) Still sort of new to the whole Linux scene, please speak slowly because I am kinda slow. Thanks in advance! 😄
OVERLORD added the 🐕 Support label 2026-02-04 21:32:40 +03:00
Author
Owner

@coolool commented on GitHub (Apr 17, 2018):

I got past my first issue and it appears to actually be looking in AD now. But it keeps saying it can't find my credentials:

image

when I removed the desired ou from LDAP_BASE_DN I get:

image

Thoughts?

@coolool commented on GitHub (Apr 17, 2018): I got past my first issue and it appears to actually be looking in AD now. But it keeps saying it can't find my credentials: ![image](https://user-images.githubusercontent.com/18150773/38876567-b2ece006-422a-11e8-81d9-16aab8a128cf.png) when I removed the desired ou from LDAP_BASE_DN I get: ![image](https://user-images.githubusercontent.com/18150773/38876685-fcb8d686-422a-11e8-973e-7cdb5da170ed.png) Thoughts?
Author
Owner

@coolool commented on GitHub (Apr 19, 2018):

These are my settings:

image

@coolool commented on GitHub (Apr 19, 2018): These are my settings: ![image](https://user-images.githubusercontent.com/18150773/38990750-7f2e9f18-43a9-11e8-95a6-452ff4502c28.png)
Author
Owner

@ssddanbrown commented on GitHub (Apr 21, 2018):

Hi @coolool, I can try to help but I don't have AD to test against.

I think for AD you need to set: LDAP_VERSION=3.

I think you also may have to change the LDAP_USER_FILTER variable.

I'm not sure if objects in active directory have a uid property. After a search about it looks like AD uses the property userPrincipalName for the username. You could try the following:

LDAP_USER_FILTER=(&(userPrincipalName=${user}))

Let me know if that gets you any further.

@ssddanbrown commented on GitHub (Apr 21, 2018): Hi @coolool, I can try to help but I don't have AD to test against. I think for AD you need to set: `LDAP_VERSION=3`. I think you also may have to change the `LDAP_USER_FILTER` variable. I'm not sure if objects in active directory have a `uid` property. After a search about it looks like AD uses the property `userPrincipalName` for the username. You could try the following: ``` LDAP_USER_FILTER=(&(userPrincipalName=${user})) ``` Let me know if that gets you any further.
Author
Owner

@coolool commented on GitHub (Apr 23, 2018):

Hey! Thanks for getting back to me.

SO I tried that. I am getting the same errors. DO you have any other things I could try?

@coolool commented on GitHub (Apr 23, 2018): Hey! Thanks for getting back to me. SO I tried that. I am getting the same errors. DO you have any other things I could try?
Author
Owner

@coolool commented on GitHub (Apr 23, 2018):

image

(&(objectCategory=Person)(sAMAccountName=${user}))

That was the answer! I GOT IT! Thanks for your Help!

@coolool commented on GitHub (Apr 23, 2018): ![image](https://user-images.githubusercontent.com/18150773/39131988-c77ad560-46de-11e8-982c-458286be4a68.png) (&(objectCategory=Person)(sAMAccountName=${user})) That was the answer! I GOT IT! Thanks for your Help!
Author
Owner

@ssddanbrown commented on GitHub (Apr 23, 2018):

@coolool Ah, Awesome, Glad to hear things are working now. Will therefore close this issue.

@ssddanbrown commented on GitHub (Apr 23, 2018): @coolool Ah, Awesome, Glad to hear things are working now. Will therefore close this issue.
Author
Owner

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

🤦‍♂ Looks like I hit the wrong button before and didn't close this, Now closing.

@ssddanbrown commented on GitHub (May 18, 2019): 🤦‍♂ Looks like I hit the wrong button before and didn't close this, Now closing.
Author
Owner

@jlaf1983 commented on GitHub (Oct 9, 2019):

do you know how to parse the result or just ask for a username and display name?. I am connecting and searching fine but result has a lot of unuseful information. I was trying to format result but i have no success.

@jlaf1983 commented on GitHub (Oct 9, 2019): do you know how to parse the result or just ask for a username and display name?. I am connecting and searching fine but result has a lot of unuseful information. I was trying to format result but i have no success.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#634