ADSI帐户锁定 [英] ADSI Account Lockout
问题描述
我正在寻找一种方法来使用System.DirectoryServices查找所有用户
a域名的帐户被锁定或禁用。我已经使用了
ADSIEdit和mmc架构加载项来尝试查找这些
的属性,但到目前为止还没有任何运气。我还搜索了
平台SDK文档。它有VB和C ++中的示例,但这些都没有使用
DotNet,也没有给可能使用的属性提供任何提示。他们似乎直接在一个对象上调用一个方法,我确信这个方法不是作为DirectoryEntry类的一部分提供的。
>
我有一种感觉我可能需要做一个Invoke(就像你在重置用户时那样从DotNet重新设置
密码)如果我必须这样做那我该怎么办呢在域中搜索
所有用户?
我还希望能够启用或禁用我的帐户
申请(这是账户锁定和账户禁用)。
感谢任何人都可以提供的任何帮助。
Arran
Hi,
I am looking for a way to use System.DirectoryServices to find all users on
a domain whos accounts are either locked out or disabled. I have used
ADSIEdit and the mmc schema add-in to try and find properties for these
things but have not had any luck so far. Also i did a search on the
Platform SDK doc''s. It has examples in VB and C++ but these are not using
DotNet and dont give any hint to a property that may be used. They seem to
call a method directly on a object, and i am sure that method is not
available as part of a DirectoryEntry class.
I have a feeling i may need to do a Invoke (as you do when you reset a users
password from DotNet) if i do have to do this then how can i do a search of
all users in a domain?
I would also like to be able to Enable or Disable a account from my
application (This is Account Lockout and Account Disabled).
thanks for any help anyone can offer.
Arran
推荐答案
" Arran Pearce" < AR ********** @ bacoll.ac.uk>写在
新闻:#m ************** @ TK2MSFTNGP11.phx.gbl:
"Arran Pearce" <ar**********@bacoll.ac.uk> wrote in
news:#m**************@TK2MSFTNGP11.phx.gbl:
我正在寻找一种方法来使用System.DirectoryServices来查找帐户被锁定或禁用的域上的所有用户。我已经使用ADSIEdit和mmc架构加载项来尝试找到这些东西的属性,但到目前为止还没有运气。我也在Platform SDK doc上搜索了一下。它有VB和C ++中的示例
但这些都没有使用DotNet,也没有给可能使用的属性提供任何提示。他们似乎直接在一个对象上调用一个方法,
我确信这个方法不能作为DirectoryEntry
类的一部分。
我有一种感觉我可能需要如果我必须这样做,那么当您从DotNet重置
用户密码时执行调用,那么我该如何搜索域中的所有用户?
<我希望能够启用或禁用我的
应用程序中的帐户(这是帐户锁定和帐户禁用)。
感谢任何人提供的任何帮助。
Arran
Hi,
I am looking for a way to use System.DirectoryServices to find all
users on a domain whos accounts are either locked out or disabled. I
have used ADSIEdit and the mmc schema add-in to try and find
properties for these things but have not had any luck so far. Also i
did a search on the Platform SDK doc''s. It has examples in VB and C++
but these are not using DotNet and dont give any hint to a property
that may be used. They seem to call a method directly on a object,
and i am sure that method is not available as part of a DirectoryEntry
class.
I have a feeling i may need to do a Invoke as you do when you reset a
users password from DotNet) if i do have to do this then how can i do
a search of all users in a domain?
I would also like to be able to Enable or Disable a account from my
application (This is Account Lockout and Account Disabled).
thanks for any help anyone can offer.
Arran
当你的DirectoryEntry与用户(即deUser)一起检查
userAccountControl Flag属性:
deUser [" userAccountControl"]
如果因为到期而查看该帐户,您可能需要检查
deUser [" accountExpires"]
-
最好的问候
Peter Koen >
-------------------------------- ---
MCAD,CAI / R,CAI / S,CASE / RS,CAT / RS
http://www.kema.at
嗨Arran,>
就像Peter说的那样,你应该使用userAccountControl属性。
对于Lockout和Disabled acount,你应该参考ADS_UF_LOCKOUT和
ADS_UF_ACCOUNTDISABLE在ADS_USER_FLAG_ENUM枚举中定义的标志。
请参阅以下链接中的ADS_USER_FLAG_ENUM枚举:
http://msdn.microsoft.com/library/de...us/netdir/adsi
/ads_user_flag_enum.asp
您还可以找到如何启用和禁用用户帐户的小样本:
http://msdn.microsoft.com/库/解...我们/ NE tdir / netd
s /abling_and_disabling_the_user_account.asp
如果您还有任何疑问,请随时告诉我。
祝你好运,
Jeffrey Tan
微软在线合作伙伴支持
安全! - www.microsoft.com/security
此帖子按原样提供没有保证,也没有赋予任何权利。
--------------------
|来自:Arran Pearce < ar ********** @ bacoll.ac.uk>
|主题:ADSI账户锁定
|日期:2003年10月23日星期四19:58:59 +0100
|行数:23
| X-Priority:3
| X-MSMail-Priority:正常
| X-Newsreader:Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE:由Microsoft MimeOLE V6.00.2800.1165制作
|消息ID:< #m ************** @ TK2MSFTNGP11.phx.gbl>
|新闻组:microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host:host213-122-124-127.in-addr.btopenworld.com
213.122.124.127
|路径:cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
|外翻:cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193614
| X-Tomcat-NG:microsoft.public.dotnet.languages.csharp
|
|
|
|我正在寻找一种方法来使用System.DirectoryServices来查找所有用户
|帐户被锁定或禁用的域名。我用了
| ADSIEdit和mmc架构加载项,试图找到这些
|的属性事情,但到目前为止还没有任何运气。我也在
|上搜索了一下Platform SDK doc'。它有VB和C ++中的示例,但这些不使用
| DotNet并没有给出可能使用的属性的任何提示。他们似乎
到
|直接在一个对象上调用一个方法,我确信该方法不是
|作为DirectoryEntry类的一部分提供。
|
|我有一种感觉我可能需要做一个Invoke(当你重置一个
用户
|来自DotNet的密码时)如果我必须这样做那么如何我可以搜索
|域中的所有用户?
|
|我还希望能够从我的
|启用或禁用帐户申请(这是账户锁定和账户禁用)。
|
|感谢任何人都能提供的帮助。
|
| Arran
|
|
|
Hi Arran,
Just as Peter said, you should use the userAccountControl property.
For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT and
ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM enum.
Please refer to ADS_USER_FLAG_ENUM enum at the link below:
http://msdn.microsoft.com/library/de...us/netdir/adsi
/ads_user_flag_enum.asp
You also can find a small sample of how to enable and disable a user acount:
http://msdn.microsoft.com/library/de...us/netdir/netd
s/enabling_and_disabling_the_user_account.asp
If you still have any questions, please feel free to let me know.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| Subject: ADSI Account Lockout
| Date: Thu, 23 Oct 2003 19:58:59 +0100
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
213.122.124.127
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193614
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I am looking for a way to use System.DirectoryServices to find all users
on
| a domain whos accounts are either locked out or disabled. I have used
| ADSIEdit and the mmc schema add-in to try and find properties for these
| things but have not had any luck so far. Also i did a search on the
| Platform SDK doc''s. It has examples in VB and C++ but these are not using
| DotNet and dont give any hint to a property that may be used. They seem
to
| call a method directly on a object, and i am sure that method is not
| available as part of a DirectoryEntry class.
|
| I have a feeling i may need to do a Invoke (as you do when you reset a
users
| password from DotNet) if i do have to do this then how can i do a search
of
| all users in a domain?
|
| I would also like to be able to Enable or Disable a account from my
| application (This is Account Lockout and Account Disabled).
|
| thanks for any help anyone can offer.
|
| Arran
|
|
|
感谢所有人你的帮助。
"" Jeffrey Tan [MSFT]"" <,V - ***** @ online.microsoft.com>在消息中写道
新闻:%2 ****************** @ cpmsftngxa06.phx.gbl ...
Thanks for all your help.
""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:%2******************@cpmsftngxa06.phx.gbl...
Arran,
正如彼得所说,你应该使用userAccountControl属性。
对于Lockout和Disabled acount,你应该参考ADS_UF_LOCKOUT和
ADS_UF_ACCOUNTDISABLE标志在ADS_USER_FLAG_ENUM枚举中定义。
请参考以下链接中的ADS_USER_FLAG_ENUM枚举:
http://msdn.microsoft.com/library/de...us/netdir/adsi /ads_user_flag_enum.asp
acount:
http://msdn.microsoft.com/library/de...us/netdir/netd s /abling_and_disabling_the_user_account.asp
如果您还有任何疑问,请随时告诉我们。
致以诚挚的问候,
Jeffrey Tan
微软在线合作伙伴支持
获得安全保障! - www.microsoft.com/security
此帖子提供就像没有保证,也没有权利。
--------------------
|来自:Arran Pearce < ar ********** @ bacoll.ac.uk>
|主题:ADSI账户锁定
|日期:2003年10月23日星期四19:58:59 +0100
|行:23
| X-Priority:3
| X-MSMail-Priority:正常
| X-Newsreader:Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE:由Microsoft MimeOLE V6.00.2800.1165制作
|消息ID:< #m ************** @ TK2MSFTNGP11.phx.gbl>
|新闻组:microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host:host213-122-124-127.in-addr.btopenworld.com
213.122.124.127
|路径:cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
|外翻:cpmsftngxa06.phx.gbl
microsoft.public.dotnet.languages.csharp:193614 | X-Tomcat-NG:microsoft.public.dotnet.languages.csharp
|
|
|
|我正在寻找一种方法来使用System.DirectoryServices来查找所有用户
帐户被锁定或禁用的域名。我用过
| ADSIEdit和mmc架构加载项,用于尝试查找这些
的属性事情,但到目前为止还没有任何运气。我也搜索了
| Platform SDK doc'。它有VB和C ++中的示例,但这些不是
使用| DotNet并没有给出可能使用的属性的任何提示。他们似乎是
直接在对象上调用方法,我确信该方法不是
|作为DirectoryEntry类的一部分提供。
|
|我有一种感觉,我可能需要做一个Invoke(正如你从DotNet重置一个
用户
|密码时所做的那样)如果我必须这样做那么我怎么能做一个
搜索
|域中的所有用户?
|
|我还希望能够启用或禁用我的
|中的帐户申请(这是账户锁定和账户禁用)。
|
|感谢任何人都能提供的帮助。
|
| Arran
|
|
|
Hi Arran,
Just as Peter said, you should use the userAccountControl property.
For Lockout and Disabled acount, you should refer to ADS_UF_LOCKOUT and
ADS_UF_ACCOUNTDISABLE flag which are defined in ADS_USER_FLAG_ENUM enum.
Please refer to ADS_USER_FLAG_ENUM enum at the link below:
http://msdn.microsoft.com/library/de...us/netdir/adsi /ads_user_flag_enum.asp
You also can find a small sample of how to enable and disable a user acount: http://msdn.microsoft.com/library/de...us/netdir/netd s/enabling_and_disabling_the_user_account.asp
If you still have any questions, please feel free to let me know.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: "Arran Pearce" <ar**********@bacoll.ac.uk>
| Subject: ADSI Account Lockout
| Date: Thu, 23 Oct 2003 19:58:59 +0100
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#m**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: host213-122-124-127.in-addr.btopenworld.com
213.122.124.127
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:193614 | X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi,
|
| I am looking for a way to use System.DirectoryServices to find all users
on
| a domain whos accounts are either locked out or disabled. I have used
| ADSIEdit and the mmc schema add-in to try and find properties for these
| things but have not had any luck so far. Also i did a search on the
| Platform SDK doc''s. It has examples in VB and C++ but these are not using | DotNet and dont give any hint to a property that may be used. They seem
to
| call a method directly on a object, and i am sure that method is not
| available as part of a DirectoryEntry class.
|
| I have a feeling i may need to do a Invoke (as you do when you reset a
users
| password from DotNet) if i do have to do this then how can i do a search of
| all users in a domain?
|
| I would also like to be able to Enable or Disable a account from my
| application (This is Account Lockout and Account Disabled).
|
| thanks for any help anyone can offer.
|
| Arran
|
|
|
这篇关于ADSI帐户锁定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!