Cain't log in my web gui with LDAP

./Validate.php :
./validate.php

Component Version
LibreNMS 25.2.0-11-g2cb8d9f04 (2025-02-24T22:25:44+01:00)
DB Schema 2025_01_30_000121_add_ifindex_index_to_ports_table (327)
PHP 8.3.17
Python 3.10.12
Database MariaDB 10.11.5-MariaDB-1:10.11.5+maria~ubu2204-log
RRDTool 1.7.2
SNMP 5.9.1
===========================================

[OK] Composer Version: 2.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database connection successful
[WARN] Your database schema has extra migrations (2025_01_20_125000_create_ospfv3_areas_table, 2025_01_20_125000_create_ospfv3_instances_table, 2025_01_20_125000_create_ospfv3_nbrs_table, 2025_01_20_125000_create_ospfv3_ports_table, 2025_01_30_214311_create_ipv6_nd_table, 2025_03_11_031114_drop_ospfv3ifinstid, 2025_03_17_144000_drop_ospfv3nbrifindex, 2025_03_22_134124_fix_ipv6_addresses_id_type, 2025_03_17_222255_rename_existing_permissions_tables, 2025_03_17_222652_create_permission_tables, 2025_03_17_222734_migrate_bouncer_to_spatie, 2025_03_18_003446_drop_bouncer_tables). If you just switched to the stable release from the daily release, your database is in between releases and this will be resolved with the next release.
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] MySQL and PHP time match
[OK] Distributed Polling setting is enabled globally
[OK] Connected to rrdcached
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[INFO] fping FAILURES can be ignored if running LibreNMS in a jail without ::1. You may want to test it manually: fping ::1
[FAIL] /usr/bin/fping6 could not be executed. /usr/bin/fping6 must have CAP_NET_RAW capability (getcap) or suid. Selinux exclusions may be required.
(/usr/bin/fping6: can’t create socket (must run as root?))
[FAIL] /usr/bin/fping6 should have CAP_NET_RAW!
[FIX]:
setcap cap_net_raw+ep /usr/bin/fping6
[OK] rrdtool version ok
[OK] Connected to rrdcached
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
html/.htaccess
html/ajax_dash.php
html/ajax_form.php
html/ajax_list.php
html/ajax_listports.php
html/ajax_ossuggest.php
html/ajax_output.php
html/ajax_table.php
html/api_v0.php
html/bandwidth-graph.php
html/billing-graph.php
html/calendar.jpg
html/css/L.Control.Locate.min.css
html/css/L.Control.Locate.min.css.map
html/css/MarkerCluster.Default.css
and 837 more…

librenms.log :

[2025-03-31T13:59:41][ERROR] SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.assigned_roles’ doesn’t exist (Connection: mysql, SQL: select name, roles.id, assigned_roles.entity_id as pivot_entity_id, assigned_roles.role_id as pivot_role_id, assigned_roles.entity_type as pivot_entity_type, assigned_roles.scope as pivot_scope from roles inner join assigned_roles on roles.id = assigned_roles.role_id where assigned_roles.entity_id = 5 and assigned_roles.entity_type = App\Models\User and (assigned_roles.scope is null) and (roles.scope is null)) {“userId”:2,“exception”:“[object] (Illuminate\Database\QueryException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.assigned_roles’ doesn’t exist (Connection: mysql, SQL: select name, roles.id, assigned_roles.entity_id as pivot_entity_id, assigned_roles.role_id as pivot_role_id, assigned_roles.entity_type as pivot_entity_type, assigned_roles.scope as pivot_scope from roles inner join assigned_roles on roles.id = assigned_roles.role_id where assigned_roles.entity_id = 5 and assigned_roles.entity_type = App\Models\User and (assigned_roles.scope is null) and (roles.scope is null)) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:829)
[previous exception] [object] (PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘librenms.assigned_roles’ doesn’t exist at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:423)”}
/opt/librenms/discovery.php new 2025-03-31 14:00:03 - 0 devices discovered in 0.023 secs

It is recommended to use AD method

Authentication Model

#$config[‘auth_mechanism’] = “mysql”; # default, other options: ldap, http-auth
#$config[‘http_auth_guest’] = “guest”; # remember to configure this user if you use http-auth

$config[‘auth_mechanism’] = ‘active_directory’;

Active Directory

$config[‘auth_ad_url’] = ‘ldap://servername.domainname.com’;
$config[‘auth_ad_domain’] = ‘domian’;
$config[‘auth_ad_base_dn’] = ‘DC=domain,DC=com,’;
$config[‘auth_ad_check_certificates’] = false;
#$config[‘auth_ad_options’][‘LDAP_OPT_REFERRALS’] = 0;

AD

$config[‘auth_ad_binduser’] = ‘[email protected]’;
$config[‘auth_ad_bindpassword’] = ‘password’;

AD

$config[‘auth_ad_require_groupmembership’] = true;
$config[‘auth_ad_groups’][‘LibreNMS_Admins’][‘level’] = 10; //This group needs to be created in AD
$config[‘auth_ad_groups’][‘LibreNMS_Users’][‘level’] = 5; //This group needs to be created in AD
$config[‘auth_ad_groupbase’] = ‘OU=XXXX,DC=domain,DC=com’;
$config[‘auth_ad_groupmemberattr’] = ‘member’;

LibreNMS AD

$config[‘auth_ad_recursive_groupsearch’] = true;
$config[‘auth_ad_debug’] = false;

File .env also needs to be edited
Note that users in AD must be divided into groups according to permissions

Hello, unfortunately I can not it will take weeks the time of application, its acceptance of its implementation in my company even for a thing so simple I grant you. Until now it worked well ldap

1 Like

Problem resolved with:
git stash
git pull
git stash pop

./scripts/composer_wrapper.php install -no-dev
./daily.sh
./validate.sh

and very important:
sudo setfacl -R -m g:www-data:rx/opt/librenms/html
without it the web gui is not breaking logo, no css and js

1 Like