https://github.com/lldap/lldap logo
frazzle - Hello, been trying to setup nextcloud...
# troubleshooting
f
Hello, been trying to setup nextcloud's ldap backend for the past few days and having no luck, experience has been extremely weird. Anyone have an idea what's going wrong?
a
message has been deleted
f
I followed the example config listed on the repo here: https://github.com/lldap/lldap/blob/main/example_configs/nextcloud.md My nextcloud connects to lldap without any issues, even shows the groups in the accounts page after the first run and the accounts numbers in groups, and the number of accounts. Completely prevents me from logging in via lldap and eventually all the groups disappear and the users.
n
Seems that the login for lldap_user_one fails, and it detects that all the accounts are gone or something like that
Can you log in as that user in LLDAP?
Can you post the LLDAP verbose logs when synchronizing with nextcloud?
f
Yes these users work fine in LLDAP themselves. I'll see if I can get LLDAP logs
turned on
LLDAP_VERBOSE=true
, restarted lldap and nextcloud. ran these 3 cmds on nextcloud:
n
I can't be sure, but the issue might be that the bind user for nextcloud doesn't have sufficient privileges. Is it a member of (at least) lldap_strict_readonly? Or any other lldap\_ built-in groups?
There's also something in the command logs you gave me about not matching DC, though I suspect it was redacted because it's example.com
f
it's only got lldap_strict_readonly
n
What is the bind user redacted to in your examples?
f
lldap_ro_account
n
The logs you gave me of LLDAP show a normal user doing normal user things, successfully
I can't extrapolate too much from that
f
would destroying nextcloud and all the data, and recreating the initial ldap connection for the first time help? I can do that again with lldap verbose mode on the whole time
n
That can't hurt, but I don't know when I'd have the time to go through that much logging 😄
f
yeah I figured. Wonder if trying an older nextcloud version would somehow help, cause it's such a weird issue
n
I need to get some LLMs to summarize the logs
f
i'll get the full dump with the same scenario after my pizza 😆
n
I'll be asleep by then, but send it over!
steps taken: 1. stopped nextcloud 2. wiped nextcloud 3. restarted lldap 4. started nextcloud 5. logged into nextcloud as admin 6. enabled debug logs 7. logged out 8. ran nextcloud ldap config setup commands 9. tried to login as ldap_user_one 10. logged into nextcloud as admin 11. dumped logs of both lldap_user_one -> login user lldap_ro_account -> bind account
n
I don't know whether that's the issue, but you have a trailing
\n
in your DC, I think on the LLDAP side, in the config
f
that was it, a new line character in
LLDAP_LDAP_BASE_DN_FILE
and now all is good, surprised nothing else was affected by this. Thanks for the help
n
Great! It might be something we can add, a check for weird characters in the DC
f
yeah a warning or something for certain symbols so others don't end up with this issue, in my case it's because I was using a _FILE, with nano that seemingly auto adds a new line on save. Had to manually hexdump to see and then trunicate to get rid of it >.>
n
https://github.com/lldap/lldap/pull/1297 < made it so you can have a trailing newline, it'll get normalized when parsing.