从其他域设置AD用户的密码 [英] set AD user's password from a different domain
问题描述
Hi Folks,
通过执行来自不同域的脚本,我遇到了对AD用户的setPassword问题。
我编写了一些脚本来创建新用户并将其默认密码设置为目标域。如果我以目标域的管理员身份登录,它就可以工作。但是当我从其他某个域以用户身份登录时,可以创建用户,但无法设置其密码...
这里是2个域,DOM-A和DOM-B。
用户TestAndy是DOM-B管理员组的成员,我将DOM-B \ TestAndy添加到"帐户操作员"中。 &安培; "管理员",DOM-A的内置组。
无论我登录的是哪个域,
.....
oUser.SetInfo - >用户可以成功创建
oUser.SetPassword " passwood" - >这里引发的错误
我真的无法理解即使我已经将DOM-B \ TestAndy添加到DOM-A的管理组中,为什么我无法设置密码...有人知道吗?
刚刚做过测试..
使用用户DOM-B / TestAndy登录DOM-A
猜猜是什么..我可以通过AD用户管理控制台创建帐户并设置密码。
为什么同一个用户无法通过执行脚本来设置密码?它对我没有任何意义..
Hi Folks,
I got a problem with setPassword to a AD user through executing scripts from a different domain.
I wrote some scripts to create a new user and set its default password into the target domain. It works if I logon as admin of the target domain. But when I logon as a user from some other domain, the user can be created but its password can't be set...
here's 2 domain, DOM-A and DOM-B.
user TestAndy is a member of admin group of DOM-B, and I added DOM-B\TestAndy to "Account Operators" & "Administrator", the built-in groups of DOM-A.
No matter which domain I logged in,
.....
oUser.SetInfo -> user can be successfully created
oUser.SetPassword "passwood" -> error raised here
I really can not understand even I already added DOM-B\TestAndy to admin group of DOM-A, why I can't set password... anybody knows?
Just did a test..
Logon DOM-A with user DOM-B/TestAndy
guess what.. I can create account and set password through AD user management console.
why the same user can't set password by executing a script? it doesn't make any sense to me..
这篇关于从其他域设置AD用户的密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!