Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to authenticate to LibreNMS via LDAP #15760

Open
Rodrigus189 opened this issue Jan 17, 2024 · 2 comments
Open

Failed to authenticate to LibreNMS via LDAP #15760

Rodrigus189 opened this issue Jan 17, 2024 · 2 comments

Comments

@Rodrigus189
Copy link

The problem

Hello everyone, I'm trying to authenticate LDAP users to LibreNMS and I'm getting an error when trying, I'm going to leave the error in the log box. Through the web interface I receive a message like "bind success" and when executing the auth_teste.php script, I receive the same message, but informing that the credentials are invalid. But they're not, I followed the same configuration pattern as other environments I have and it's working, only in Libre it doesn't work.

Output of ./validate.php

[OK]    Composer Version: 2.6.6
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database Schema is current
[OK]    SQL Server meets minimum requirements
[OK]    lower_case_table_names is enabled
[OK]    MySQL engine is optimal
[OK]    Database and column collations are correct
[OK]    Database schema correct
[OK]    MySQL and PHP time match
[OK]    Active pollers found
[OK]    Dispatcher Service not detected
[OK]    Locks are functional
[OK]    Python poller wrapper is polling
[OK]    Redis is unavailable
[OK]    rrd_dir is writable
[OK]    rrdtool version ok

What was the last working version of LibreNMS?

No response

Anything in the logs that might be useful for us?

ldap_get_entries(): Argument #2 ($result) must be of type LDAP\Result, bool given {"exception":"[object] (TypeError(code: 0): ldap_get_entries(): Argument #2 ($result) must be of type LDAP\\Result, bool given at /opt/librenms/LibreNMS/Authentication/LdapAuthorizer.php:160)"}
@ottorei
Copy link
Contributor

ottorei commented Jan 23, 2024

The ldap_get_entries function returns false when the query fails. Are you sure your the search filter is correct here?

@rudybroersma
Copy link
Contributor

I'd just like to comment that we are using LDAP authentication with LibreNMS against Microsoft AD and it works fine.
Your issue is most likely a configuration issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants