Reconfigure Icingaweb2

Hi.

The linked guide, to change the password directly in MySQL, should work.
Except problems that may occur depending on missing quotes.

( I tried this already yesterday but thought it is unnecessary to post it)

Example execution
mysql> use icingaweb2;

mysql> select * from icingaweb_user where name = 'my_damaged_account';

Example output:
+--------------------+--------+--------------------------------------------------------------+---------------------+-------+
| name               | active | password_hash                                                | ctime               | mtime |
+--------------------+--------+--------------------------------------------------------------+---------------------+-------+
| my_damaged_account |      1 | $2y$10$Vh2YlqZoXwCRc6BhiV9I9uCHF9AE9gIDaLUQmCiBkNXvvqrMRiGY. | 2020-06-25 13:52:24 | NULL  |
+--------------------+--------+--------------------------------------------------------------+---------------------+-------+

# in a shell: please try to avoid special characters for testing purposes
openssl passwd -1 -salt 10 i_want_this_as_password
Output:
$1$10$dICVmz55eGloV8kHzSm9x.

# Back in mysql:
# maybe again: mysql> use icingaweb2;
# Important: Please note the quotes:
mysql> UPDATE icingaweb_user SET password_hash='$1$10$dICVmz55eGloV8kHzSm9x.' WHERE name = 'my_damaged_account';

mysql> select * from icingaweb_user where name = 'my_damaged_account';
+--------------------+--------+------------------------------+---------------------+---------------------+
| name               | active | password_hash                | ctime               | mtime               |
+--------------------+--------+------------------------------+---------------------+---------------------+
| my_damaged_account |      1 | $1$10$dICVmz55eGloV8kHzSm9x. | 2020-06-25 13:52:24 | 2020-06-25 14:01:24 |
+--------------------+--------+------------------------------+---------------------+---------------------+
1 row in set (0.00 sec)
# The password_hash has to be the same as in the output of the openssl-command.

As result, I was able to log in with:
Username: my_damaged_account
Password: i_want_this_as_password

If this still does not work:

  • Are there any error-messages when you execute any of the commands?
  • Are you maybe running the commands at the wrong SQL-Host? (Sorry, but this may happen, especially if you run multiple Icinga2 instances)
  • Are you maybe calling the wrong Icingaweb2 GUI? (Sorry, this may happen for the same reasons)

Greetings.

5 Likes