3

How can i reset the password for the user admin with MySQL or a Observium script.

MariaDB [observium]> select * from users;
+---------+----------+------------------------------------+----------+-------+-------+-------+-------------------+--------------+
| user_id | username | password                           | realname | email | descr | level | can_modify_passwd | user_options |
+---------+----------+------------------------------------+----------+-------+-------+-------+-------------------+--------------+
|       1 | admin    | $1$abcdefgh$jklmnopqrstuvwxyzabcd. |          |       |       |    10 |                 1 | NULL         |
+---------+----------+------------------------------------+----------+-------+-------+-------+-------------------+--------------+
1 row in set (0.00 sec)
FaxMax
  • 175

2 Answers2

3

this might help someone. as it just worked for me as long as you have root access to the server

cd /opt/observium
./adduser.php admin <CLASS_PASSWORD> 10

once the new user with the same level of permission is active you can then update the other users password

3

Look like it MD5 (1) hash with salt (abcdefgh).

openssl passwd -1 build new hash from plain password

You can use it to update users table.

You can try build Mysql-only solution based on https://stackoverflow.com/questions/5903702/md5-and-salt-in-mysql

But salt must be cryptographic quality random for secyrity.

UPD.

Blackbox Hacking solution. Copy password field from other user with known password, event from different instance of observium. It work 99%

mmv-ru
  • 724