https://github.com/lldap/lldap logo
Snow - HelloI tried setting up LLDAP after a l...
# troubleshooting
s
Hello I tried setting up LLDAP after a long time and set up everything how I need it with a new compose file but I still cant get past the part of the initial login. It keeps telling me wrong username and password even though It should work. I also looked into the users.db and it created an admin user.
Copy code
yml
---

services:
  lldap:
    image: lldap/lldap:latest-alpine
    ports:
      # For LDAP, not recommended to expose, see Usage section.
      #- "3890:3890"
      # For LDAPS (LDAP Over SSL), enable port if LLDAP_LDAPS_OPTIONS__ENABLED set true, look env below
      #- "6360:6360"
      # For the web front-end
      - "17170:17170"
    volumes:
      - ./config:/data
    networks:
      network1:
          ipv4_address: 172.26.0.30
    environment:
      - TZ=Europe/Berlin
      - LLDAP_JWT_SECRET='@;g&Av/^=5Na4lX;O#]!>n3bjv==wq7Y'
      - LLDAP_KEY_SEED='E&?FkUpNx1WJd#_V3g6FEBGA<77ik64@'
      - LLDAP_LDAP_BASE_DN=dc=snwy,dc=de
      - LLDAP_LDAP_USER_PASS='S8^6^K24Pj*x!@#q^!6'
    labels:
      - 'traefik.enable=true'
      # Webinterface HTTP
      - 'traefik.http.routers.ldap-ui.entrypoints=http'
      - 'traefik.http.routers.ldap-ui.rule=Host(`ldap.`)'
      - 'traefik.http.middlewares.ldap-ui.redirectscheme.scheme=https'
      - 'traefik.http.middlewares.ldap-ui.redirectscheme.permanent=false'
      - 'traefik.http.routers.ldap-ui.service=noop@internal'
      # Webinterface HTTPS
      - 'traefik.http.routers.ldap-secure-ui.entrypoints=https'
      - 'traefik.http.routers.ldap-secure-ui.rule=Host(`ldap.`)'
      - 'traefik.http.routers.ldap-secure-ui.service=ldap-ui'
      - 'traefik.http.routers.ldap-secure-ui.tls=true'
      - 'traefik.http.routers.ldap-secure-ui.tls.domains=ldap.'
      - 'traefik.http.services.ldap-ui.loadBalancer.server.port=17170'
      - 'traefik.http.services.ldap-ui.loadBalancer.passHostHeader=true'      

volumes:
  lldap_data:
    driver: local

networks:
  network1:
    name: proxy
    external: true
a
message has been deleted
s
(secrets wont matter I will just change them :D)
n
Note that if you change the seed, that resets all the passwords
The admin password is only read on the very first startup, when it creates the admin user
If you changed the password in the config after that, it won't be used
You can force reset it to the config value if you use the daily release
But try just "password" maybe?
s
Yeah I know, I deleted the files and restarted with force-recreate argument
Nope, neither password nor the provided password from the env variable works
n
Can you paste the LLDAP verbose logs?
s
sure one sec
n
(not super clear from your previous answer: have you tried deleting the DB?)
s
oh yeah I do that
first I delete the db and then force-recreate the container
n
I don't see a login attempt in the logs
s
oh wait
sry :D
Copy code
log
lldap-1  | 2024-08-28T21:41:40.214474318+00:00  DEBUG    HTTP request [ 2.12ms | 4.18% / 100.00% ] method: "POST" | uri: "/auth/opaque/login/start"
lldap-1  | 2024-08-28T21:41:40.214532198+00:00  DEBUG    ┝━ opaque_login_start [ 2.04ms | 0.74% / 95.82% ]
lldap-1  | 2024-08-28T21:41:40.214540838+00:00  DEBUG    │  ┕━ login_start [ 2.02ms | 86.86% / 95.08% ]
lldap-1  | 2024-08-28T21:41:40.214549958+00:00  DEBUG    │     ┕━ get_password_file_for_user [ 175µs | 8.22% ] user_id: UserId(CaseInsensitiveString("admin"))
lldap-1  | 2024-08-28T21:41:40.216926055+00:00  DEBUG    ┕━ 🐛 [debug]:  | status_code: 200
n
Login... Successful?
doesnt look successful?
n
F12, console output?
hm
n
Network, the login requests?
Ah, wait, the logs are not for a complete login attempt
That's only the first step, that doesn't check the password
s
So? Anything else to try?
fyi: if I remove the LLDAP_LDAP_USER_PASS env var it works with the default "password"
but still a bit weird because why does it work now? seems like something gets messed up during the password setting
n
Have you tried with the quotes in the password?
s
with? I think you meant without because I'm using quotes
:D
n
Either 🙂
s
alright
n
With the quotes in the web ui
Or without in the config
The docker env variables can be confusing with quote expansion
s
so I've tried it with
Copy code
yml
- LLDAP_LDAP_USER_PASS="password123"
and
Copy code
yml
- LLDAP_LDAP_USER_PASS=password123
but both dont work
which is...really weird
n
What if you set it in the config?
s
hmm okay
wait
it even transfers to the actual container filesystem but still nothing
:/
n
No login in the logs?
s
isnt it the one from the last few lines
n
And just to make sure, set an admin email in the config
alright
n
And check that it's printed in the config dump at the top
Nope
s
It does get printed at the top now but I am a bit curious now why the logs dont print any login
because as much as I press the login button nothing get live logged into the log
n
Console? Network requests?
Does it go to the right address?
Do you have 2 LLDAP containers running?
I do now because one is my working setup rn and the other one is my test now to figure out this bug for you. But they are seperated and go to the correct containers
n
You've got something weird going on with your bootstrap js file
It's expecting json and getting an html error page, I think
Can you look into that?
s
Yeah I'm currently figuring out if traefik messes something up
omg it works
I had a stupid typo in my traefik labels
that prevented it redirect to the correct point
Copy code
yml
      - LLDAP_LDAP_USER_PASS=password123
this format works btw ^^
ugh, sorry for bothering you with this and taking away your time ^^
n
No problem 🙂