Maison  >  Article  >  développement back-end  >  ldap - php如何修改windows AD的帐号密码

ldap - php如何修改windows AD的帐号密码

WBOY
WBOYoriginal
2016-10-22 00:14:211684parcourir

通过下面的代码,可以ldap_bind检测认证,但是不知道修改密码需要怎么弄;

$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 )

回复内容:

通过下面的代码,可以ldap_bind检测认证,但是不知道修改密码需要怎么弄;

$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 )

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn