Hi Guys,
Please help me in fixing LDAP Auth with my librenms server :-
librenms@SERVER:~$ tail -f /opt/librenms/logs/librenms.log
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)”}
librenms@SERVER:~$ ./scripts/auth_test.php -u EXT.MAHLAWAT.MAHESH
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
Authentication Method: ldap
ldap_url_parse_ext(ldap://localhost/)
ldap_init: trying /etc/ldap/ldap.conf
ldap_init: using /etc/ldap/ldap.conf
ldap_init: HOME env is /opt/librenms
ldap_init: trying /opt/librenms/ldaprc
ldap_init: trying /opt/librenms/.ldaprc
ldap_init: trying ldaprc
ldap_init: LDAPCONF env is NULL
ldap_init: LDAPRC env is NULL
ldap_create
ldap_url_parse_ext(ldap://10.226.10.5:389)
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP 10.226.10.5:389
ldap_new_socket: 6
ldap_prepare_socket: 6
ldap_connect_to_host: Trying 10.226.10.5:389
ldap_pvt_connect: fd: 6 tm: 5 async: 0
ldap_ndelay_on: 6
attempting to connect:
connect errno: 115
ldap_int_poll: fd: 6 tm: 5
ldap_is_sock_ready: 6
ldap_ndelay_off: 6
ldap_pvt_connect: 0
ldap_open_defconn: successful
ldap_send_server_request
ldap_result ld 0x55aee915ebc0 msgid 1
wait4msg ld 0x55aee915ebc0 msgid 1 (infinite timeout)
wait4msg continue ld 0x55aee915ebc0 msgid 1 all 1
** ld 0x55aee915ebc0 Connections:
- host: 10.226.10.5 port: 389 (default)
- from: IP=10.226.11.228:38924
refcnt: 2 status: Connected
last used: Thu Dec 14 16:29:20 2023
** ld 0x55aee915ebc0 Outstanding Requests:
- msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
ld 0x55aee915ebc0 request count 1 (abandoned 0)
** ld 0x55aee915ebc0 Response Queue:
Empty
ld 0x55aee915ebc0 response count 0
ldap_chkResponseList ld 0x55aee915ebc0 msgid 1 all 1
ldap_chkResponseList returns ld 0x55aee915ebc0 NULL
ldap_int_select
read1msg: ld 0x55aee915ebc0 msgid 1 all 1
ldap_find_request_by_msgid: msgid 1, lr 0x55aee91621f0 lr->lr_refcnt = 1
read1msg: ld 0x55aee915ebc0 msgid 1 message type bind
read1msg: ld 0x55aee915ebc0 0 new referrals
read1msg: mark request completed, ld 0x55aee915ebc0 msgid 1
request done: ld 0x55aee915ebc0 msgid 1
res_errno: 0, res_error: <>, res_matched: <>
ldap_return_request: lrx 0x55aee91621f0, lr 0x55aee91621f0
ldap_return_request: lrx->lr_msgid 1, lrx->lr_refcnt is now 0, lr is still present
ldap_free_request (origid 1, msgid 1)
ldap_free_request_int: lr 0x55aee91621f0 msgid 1 removed
ldap_do_free_request: asked to free lr 0x55aee91621f0 msgid 1 refcnt 0
ldap_parse_result
ldap_msgfree
ldap_err2string
Bind result: Success
Password:
Authenticate user EXT.MAHLAWAT.MAHESH:
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_send_server_request
ldap_result ld 0x55aee915ebc0 msgid 2
wait4msg ld 0x55aee915ebc0 msgid 2 (infinite timeout)
wait4msg continue ld 0x55aee915ebc0 msgid 2 all 1
** ld 0x55aee915ebc0 Connections: - host: 10.226.10.5 port: 389 (default)
- from: IP=10.226.11.228:38924
refcnt: 2 status: Connected
last used: Thu Dec 14 16:29:29 2023
** ld 0x55aee915ebc0 Outstanding Requests:
- msgid 2, origid 2, status InProgress
outstanding referrals 0, parent count 0
ld 0x55aee915ebc0 request count 1 (abandoned 0)
** ld 0x55aee915ebc0 Response Queue:
Empty
ld 0x55aee915ebc0 response count 0
ldap_chkResponseList ld 0x55aee915ebc0 msgid 2 all 1
ldap_chkResponseList returns ld 0x55aee915ebc0 NULL
ldap_int_select
read1msg: ld 0x55aee915ebc0 msgid 2 all 1
ldap_find_request_by_msgid: msgid 2, lr 0x55aee91611b0 lr->lr_refcnt = 1
read1msg: ld 0x55aee915ebc0 msgid 2 message type bind
read1msg: ld 0x55aee915ebc0 0 new referrals
read1msg: mark request completed, ld 0x55aee915ebc0 msgid 2
request done: ld 0x55aee915ebc0 msgid 2
res_errno: 49, res_error: <80090308: LdapErr: DSID-0C090449, comment: AcceptSecurityContext error, data 52e, v3839>, res_matched: <>
ldap_return_request: lrx 0x55aee91611b0, lr 0x55aee91611b0
ldap_return_request: lrx->lr_msgid 2, lrx->lr_refcnt is now 0, lr is still present
ldap_free_request (origid 2, msgid 2)
ldap_free_request_int: lr 0x55aee91611b0 msgid 2 removed
ldap_do_free_request: asked to free lr 0x55aee91611b0 msgid 2 refcnt 0
ldap_parse_result
ldap_msgfree
ldap_err2string
ldap_err2string
Error: LibreNMS\Exceptions\AuthenticationException thrown!
Invalid credentials
librenms@SERVER:~$ ./validate.php
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
Component | Version |
---|---|
LibreNMS | 23.11.0-29-g624eb5aa0 (2023-12-13T23:29:53+01:00) |
DB Schema | 2023_11_21_172239_increase_vminfo.vmwvmguestos_column_length (274) |
PHP | 8.1.2-1ubuntu2.14 |
Python | 3.10.12 |
Database | MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1 |
RRDTool | 1.7.2 |
SNMP | 5.9.1 |
=========================================== |
[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
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
PHP Warning: Module “ldap” is already loaded in Unknown on line 0
[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
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
LibreNMS/Authentication/LdapAuthorizer.php