切换 zabbix 认证模式

以 zabbix 配置了 openLDAP 认证,现在想切换为默认的认证方式为例。

登陆数据库查看当前认证方式

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# mysql -u root -p
MariaDB [(none)]> use zabbix;
Database changed
MariaDB [zabbix]> show tables like 'config';
+---------------------------+
| Tables_in_zabbix (config) |
+---------------------------+
| config |
+---------------------------+
1 row in set (0.01 sec)
MariaDB [zabbix]> select authentication_type from config ;
+---------------------+
| authentication_type |
+---------------------+
| 1 |
+---------------------+
1 row in set (0.00 sec)

0 代表Internal,1 代表LDAP,2 代表HTTP。

更改认证方式为默认认证方式

1
2
3
4
5
6
MariaDB [zabbix]> update config set authentication_type=0;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB [zabbix]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

更新 Admin 密码(如需要)

1
2
3
4
5
6
7
8
9
10
# 查询Admin用户的ID
MariaDB [zabbix]> select * from users;

# 更新Admin密码
MariaDB [zabbix]> update users set passwd=md5("zabbix") where userid='1';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB [zabbix]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
ZhiJian wechat
欢迎您扫一扫上面的二维码,订阅我的微信公众号!
-------------本文结束,感谢您的阅读-------------