0
執行下面是我的代碼,但得到一個錯誤:
PHP Warning: ldap_mod_replace(): Modify: Server is unwilling to perform in
PHP的警告:ldap_mod_replace():修改:服務器是不願意在
下面是代碼:
$ip = "10.60.0.12";
$ldaps_url = "ldaps://$ip";
$port = 636;
$ad = ldap_connect($ldaps_url, $port)
$ad->set_option(LDAP_OPT_PROTOCOL_VERSION, 3);
$ad->set_option(LDAP_OPT_REFERRALS, 0);
$b = $ad->bind($config['ad']['binddn'], $config['ad']['bindpassword']);
$newPassword = "fssfgds^^&&";
$userdata["unicodePwd"] = $newPassword;
$userdata["pwdLastSet"] = - 1;
$userdata["userAccountControl"] = 512;
$result = $ad->mod_replace($dn, $userdata);
不確定在上面的代碼中出了什麼問題,任何人都可以請看看這個並告訴我如何解決這個問題?