2015-06-10 46 views
0

執行下面是我的代碼,但得到一個錯誤:
PHP Warning: ldap_mod_replace(): Modify: Server is unwilling to perform inPHP的警告: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); 

不確定在上面的代碼中出了什麼問題,任何人都可以請看看這個並告訴我如何解決這個問題?

回答

0

Server is unwilling to perform意味着您不具有足夠權限執行該操作的用戶。

這是LDAP憑證/訪問控制問題,不一定代表您的代碼。

相關問題