How to reset Zabbix password (one-step)

How to reset Zabbix password (one-step)

Problem Description

Since we don't log in to Zabbix by typing the account password for a long time, it is easy to forget the admin password. The password of the zabbix user is encrypted and stored by md5. We can reset the new password directly in the database by converting the corresponding md5.

Workaround

1. Connect to the database

[zhuxiaoshuai@zabbix-server ~]# mysql -uroot -pzhuxiaoshuai!@# # -u is the username, -p is followed by the password


2. After entering the MySQL database, query the users table

MariaDB [mysql]> use zabbix;
MariaDB [zabbix]> show tables;
MariaDB [zabbix]> select * from users;
MariaDB [zabbix]> select userid,alias,passwd from users;

3. Generate a new MD5 admin password through Linux

[zhuxiaoshuai@zabbix-server ~]# echo -n zhuxiaoshuai | openssl md5
(stdin) = cce78f045146e7dbb2c7d0df900dcfb3

4. Update the update table data, the user with userid=1 (that is, the admin user)

MariaDB [zabbix]> update users set passwd='cce78f045146e7dbb2c7d0df900dcfb3' where userid = '1';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

5. Refresh and reload the permission table

MariaDB [zabbix]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.03 sec)

Summarize

The above is the method I introduced to you to reset the Zabbix password (in one step). I hope it will be helpful to you!

You may also be interested in:
  • About Zabbix forget admin login password reset password

<<:  Detailed explanation of the getBoundingClientRect() method in js

>>:  Analysis of mysql temporary table usage [query results can be stored in temporary tables]

Recommend

Vue.js performance optimization N tips (worth collecting)

Table of contents Functionalcomponents Childcompo...

The difference between div and span in HTML (commonalities and differences)

Common points: The DIV tag and SPAN tag treat som...

Comprehensive summary of Vue3.0's various listening methods

Table of contents Listener 1.watchEffect 2.watch ...

Docker installation rocketMQ tutorial (most detailed)

RocketMQ is a distributed, queue-based messaging ...

Vant+postcss-pxtorem implements browser adaptation function

Rem layout adaptation The styles in Vant use px a...

Linux bridge method steps to bridge two VirtualBox virtual networks

This article originated from my complaints about ...

Differences between proxy_pass in two modules in nginx

1. The proxy_pass directive of the 1.ngx_stream_p...

Manjaro installation CUDA implementation tutorial analysis

At the end of last year, I replaced the opensuse ...

JavaScript quickly implements calendar effects

This article example shares the specific code of ...

Use xshell to connect to the Linux server

Benefits of using xshell to connect to Linux We c...

Detailed explanation of how to monitor MySQL statements

Quick Reading Why do we need to monitor SQL state...

How to handle MySQL numeric type overflow

Now, let me ask you a question. What happens when...