Closed DaarKyns closed 1 month ago
Hi @DaarKyns,
When authenticating with login/password, I get this message “This information does not correspond to any account”
Can you post a screenshot of that? Just want to confirm where exactly that's appearing as that text is not an error message I remember existing.
Hello @ssddanbrown,
Thanks for the quick reply. Here's the screenshot
I tested it by installing ldapsearch
on my Debian and it seems to work.
Thanks for your help
This typically means that the connection to LDAP is working, but the issue is likely one of two things:
LDAP_USER_FILTER
, with the given username, within the LDAP_BASE_DN
using the LDAP_DN
as an access account, is not returning the expected (or any) user.You could try temporarily setting LDAP_DUMP_USER_DETAILS=true
and see if that stops and dumps user details on login attempt. If not, then it's probably not matching any users.
Also, how exactly are you defining these options for the container?
Enabling LDAP_DUMP_USER_DETAILS=true
in the .env file doesn't change anything, still this message and no activity in LOG files or anywhere else.
Maybe I'm not looking in the right place ?
volume/docker/bookstack/log/bookstack/laravel.log ? volume/docker/bookstack/backups ?
I created the container using the docker CLI available at (https://hub.docker.com/r/linuxserver/bookstack)
docker run -d \
--name=bookstack \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e APP_URL=URL \
-e DB_HOST=IP_server \
-e DB_PORT=3306 \
-e DB_USER=DB_user \
-e DB_PASS=DB_password \
-e DB_DATABASE=DB_bookstack \
-e QUEUE_CONNECTION= `#optional` \
-p 80:80 \
-v /data/bookstack_config:/config \
--restart unless-stopped \
lscr.io/linuxserver/bookstack:24.02.3
in the .env file doesn't change anything
Generally that means that the search for the user in LDAP is not returning any results, possibly indicating a bad user filter value, bad base DN, or wrong (not matching) username value provided in the form.
.env
file are you changing, what's its exact path?sAMAccountName
value for a user in the LDAP system?no activity in LOG files or anywhere else.
I wouldn't expect any errors to be logged to log files for this.
The path is /data/bookstack_config/www/.env
The name in the “User name” field is the same as the sAMAccountName value in Active Directory
Okay.
Can you try running the following exec against the running container to confirm the output:
docker exec -it bookstack php /app/www/artisan tinker --execute="dd(config('services.ldap.user_filter'))"
Hello,
Here is the output of the command
"(sAMAccountName=$${user})" // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:1
@DaarKyns Okay, so that appears to be different to what you originally posted above. Can you check the option in your .env
file, does the option there include any $
symbols in the value?
After verification, the .env file is indeed 'LDAP_USER_FILTER=“(&(sAMAccountName={user}))”' This '(sAMAccountName=$${user})' comes from the creation of the container in docker CLI
docker run -d
--name=bookstack
-e PUID=1000
-e PGID=1000
-e TZ=Etc/UTC
-e APP_URL=URL
-e DB_HOST=IP_Server
-e DB_PORT=3306
-e DB_USER=book_user
-e DB_PASS=password
-e DB_DATABASE=bookstack
-e LDAP_HOST=IP_AD_Server
-e LDAP_BASE_DN=dc=domain,dc=lan
-e LDAP_USER_DN=cn=sa_bookstack_ad_auth,OU=1,OU=2,OU=3,DC=domain,DC=lan
-e LDAP_USER_PASSWORD=user_password
-e LDAP_USER_FILTER='(&(sAMAccountName={user}))'
-p 80:80
-v /data/bookstack_config:/config
--restart unless-stopped
lscr.io/linuxserver/bookstack:24.02.3
I run the command :
docker exec -it bookstack php /app/www/artisan tinker --execute="dd(config('services.ldap.user_filter'))"
The output is :
"(&(sAMAccountName={user}))" // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:1
I'm not an expert on containerization I'm looking to see if there are multiple .env files.
find / -name ".env"
/var/lib/docker/overlay2/7aeeddb1e801ba151c7441bcaa7b290e781eeb65610bf615e464913cf290f8e3/merged/app/www/.env
/var/lib/docker/overlay2/7aeeddb1e801ba151c7441bcaa7b290e781eeb65610bf615e464913cf290f8e3/diff/app/www/.env
/data/bookstack_config/www/.env
/path/to/bookstack/config/www/.env
/user/bookstack_config/www/.env
Only one of the .env files has LDAP configuration (/data/bookstack_config/www/.env).
Sorry I'm not much help.
@DaarKyns Okay, remove all LDAP
options from the container/command-line itself, and just keep to configuring LDAP options via the /data/bookstack_config/.env
file, so we only have to worry about one level of configuration. Currently these command line/docker env options will be overriding anything in the .env
file causing confusion.
Then test things out again.
I stopped the container
docker stop bookstack
I delete the container
docker rm bookstack
I created a new container without LDAP options
docker run -d
--name=bookstack
-e PUID=1000
-e PGID=1000
-e TZ=Etc/UTC
-e APP_URL=URL
-e DB_HOST=IP_Server
-e DB_PORT=3306
-e DB_USER=book_user
-e DB_PASS=password
-e DB_DATABASE=bookstack
-p 80:80
-v /data/bookstack_config:/config
--restart unless-stopped
lscr.io/linuxserver/bookstack:24.02.3
I deleted the other .env files, leaving only the /data file.
I run the command
docker exec -it bookstack php /app/www/artisan tinker --execute="dd(config('services.ldap.user_filter'))"
The result
"(&(sAMAccountName={user}))" // vendor/psy/psysh/src/ExecutionClosure.php(40) : eval()'d code:1
The authentication problem is still present.
Try again with the LDAP_DUMP_USER_DETAILS=true
option set (in the .env
), now that the user filter is correct.
If that does not stop and dump user details on login attempt, then the filter & provided username combined is not correct and is not matching users in your environment.
Otherwise, if it does stop and dump user details, then it's likely a password issue.
Problem solved, in fact a $ was missing from the LDAP filter
LDAP_USER_FILTER=(&(sAMAccountName={user}))
LDAP_USER_FILTER=(&(sAMAccountName=${user}))
Thank you for your quick help
Ah, yeah, you're on an older version, I had missed that. Good to hear it's working now though, will therefore close this off.
Attempted Debugging
Searched GitHub Issues
Describe the Scenario
Hello,
I'm having problems with LDAP authentication I'm using BookStack 24.02.3 on a Debian 12 with the docker image linuxserver.io (https://hub.docker.com/r/linuxserver/bookstack) installed with docker CLI, my database is separate.
When authenticating with login/password, I get this message “This information does not correspond to any account” but nothing is added to the LOG files to identify the problem.
Can you help me ?
Thanks in advance.
Exact BookStack Version
BookStack 24.02.3
Log Content
No response
Hosting Environment
Debian 12 docker image : lscr.io/linuxserver/bookstack:24.02.3 PHP : 8.3.6 MariaDB : 10.11.6