About Zabbix
Zabbix is a free and open source network monitoring Software tool which is used to monitor and track the availability and performance of your IT infrastracture: servers, network devices and other IT assets.
If you forgot the Zabbix Admin password and you don’t have any other Admin account to login to the Zabbix Frontend. In this article we are going to demonstrate how to reset the Zabbix Admin password without GUI Access on the database level.
Check our previous tutorials to learn how to install Zabbix Server:
- How To Install Zabbix 3.4 Monitoring Server On Ubuntu 16.04 LTS
- How To Install Zabbix 3.4 Server On CentOS 7 / RHEL 7
- How to install Zabbix Agent on Ubuntu 16.04 LTS
- How to install Zabbix Agent on CentOS 7 / RHEL 7
MySQL/ MariaDB Database
If you installed Zabbix Server using MySQL or MariaDB you can easily use the following instructions :
– Logon to the MySQL or MariaDB database as below:
root@ylplzbx01:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g.
– Connect to the zabbix database
mysql> use YOUR_ZABBIX_DATABASE Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed
– Change the password of the Admin Zabbix user to your new password:
mysql> update users set passwd=md5('YOUR_NEW_PASSWORD') where alias='Admin'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0
– Logout from MySQL or MariaDB using the following command:
mysql> exit Bye root@ylplzbx01:~#
Postgresql Database
Use the following instructions if you installed Zabbix Server with postgreSQL database:
– Logon to the postgreSQL as below:
root@ylplzbx01:~# sudo -u postgres psql
– Connect to the zabbix database
\c YOUR_ZABBIX_DATABASE
– Change the password of the Admin Zabbix user with a your new password:
update users set passwd=md5('YOUR_NEW_PASSWORD') where alias='Admin';
– Finally logout from postgreSQL using the following command
\q
We hope this tutorial was enough Helpful. If you need more information, or have any questions, just comment below and we will be glad to assist you!
1 comment
Hi,
As from Zabbix 5.0 md5 is not used anymore, this solution is not working.
In plus on Zabbix 6.2, the “alias” database field is called “surname”
For those with Zabbix >= 5.0 please use the following MySQL command:
UPDATE zabbix.users AS a INNER JOIN zabbix.users AS b ON b.username=’guest’ SET a.passwd = b.passwd;
This will set the Admin password same as Guest (without password)