Reconfigure Icingaweb2

Now, of course, the question is where I screwed that up. So I looked it up and there it is:

mysql> show variables like ‘char%’;
±-------------------------±---------------------------+
| Variable_name | Value |
±-------------------------±---------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | latin1 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | latin1 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
±-------------------------±---------------------------+
8 rows in set (0.00 sec)

I was wondering about the Putty character set (if you are using Putty):
image

I’m using MobaXterm. Charset is UTF-8 (Unicode).

:+1:

Then I’m out, as my DB knowledge is too limited to be of more help here :slight_smile:

The charset/encoding shouldn’t matter. A proper hash only includes ASCII chars. Though this depends on how it is generated.

Please try what’s in the official documentation regarding manual user creation.

This should generate a hash like this:

$2y$10$CP/RBu7SIzhWCMeqxmGa8.9HttKMDiHMW4/CdW0dreidNJJ.Bzliq

If it still doesn’t work, have you already taken a look into the log? (/var/log/icingaweb2/icingaweb2.log) Maybe there’s an error regarding the authentication backend?

2 Likes

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

This is it! Thank you so much!