如何更改Active Directory用户密码? [英] How to change the Active Directory user password?

查看:363
本文介绍了如何更改Active Directory用户密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何修改Active Directory中的用户?实际上,我想更改

Active Directory用户密码。但是我怎么能这样做?

Hi all,
How can I modify users in Active Directory ? Actually , I want to change the
Active Directory user password . But how can I do that?

推荐答案

你可以使用类似下面这样的东西


DirectoryEntry deUser =新的

DirectoryEntry(" LDAP:// CN = TestUser,CN = Users,DC = TestDomain,DC = com");

deUser.Invoke(" SetPassword" ;,NewPassword);

deUser.CommitChanges();


干杯,

John Wadie

You can use something like the following

DirectoryEntry deUser = new
DirectoryEntry("LDAP://CN=TestUser,CN=Users,DC=TestDomain,DC=com");
deUser.Invoke("SetPassword", "NewPassword");
deUser.CommitChanges();

Cheers,
John Wadie


谢谢。

但我对方法名称SetPassword感到困惑。这个

方法来自哪里?这个方法不需要取消选择吗?

DirectoryEntry可以使用多少种方法?他们的名字是什么?

我知道DirectoryEntry.Invoke()是一个委托,而且我知道一个代表

对象必须链接一种方法,它们属于同一类型,并提供相同的参数



但是在你的代码中,我看不到任何关于SetPassword的delecare。


***通过开发人员指南 http://www.developersdex.com发送 ***

不要只是参加USENET ......获得奖励!
Thanks.
But I was comfused about the method name SetPassword. Where is this
method come from? This method no need to delecare?
How many methods I can use by DirectoryEntry? What are their name?
I know DirectoryEntry.Invoke() is a delegate,and as I know a delegate
object must "link" a method which they are in the same type and provide
the same parameter.
But in your code, I can''t see any delecare about SetPassword.

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!


是什么让你觉得DirectoryEntry.Invoke是一个委托吗?

这是一个regualr方法,它使用反射在本机

COM IADs接口上调用方法(此处为SetPassword)。

这样称呼:

userEntry.Invoke(" SetPassword",object [] {" secret"});


Willy 。


Jet Leung < XI ** @ tom.com>在消息中写道

新闻:uy ************** @ TK2MSFTNGP14.phx.gbl ...
What makes you think DirectoryEntry.Invoke is a delegate?
It''s a regualr method that calls a method (here SetPassword) on the native
COM IADs interface using reflection.
Call it like this:
userEntry.Invoke("SetPassword", object[] {"secret"});

Willy.

"Jet Leung" <xi**@tom.com> wrote in message
news:uy**************@TK2MSFTNGP14.phx.gbl...
谢谢。
但我对方法名称SetPassword感到困惑。这个
方法来自哪里?这种方法无需取消使用?
DirectoryEntry可以使用多少种方法?他们的名字是什么?
我知道DirectoryEntry.Invoke()是一个委托,因为我知道一个委托
对象必须链接一种方法,它们属于同一类型并提供相同的参数。
但是在你的代码中,我看不到任何关于SetPassword的delecare。

***通过开发人员发送的指南 http://www.developersdex.com ***
唐只是参加USENET ......获得奖励!
Thanks.
But I was comfused about the method name SetPassword. Where is this
method come from? This method no need to delecare?
How many methods I can use by DirectoryEntry? What are their name?
I know DirectoryEntry.Invoke() is a delegate,and as I know a delegate
object must "link" a method which they are in the same type and provide
the same parameter.
But in your code, I can''t see any delecare about SetPassword.

*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!



这篇关于如何更改Active Directory用户密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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