1

I am using ubuntu 16.04 and mysql DB ,i configured DB for icinga2 server and i created separate user in database. somedays back i deleted that user from db now i am not able access icingaweb2 UI, Getting below error while trying to access to the link. All configured authentication methods failed. Please check the system log or Icinga Web 2 log for more information.

I followed the below link to install icinga2 server

Please Help.

Roshan
  • 905
  • 9
  • 21
RCP
  • 374
  • 1
  • 5
  • 19

2 Answers2

3

I resolved the issue by re-creatinging a setup token in in the Icinga Web 2 by using bellow command

sudo icingacli setup token create i got some error's while creating setup token and it is easily resolved by using [1]: https://monitoring-portal.org/index.php?thread/40111-icingacli-does-not-work/

RCP
  • 374
  • 1
  • 5
  • 19
0

If you still have access to the MySQL DB you should do a backup first of your icinga2 DB.

mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

Then purge MySQL or follow the guide on how to reset your root password

After you have access to the DB again if you purged MySQL use this to bring your data back in.

mysqldump -u [username] -p [password] [databasename] < [backupfile.sql]

If you only lost your password to IcingaWeb2 or now have access to MySQL then create a MD5 based BSD password algorithm:

openssl passwd -1 "password"

Note: The switch to openssl passwd is the number one (-1) for using the MD5 based BSD password algorithm.

Insert the user into the database using the generated password hash:

```` INSERT INTO icingaweb_user (name, active, password_hash) VALUES ('icingaadmin', 1, 'hash from openssl');

Source

cflinspach
  • 290
  • 1
  • 4
  • 16