The default user in Icinga's user interface (called Icingaweb2) is called "icingaweb" and the default password of it is set to "icingaweb". After the initial Icingaweb2 setup the password for this user is usually (and hopefully!!!) changed.
There might be a situation where you forgot the new password. With access to the backend database (which is in most cases a MySQL or MariaDB database) this can easily be changed on the command line.
First connect to the backend database with the mysql cli, select the database used for icingaweb2, then get the users from the icingaweb_user table:
root@icinga:~# mysql
mysql> use icingaweb;
mysql> select * from icingaweb_user;
+-------------+--------+------------------------------------------------------------------------+-------+---------------------+
| name | active | password_hash | ctime | mtime |
+-------------+--------+------------------------------------------------------------------------+-------+---------------------+
| icingaadmin | 1 | 0x243124664730666D314559244B356 | NULL | 2025-01-20 18:23:21 |
+-------------+--------+------------------------------------------------------------------------+-------+---------------------+
1 row in set (0.00 sec)
Note: I have cut the password_hash value for nicer diplay here on the blog.
You can use the openssl command to create a new hash for a new password (mysecret):
root@icinga:~# openssl passwd -1 "mysecret"
$1$ES9tyiJa$05GUb.pwvkNuFcnlXBsvi.
You can now use the following UPDATE query to change the password of the icingaadmin user:
mysql> UPDATE icingaweb_user SET password_hash = "$1$ES9tyiJa$05GUb.pwvkNuFcnlXBsvi." WHERE name = "icingaadmin";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
The password_hash should now be changed:
mysql> select * from icingaweb_user;
+-------------+--------+------------------------------------------------------------------------+-------+---------------------+
| name | active | password_hash | ctime | mtime |
+-------------+--------+------------------------------------------------------------------------+-------+---------------------+
| icingaadmin | 1 | 0x2431244553397479694A612430354 | NULL | 2025-01-21 01:08:59 |
+-------------+--------+------------------------------------------------------------------------+-------+---------------------+
1 row in set (0.01 sec)
Note: I have cut the password_hash value for nicer diplay here on the blog.
And you can use the new password (mysecret) for logging into Icingaweb2.
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Observability Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder