Home > Article > Backend Development > ldap - How to modify the Windows AD account password in php
Through the following code, ldap_bind can be used to detect authentication, but I don’t know how to change the password;
$domain = 'sclivein.com';
$ad = ldap_connect ( "192.168.1.100" ) or die ( 'Could not connect to LDAP server.' );
ldap_set_option ( $ad, LDAP_OPT_PROTOCOL_VERSION, 3 );
ldap_set_option ( $ad, LDAP_OPT_REFERRALS, 0 );
@ldap_bind ( $ad, "{$user}@{$domain}", $password )
Through the following code, ldap_bind can be used to detect authentication, but I don’t know how to change the password;
$domain = 'sclivein.com';
$ad = ldap_connect ( "192.168.1.100" ) or die ( 'Could not connect to LDAP server.' );
ldap_set_option ( $ad, LDAP_OPT_PROTOCOL_VERSION, 3 );
ldap_set_option ( $ad, LDAP_OPT_REFERRALS, 0 );
@ldap_bind ( $ad, "{$user}@{$domain}", $password )