码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix3.0监控--修改管理员(Admin)密码

时间:2016-09-23 21:55:02      阅读:2473      评论:0      收藏:0      [点我收藏+]

标签:linux系统运维 自动化运维 zabbix监控 服务器

zabbix3.0监控--修改管理员(Admin)密码

1、进入zabbix数据库中

root@zabbix-server:~# mysql -uroot -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 4646

Server version: 5.5.50-0ubuntu0.14.04.1 (Ubuntu)

 

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

 

mysql> use zabbix;

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

2、查看users

mysql> desc users;

+----------------+---------------------+------+-----+---------+-------+

| Field          | Type                | Null | Key | Default | Extra |

+----------------+---------------------+------+-----+---------+-------+

| userid         | bigint(20) unsigned | NO   | PRI | NULL    ||

| alias          | varchar(100)        | NO| UNI |         |       |

| name           | varchar(100)        | NO|     |         ||

| surname        | varchar(100)        | NO|     |         ||

| passwd         | char(32)            | NO   ||         |       |

| url            | varchar(255)        | NO|     |         ||

| autologin      | int(11)             | NO   || 0       |       |

| autologout     | int(11)             | NO   || 900     |       |

| lang           | varchar(5)          | NO|     | en_GB   ||

| refresh        | int(11)             | NO   || 30      |       |

| type           | int(11)             | NO   || 1       |       |

| theme          | varchar(128)        | NO|     | default |       |

| attempt_failed | int(11)             | NO   || 0       |       |

| attempt_ip     | varchar(39)         | NO|     |         ||

| attempt_clock  | int(11)             | NO   || 0       |       |

| rows_per_page  | int(11)             | NO   || 50      |       |

+----------------+---------------------+------+-----+---------+-------+

16 rows in set (0.00 sec)

 

mysql> select userid,name,passwd from users;

+--------+--------+----------------------------------+

| userid | name   | passwd                           |

+--------+--------+----------------------------------+

|      1 | Zabbix | 3a57eccc286881c27531d5bdd48c2a25 |

|      2 || d41d8cd98f00b204e9800998ecf8427e |

+--------+--------+----------------------------------+

2 rows in set (0.00 sec)

3、修改Admin密码

mysql> select userid,alias,passwd from users;

+--------+-------+----------------------------------+

| userid | alias | passwd                           |

+--------+-------+----------------------------------+

|      1 | Admin | 3a57eccc286881c27531d5bdd48c2a25 |

|      2 | guest | d41d8cd98f00b204e9800998ecf8427e |

+--------+-------+----------------------------------+

2 rows in set (0.00 sec)

 

mysql> update users set passwd=MD5(‘solin‘) where userid=1;

Query OK, 1 row affected (0.00 sec)

Rows matched: 1  Changed: 1  Warnings: 0

 

mysql> select userid,alias,passwd from users;

+--------+-------+----------------------------------+

| userid | alias | passwd                           |

+--------+-------+----------------------------------+

|      1 | Admin | 6d3b365884aa3ff4107b6995e580de1b |

|      2 | guest | d41d8cd98f00b204e9800998ecf8427e |

+--------+-------+----------------------------------+

2 rows in set (0.00 sec)

 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

 

mysql> \q

Bye

4、登陆测试

 

技术分享


本文出自 “运维小当家” 博客,请务必保留此出处http://solin.blog.51cto.com/11319413/1855824

zabbix3.0监控--修改管理员(Admin)密码

标签:linux系统运维 自动化运维 zabbix监控 服务器

原文地址:http://solin.blog.51cto.com/11319413/1855824

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!