Answer the question
In order to leave comments, you need to log in
How to change the password on Active Directory in PHP?
Good afternoon, tell me how to change user passwords through php ldap? I looked on the Internet, copy-paste of the same 2 options goes everywhere:
1)
$newPassword = "\"new_password\"";
$newPassw = '';
$len = strlen($newPassword);
for ($i = 0; $i < $len; $i++)
$newPassw .= "{$newPassword{$i}}\000";
$newPassword = $newPassw;
$data["unicodePwd"] = $newPassword;
$data['userPassword'] = "{SHA}" . base64_encode( pack( "H*", sha1( 'new_password' ) ) );
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question