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

How to add fields and comments to a table in sql

1. Add fields: alter table table name ADD field n...

Recommended tips for web front-end engineers

Let's first talk about the value of web front...

Ideas and codes for implementing Vuex data persistence

What is vuex vuex: is a state manager developed s...

React uses routing to redirect to the login interface

In the previous article, after configuring the we...

Installation and use tutorial of Elasticsearch tool cerebro

Cerebro is an evolution of the Elasticsearch Kopf...

Comparison of the advantages of vue3 and vue2

Table of contents Advantage 1: Optimization of di...

Analysis of the principle and usage of MySQL continuous aggregation

This article uses examples to illustrate the prin...

Practical TypeScript tips you may not know

Table of contents Preface Function Overloading Ma...

Use three.js to achieve cool acid style 3D page effects

This article mainly introduces how to use the Rea...

jQuery plugin to implement stacked menu

A jQuery plugin every day - stacked menu, for you...

Project practice of deploying Docker containers using Portainer

Table of contents 1. Background 2. Operation step...

Detailed explanation of grep and egrep commands in Linux

rep / egrep Syntax: grep [-cinvABC] 'word'...