Home  >  Article  >  Backend Development  >  ldap - How to modify the Windows AD account password in php

ldap - How to modify the Windows AD account password in php

WBOY
WBOYOriginal
2016-10-22 00:14:211720browse

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 )

Reply content:

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 )

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn