Add a new Admin User

Good day.

I see from other posts on how to reset the admin password the solution is to create new user. To do this a ./adduser.php command is mentioned.

I can’t find such a command on my system - did I miss a step?

FWIW I have recently re-built the system and also having other issues - specifically relating to the APP_KEY. I asked about that in a separate thread.

Thank you

-bash-4.2$ ./validate.php 
Component | Version
--------- | -------
LibreNMS  | 23.6.0-17-ge486ef4 (2023-07-03T12:08:58+02:00)
DB Schema | 2023_05_12_071412_devices_expand_timetaken_doubles (252)
PHP       | 8.1.20
Python    | 3.6.8
Database  | MySQL 5.7.42
RRDTool   | 1.4.8
SNMP      | 5.7.2

[OK]    Composer Version: 2.5.8
[OK]    Dependencies up-to-date.
[FAIL]  APP_KEY does not match key used to encrypt data. APP_KEY must be the same on all nodes.
        If you rotated APP_KEY, run lnms key:rotate to resolve.
[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
You have new mail in /var/spool/mail/librenms

Not sure about in cli, but in the LibreNMS web ui there is a page for adding users. Gear menu, Manage users.

login to cli, switch to librenms user and create new admin account with below command

lnms user:add -p yournewpassword -r admin yournewusername

Thank you.

Since I could not wait for your answer what I had done is I copied the hased password from a user for who I do know the password to an admin user.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.