阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

Zabbix登陆账户admin密码修改

201次阅读
没有评论

共计 5321 个字符,预计需要花费 14 分钟才能阅读完成。

Zabbix 登陆账户 admin 密码修改

一、正常更改用户密码

管理 - 用户 - 右侧选择“用户”- 点击列表里的 Admin- 点击修改密码 - 输入新密码后点击存档

Zabbix 登陆账户 admin 密码修改

Zabbix 登陆账户 admin 密码修改

Zabbix 登陆账户 admin 密码修改

二、忘记密码,重置密码

如果忘记了 zabbix 的登陆账户 admin 密码,可以通过以下方式找回

[root@localhost ~]# mysql -uroot -p      #登陆数据库
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
mysql> show databases;                  #查询当前所有的库
+——————–+
| Database          |
+——————–+
| information_schema |
| mysql              |
| performance_schema |
| zabbix            |
+——————–+
4 rows in set (0.02 sec)
 
mysql> use zabbix;                  #进入 zabbix 数据库
Database changed
mysql> show tables;                #再查看一下里面有很多张表,admin 密码放在 users 表里面。
+———————–+
| Tables_in_zabbix      |
+———————–+
| acknowledges          |
| actions              |
| alerts                |
| application_template  |
| applications          |
| auditlog              |
| auditlog_details      |
| autoreg_host          |
| conditions            |
| config                |
| dbversion            |
| dchecks              |
| dhosts                |
| drules                |
| dservices            |
| escalations          |
| events                |
| expressions          |
| functions            |
| globalmacro          |
| globalvars            |
| graph_discovery      |
| graph_theme          |
| graphs                |
| graphs_items          |
| group_discovery      |
| group_prototype      |
| groups                |
| history              |
| history_log          |
| history_str          |
| history_str_sync      |
| history_sync          |
| history_text          |
| history_uint          |
| history_uint_sync    |
| host_discovery        |
| host_inventory        |
| hostmacro            |
| hosts                |
| hosts_groups          |
| hosts_templates      |
| housekeeper          |
| httpstep              |
| httpstepitem          |
| httptest              |
| httptestitem          |
| icon_map              |
| icon_mapping          |
| ids                  |
| images                |
| interface            |
| interface_discovery  |
| item_discovery        |
| items                |
| items_applications    |
| maintenances          |
| maintenances_groups  |
| maintenances_hosts    |
| maintenances_windows  |
| mappings              |
| media                |
| media_type            |
| node_cksum            |
| nodes                |
| opcommand            |
| opcommand_grp        |
| opcommand_hst        |
| opconditions          |
| operations            |
| opgroup              |
| opmessage            |
| opmessage_grp        |
| opmessage_usr        |
| optemplate            |
| profiles              |
| proxy_autoreg_host    |
| proxy_dhistory        |
| proxy_history        |
| regexps              |
| rights                |
| screens              |
| screens_items        |
| scripts              |
| service_alarms        |
| services              |
| services_links        |
| services_times        |
| sessions              |
| slides                |
| slideshows            |
| sysmap_element_url    |
| sysmap_url            |
| sysmaps              |
| sysmaps_elements      |
| sysmaps_link_triggers |
| sysmaps_links        |
| timeperiods          |
| trends                |
| trends_uint          |
| trigger_depends      |
| trigger_discovery    |
| triggers              |
| user_history          |
| users                |                  #users 表
| users_groups          |
| usrgrp                |
| valuemaps            |
+———————–+
108 rows in set (0.00 sec)
 
mysql> select * from users;      # 查看表里的字段,admin 对应的 ID 是 1
+——–+——-+——–+—————+———————————-+—–+———–+————+——-+———+——+———+—————-+————+—————+—————+
| 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 | zh_CN |      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)
 
mysql> select userid,passwd from users;
+——–+———————————-+
| userid | passwd                          |
+——–+———————————-+
|      1 | 5fce1b3e34b520afeffb37ce08c7cd66 |      #密码是加密的 
|      2 | d41d8cd98f00b204e9800998ecf8427e |
+——–+———————————-+
2 rows in set (0.00 sec)
 
mysql>

重新开个终端,生成一个 MD5 加密的密码,这里密码设置的是 RedHat
[root@localhost ~]# echo -n redhat|openssl md5    #- n 就表示不输入回车符,不加 -n,否则就不是这个结果了。
(stdin)= e2798af12a7a0f4f70b4d69efbc25f4d
[root@localhost ~]#

接着上面的为 admin 用户设定一个密码

mysql> update users set passwd=’e2798af12a7a0f4f70b4d69efbc25f4d’ where userid = ‘1’;
      #或者直接使用 update  users set passwd=md5(“redhat”) where userid=’1′;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0
 
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
 
mysql> quit
Bye
[root@localhost ~]#

��新页面使用 admin  redhat 登陆即可。

一些 Zabbix 相关教程集合

Ubuntu 14.04 下 Zabbix2.4.5 源码编译安装  http://www.linuxidc.com/Linux/2015-05/117657.htm

CentOS 7 LNMP 环境搭建 Zabbix3.0  http://www.linuxidc.com/Linux/2017-02/140134.htm

Ubuntu 16.04 安装部署监控系统 Zabbix2.4  http://www.linuxidc.com/Linux/2017-03/141436.htm

Zabbix 监控安装部署及警报配置  http://www.linuxidc.com/Linux/2017-03/141611.htm

Zabbix 触发器表达式详解 http://www.linuxidc.com/Linux/2017-03/141921.htm

Ubuntu 16.04 下安装部署 Zabbix3.0  http://www.linuxidc.com/Linux/2017-02/140395.htm

CentOS 6.3 下 Zabbix 监控 apache server-status http://www.linuxidc.com/Linux/2013-05/84740.htm

CentOS 7 下 Zabbix 3.0 安装详解 http://www.linuxidc.com/Linux/2017-03/141716.htm

64 位 CentOS 6.2 下安装 Zabbix 2.0.6   http://www.linuxidc.com/Linux/2014-11/109541.htm

ZABBIX 的详细介绍:请点这里
ZABBIX 的下载地址:请点这里

本文永久更新链接地址:http://www.linuxidc.com/Linux/2017-05/143843.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计5321字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中