Install LibreNMS v24.4.0 success but don't have user to access web_portal

librenms@s-ohg-nms01:~$ ./validate.php

Component Version
LibreNMS 24.4.1-4-gb0c03b29a (2024-04-23T14:57:19+07:00)
DB Schema 2024_04_10_093513_remove_device_perf (291)
PHP 8.2.18
Python 3.11.2
Database MariaDB 10.11.6-MariaDB-0+deb12u1
RRDTool 1.7.2
SNMP 5.9.3
===========================================

[OK] Composer Version: 2.7.4
[OK] Dependencies up-to-date.
[WARN] You have no devices.
[FIX]:
Consider adding a device such as localhost: /addhost
[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
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
config/database.php

lnms user:add --password=admin --role=admin admin
The selected role.0 is invalid.

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm

● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; preset: enabled)
Active: active (running) since Wed 2024-04-24 15:34:27 +07; 1h 53min ago
Docs: man:nginx(8)
Process: 25961 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 25964 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 25968 (nginx)
Tasks: 5 (limit: 4915)
Memory: 3.7M
CPU: 135ms
CGroup: /system.slice/nginx.service
├─25968 “nginx: master process /usr/sbin/nginx -g daemon on; master_process on;”
├─25969 “nginx: worker process”
├─25970 “nginx: worker process”
├─25971 “nginx: worker process”
└─25972 “nginx: worker process”

● php8.2-fpm.service - The PHP 8.2 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php8.2-fpm.service; enabled; preset: enabled)
Active: active (running) since Wed 2024-04-24 15:34:32 +07; 1h 53min ago
Docs: man:php-fpm8.2(8)
Process: 25986 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/8.2/fpm/pool.d/www.conf 82 (code=exited, status=0/SUCCESS)
Main PID: 25981 (php-fpm8.2)
Status: “Processes active: 0, idle: 4, Requests: 23, slow: 0, Traffic: 0req/sec”
Tasks: 5 (limit: 4915)
Memory: 37.5M
CPU: 2.411s
CGroup: /system.slice/php8.2-fpm.service
├─25981 “php-fpm: master process (/etc/php/8.2/fpm/php-fpm.conf)”
├─25982 “php-fpm: pool librenms”
├─25983 “php-fpm: pool librenms”
├─25984 “php-fpm: pool www”
└─25985 “php-fpm: pool www”

I was follow all step in there until show this

but I can’t access

lnms user:add --password=admin --role=admin myadmin

(perhaps the ‘admin’ user already exists…)

You could look in the database?

MariaDB [librenms]> select * from users;

MariaDB [(none)]> use librenms;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [librenms]> select * from users;
Empty set (0.000 sec)

MariaDB [librenms]>

empty in there

perhaps try move config.php to config.php.old and then hit the install URL /install again and see if it will finish the setup for you …

Did you modify the file that says ‘do no modify this file?’

[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:
You can fix this with ./scripts/github-remove
Modified Files:
config/database.php

you could run ./scripts/github-remove and then try again …

you don’t need to run the lnms user:add command typically it is created by the web installer …

librenms@s-ohg-nms01:~$ ls -al | grep config
drwxr-xr-x 4 librenms librenms 4096 Apr 24 16:24 .config
drwxr-xr-x 2 librenms librenms 4096 Apr 24 17:09 config
-rw-r–r-- 1 librenms librenms 1702 Apr 24 14:08 config.php.default
-rwxr-xr-x 1 librenms librenms 368 Apr 24 14:08 config_to_json.php
-rw-r–r-- 1 librenms librenms 256 Apr 24 14:08 .editorconfig
-rw-r–r-- 1 librenms librenms 776 Apr 24 14:08 tailwind.config.js

no config.php in there

after run ./scripts/github-remove -s
config/database.php reset as default and portal back to this state


I just found solution from the community show I need config in .env as below

DB_HOST=localhost
DB_DATABASE=librenms
DB_USERNAME=librenms
DB_PASSWORD=MyPass2024

INSTALL=true

Now I can access portal, thank