当前位置:Gxlcms > PHP教程 > ldap-php如何修改windowsAD的帐号密码

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

时间:2021-07-01 10:21:17 帮助过:19人阅读

通过下面的代码,可以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 )

人气教程排行