H
Homarr9mo ago
HomerCH

LDAP: Cannot read properties of undefined (reading 'dn')

I have a docker-compose instance of homarr (v 0.15.0) and a Univention CS. So, as I have already done with nextcloud and various other services, I want to use LDAP as the homarr user backend. My config is: homarr: container_name: homarr image: ghcr.io/ajnart/homarr:latest restart: unless-stopped environment: AUTH_PROVIDER: ldap AUTH_LDAP_URI: ldap://192.168.100.21:7389 AUTH_LDAP_BASE: dc=example,dc=com AUTH_LDAP_BIND_DN: uid=homarr,cn=users,dc=example,dc=com AUTH_LDAP_BIND_PASSWORD: REDACTED AUTH_LDAP_GROUP_CLASS: univentionGroup AUTH_LDAP_ADMIN_GROUP: Domain Admins AUTH_LDAP_OWNER_GROUP: Enterprise Admins AUTH_LDAP_GROUP_MEMBER_USER_ATTRIBUTE: dn AUTH_LDAP_GROUP_MEMBER_ATTRIBUTE: memberof AUTH_LDAP_USERNAME_ATTRIBUTE: uid volumes: - /var/run/docker.sock:/var/run/docker.sock - /home/homer/docker/apps/homarr/configs:/app/data/configs - /home/homer/docker/apps/homarr/icons:/app/public/icons - /home/homer/docker/apps/homarr/data:/data networks: nord: ipv4_address: 192.168.200.17 arr: ipv4_address: 10.0.1.13 legitimate: ipv4_address: 10.0.0.15 dns: - 10.0.1.254 ##Adguard Using this config, I then try to login (with the verified, correct credentials) and I get: user Administrator is trying to log in using LDAP. Signing in... ERROR Cannot read properties of undefined (reading 'dn') at Object.authorize (.next/server/chunks/7534.js:93:38) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.callback (node_modules/next-auth/core/routes/callback.js:362:14) at async AuthHandler (node_modules/next-auth/core/index.js:302:28) at async NextAuthApiHandler (node_modules/next-auth/next/index.js:22:19) at async auth (.next/server/pages/api/auth/[...nextauth].js:129:12) Is this just me, or is it Next-Auth?
Solution:
I know, but there is no answer there. Answer was given by Meierschlumpf on github. The error means that the user cannot be found in LDAP....
Jump to solution
13 Replies
Cakey Bot
Cakey Bot9mo ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
❓ Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
HomerCH
HomerCHOP9mo ago
For anyone wondering about the networks, nord is IPVLAN L2 mode, and the other 2 are docker networks. I have confirmed that it is not an error on my part. This is a bug. Included the NEXTAUTH_URL, still no joy
Meierschlumpf
Meierschlumpf9mo ago
GitHub
LDAP: Cannot read properties of undefined (reading 'dn') · Issue #1...
Environment Docker Version 1.1.0 Describe the problem Hi, I've deployed the Kubernetes version from https://oben01.github.io/charts/charts/homarr/ but when I'm trying to login on the ui usi...
Solution
HomerCH
HomerCH9mo ago
I know, but there is no answer there. Answer was given by Meierschlumpf on github. The error means that the user cannot be found in LDAP.
HomerCH
HomerCHOP9mo ago
I don't know how to unmark the solution. The real reason for the error is that homarr, when making an ldap query, always uses scope BASE. For my case, with the Univention Corporate Server, the queries will only work with scope SUB.
HomerCH
HomerCHOP9mo ago
GitHub
LDAP: Cannot read properties of undefined (reading 'dn') · Issue #1...
Environment Docker Version 1.1.0 Describe the problem Hi, I've deployed the Kubernetes version from https://oben01.github.io/charts/charts/homarr/ but when I'm trying to login on the ui usi...
Meierschlumpf
Meierschlumpf9mo ago
Okay thanks for investigating, just published a pull request to add support to change this scope
HomerCH
HomerCHOP9mo ago
Thank you very much! Is it possible to apply this as "patch", of sorts, myself, and if not, when can I expect the next release?
Meierschlumpf
Meierschlumpf9mo ago
You should be able to use the dev tag for now, next release will come this week I think
HomerCH
HomerCHOP9mo ago
Thank you
HomerCH
HomerCHOP9mo ago
No description
HomerCH
HomerCHOP9mo ago
Works like a charm with the :dev tag
Serenade
Serenade9mo ago
Don't forget to switch back to latest once we roll out the next version :)
Want results from more Discord servers?
Add your server