zabbix 取消使用ldap登录命令行版

/ 监控MonitorLinux服务安装搭建 / 没有评论 / 580浏览

思路

更改认证类型为Internal,然后使用Admin登陆

如果忘记密码,也可以重置Admin密码

更改认证类型为Internal

登录数据库

mysql -u root -p

mysql> use zabbix;
mysql> update config set authentication_type=0;
mysql> flush privileges;

其中,认证类型由 **authentication_type,**字段决定,值可以为0,1和2。0 代表Internal,1代表

LDAP,2代表HTTP

mysql> update config set authentication_type=0;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

修改Admin密码

#查询Admin用户的ID:
mysql> select * from users;
+--------+-------------+-------------+---------------+----------------------------------+-----+-----------+------------+-------+---------+------+---------+----------------+----------------+---------------+---------------+
| 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 |              4 | 192.168.100.34 |    1383812925 |            50 |
#更新Admin密码
mysql> update users set passwd='zabbix' where userid=1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

更改LDAP主机或者BIND DN

mysql> update config set ldap_host='xxx.xxx.xxx.xxx' ldap_base_dn='cn=ldap_search,ou=example,dc=com' ldap_bind_password='passwd';