rackslab / Slurm-web

Open source web dashboard for Slurm HPC clusters
https://slurm-web.com
GNU General Public License v3.0
340 stars 97 forks source link

LDAP: Unable to find users in LDAP in base cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ subtree #358

Closed nikolaussuess closed 1 month ago

nikolaussuess commented 1 month ago

Hi,

I have an issue with the LDAP authentication: The login to the server works, but no users are found. See:

root@...:/etc/slurm-web# /usr/libexec/slurm-web/slurm-web-ldap-check --log-flags ALL --debug-flags ALL
INFO ⸬ Running slurm-web-ldap-check
WARNING ⸬ Unable to find users in LDAP in base cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ subtree
No user found in LDAP directory.

But ldapsearch works fine:

ldapsearch -LLL -H ldap://HOSTNAME -Z -D "cn=ADMINUSER,cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ" -b "cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ" -W "(|(department=GROUP)(memberof=CN=GROUP,CN=Users,DC=i,DC=cs,DC=XXX,DC=YYY,DC=ZZZ))" displayName

One difference/potential issue that I found is, that the users are organized in a CN=users instead of an OU, and groups are sub-containers of that CN=users (e.g., cn=mygroup,cn=users,...).

Relevant part of gateway.ini:

[authentication]
enabled=yes

[ldap]
uri=ldap://HOSTNAME
user_base=cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ
group_base=cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ
group_name_attribute=cn
starttls=True
bind_dn=cn=adminaccount,cn=users,dc=i,dc=cs,dc=XXX,dc=YYY,dc=ZZZ
bind_password=...

Can you perhaps give me a hint what I am doing wrong, or is this a bug?

Thank you very much in advance!