This is an article where the main purpose is to show how to change the password of an administrator role for accessing Zabbix management page as specified in the title of this article. The steps for accomplishing that purpose is by doing sequences of command follows :
1. Basically, just access the database which is responsible for storing data related with zabbix. In the context of this article, it is MySQL Database Server since zabbix is using it as the database engine. For accessing MySQL Database Server via command, the article in this link which has the title of ‘MySQL Database Access from Command Line in Linux’ that can be a help.
- Select the database which is used by zabbix. It can be done by executing the following command :
use mysql_database_name
3.After that, just select the table named ‘users’.
mysql> select * from users; +--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+ | userid | alias | name | surname | passwd | url | autologin | autologout | lang | refresh | type | theme | attempt_failed | attempt_ip | attempt_clock | rows_per_page | +--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+ | 1 | Admin | Zabbix | Administrator | 5fce1b3e34b520afeffb37ce08c7cd66 | | 1 | 0 | en_GB | 30 | 3 | default | 0 | | 0 | 50 | | 2 | guest | | | d41d8cd98f00b204e9800998ecf8427e | | 0 | 900 | en_GB | 30 | 1 | default | 0 | | 0 | 50 | +--------+-------+--------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+------------+---------------+---------------+ 2 rows in set (0,00 sec)
- Update the password of the user named ‘Zabbix’ using the following query syntax :
mysql> update users set passwd='' where name='Zabbix'; Query OK, 1 row affected (0,01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql>
The following is an example of the query execution for changing the admin user of zabbix utility which is utilized to access the zabbix management page.
mysql> update users set passwd=md5('password') where alias='Admin'; Query OK, 1 row affected (0,01 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql>
The following command can also work for changing the password or to completely change the password.
mysql> update users set passwd=md5('password') where name='Zabbix'; Query OK, 0 rows affected (0,13 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql>
In the above command output either using ‘Admin’ or ‘Zabbix’ can be used to change or to reset the password.
After changing and trying to reset the password, just use it to access the Zabbix management page as shown below :
1. Access the default Zabbix management page. In the context of this article, it is provided by accessing the URL of http://localhost/zabbix which is shown in the following image :
2. Input the username and the password which has been changed in the previous step. Remember to use the ‘alias’ not the ‘name’ of the account. Although the ‘name’ is ‘Zabbix’ but it doesn’t represent the account used to login to the page. Use ‘Admin’ as shown below :
- Click the Sign in button where the login process will be succeed as shown in the following output :