记self-service-password修改AD域账号密码的问题

司寇烨伟
2023-12-01

一、搭建问题不详细描述,可参考

官方文档:https://self-service-password.readthedocs.io/en/latest/installation.html

CSDN大佬的文章:https://blog.csdn.net/qq461391728/article/details/115867721?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522162848744116780265427748%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=162848744116780265427748&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-115867721.pc_search_result_control_group&utm_term=self+service+password+%E5%9F%9F%E8%B4%A6%E5%8F%B7&spm=1018.2226.3001.4187

二、问题1:连接不到LDAP服务器。

      1、网上多数文档涉及的是LDAP的修改,用SSP修改AD域密码必须通过LDAPS的方式去修改。

      2、在配置AD验证账号的时候,需要写全,因为习惯问题漏掉了cn=users浪费了不少时间,也可以直接用"administrator@test.com"

$ldap_binddn = "cn=administrator,cn=users,dc=test,dc=com";

     3、证书,LDAPS连接需要配置域控服务器证书,可以在域控服务器上配置CA证书导出,导出步骤不做描述,导出的文件必须含有服务器验证。

三、问题2:密码被LDAP服务器拒绝。

        网上多数是因为修改密码权限的问题,我的问题就比较奇葩,我设置的密码被LDAP拒绝的原因是设置的新密码没有符合AD本身的密码规则,但是符合了ssp本地的密码策略,导致页面本身没有密码格式报错,只提示密码被LDAP服务器拒绝。

# Who changes the password?
# Also applicable for question/answer save
# user: the user itself
# manager: the above binddn
$who_change_password = "manager";

查看报错信息之后,才明白过来。

[Wed Aug 11 10:15:10.814851 2021] [php7:warn] [pid 8552] [client 10.101.8.238:62554] PHP Warning:  ldap_mod_replace(): Modify: Server is unwilling to perform in /usr/share/self-service-password/lib/functions.inc.php on line 499, referer: http://10.101.6.103/index.php
[Wed Aug 11 10:15:10.814890 2021] [php7:notice] [pid 8552] [client 10.101.8.238:62554] LDAP - Modify password error 53 (Server is unwilling to perform), referer: http://10.101.6.103/index.php

 类似资料: