https://github.com/lldap/lldap logo
wahlis - Hi! I have a bit of an issue (since s...
# troubleshooting
w
Hi! I have a bit of an issue (since several months at least 😋) The lldap server works fine and authenticates me against about a dozen services. However, I can't log in to the gui. I've tried both up- and downgrading the service. Looking at the logs while trying to log in I get [debug]: | status_code: 500 In my lldap_config.toml I have an admin user and password defined, but they dont't work either. admin/passwords returns "Invalid username or password" in the GUI and logs status 200. My "normal" user, which returns 500, says Could not log in in the GUI. Any suggestions on how I can create an admin user which can login?
n
My guess is something to do with your HTTP setup
It would be helpful to have the network logs (request/responses) and the LLDAP verbose logs while trying to log in
But I'm on holidays with limited computer access, so I'm not sure if/when I can have a look
w
There is no rush with this issue, I've been managing fine with my existing users for a loooong time 🙂
n
And what username are you using to log in?
It should be the bare, friendly username
w
My personal username, not the email.
n
Not the fully qualified LDAP one
w
Only the friendly name. The same as I use in the services themselves
n
Then yeah, I suspect your HTTP setup/firewall/proxy
Or browser extension
Anything to shift the blame from LLDAP :p
(just kidding obviously)
The logs should tell
w
I've tried private mode, so not that. But perhaps my network setup might be an issue. I run it on Docker with Traefik. Normally on the local network, but I've also tried to expose it
n
Yeah, the logs (client and server) will help diagnose, who received what and responded with what
I'll try to have a look later if you send them over
w
Thanks!
n
Hmm, this warrants further investigation... It is indeed LLDAP returning a 500, after correctly checking the password
w
Let me know if I can help with some data.
Another question - I can't log in with the admin user either. That one returns 200 and info about incorrect password. Is there any way to generate a new password and insert directly to the db?
n
There's a setting or CLI flag in latest, something along the lines of force reset admin password
w
Interestingly enough this reset changed the message for the admin user from Incorrect user or password to Could not login. In the log the newly reset password for the admin user also generates a 500 error. Looking further in the logs it looks like the bind broke when the admin password was reset?
If you think my issues are relevant and interesting I'll be happy if you can help me. But if you think this is a unique issue it might be easier if I just reset my database and recreate it from scratch? There are only a handful of users to inform.
And thanks for a great piece of software as well! My problems withstanding it feels really solid and has worked very well for me. The simplicity compared to slapd is wonderful 🙂
n
Those last logs are different: they are LDAP logins with the wrong password. It doesn't show a 500
It's good to know that the password reset gave us a 500: at least it's only a single bug 🙂
I don't expect a DB reset to help. But you can always try to stand up a new instance and see if you hit the same issue
alright, I had a look at the code, and to produce the logs that you see with the 500, it'd have to come from an error inserting the JWT in the DB. I assume your connection to the DB is working (otherwise you wouldn't have any user, you know). Did you do any manual intervention on the DB?
The next step would be to produce logs with
RUST_LOG=debug
in the env. That overrides the
verbose
setting to also display usually filtered messages. Or, if you're up for recompiling LLDAP yourself, I can send you some debug patches to print out more info.
(for reference, the failing line issuing the SQL statement: https://github.com/lldap/lldap/blob/main/server/src/infra/sql_backend_handler.rs#L62 )