ADS设置密码访问被拒绝 [英] ADS Set Password access Denied

查看:108
本文介绍了ADS设置密码访问被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从ADS获取用户详细信息。但无法为用户设置密码。 ADS位于另一台服务器中。如果我传递ADS服务器管理员用户名和密码。然后我可以设置密码。但是如何不传递ADS服务器用户名和密码。

I am able to get the user details from ADS. But unable to Set password to user. The ADS is in another server. If i pass the ADS server administrator user name and password. Then I am able to set the password. But how to do without passing the ADS server user name and password.

推荐答案



我试图重置密码。使用setPassword。但是我使用旧密码更改了。

PrincipalContext PrincipalContext = new PrincipalContext(ContextType.Domain,ConfigurationManager.AppSettings [ADSServerIP]。ToString(),userpath);

UserPrincipal User = UserPrincipal.FindByIdentity(PrincipalContext,userid);

User.ChangePassword(strOldPassword,newpassword);
Hi,
I tried to reset the password. Using setPassword. But I changed using the old password.
PrincipalContext PrincipalContext = new PrincipalContext(ContextType.Domain, ConfigurationManager.AppSettings["ADSServerIP"].ToString(), userpath);
UserPrincipal User = UserPrincipal.FindByIdentity(PrincipalContext, userid);
User.ChangePassword(strOldPassword, newpassword);


这篇关于ADS设置密码访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆