
November 2nd, 2004, 02:23 AM
|
|
Registered User
|
|
Join Date: Apr 2007
Posts: 22,309
Time spent in forums: < 1 sec
Reputation Power: 24
|
|
|
modifying password in active directory
im using PHP4 for windows and im trying to create a user in an Active Directory (win2k). I succeeded in doing so but the only problem is changing the password. It always says "server unwilling to perform...". Can you help me solve this problem....
------------------
HERE'S THE CODE which i got from other site:
$ldap = "somevalidconnection"
$newPassword = "somepassword";
$newPass = "";
// create the unicode password
$newPassword = """ . $newPassword . """;
$len = strlen($newPassword);
for ($i = 0; $i < $len; $i++)
$newPass .= "{$newPassword{$i}} 00";
) è$J·è$J·rd = $newPass;
$entry["unicodePwd"] = $newPassword;
$dn = "someDN";
ldap_mod_replace($ldap, $dn, $entry))
------------------
|