Hello World!

程序员那点事儿

首页 新随笔 联系 聚合 管理
  20 Posts :: 6 Stories :: 0 Comments :: 0 Trackbacks

When the number of failed logon attempts is exceeded, the user account becomes locked out for the number of minutes specified by the lockoutDuration attribute. The IADsUser.IsAccountLocked property appears to be the property to use to read and modify the lockout state of a user account, but the WinNT ADSI provider has restrictions that limit the use of the IsAccountLocked property.

Resetting the Account Lockout Status

When using the WinNT provider, the IsAccountLocked property can only be set to FALSE, which unlocks the account. Attempting to set the IsAccountLocked property to TRUE will fail. Only the system can lock an account.

The following code example demonstrates how to use Visual Basic with ADSI to unlock a user account.

解锁账户

Reading the Account Lockout Status

With the WinNT provider, the IsAccountLocked property can be used to determine if an account is locked out. If an account is locked out, the IsAccountLocked property will contain TRUE. If an account is not locked out, theIsAccountLocked property will contain FALSE.

The following code example demonstrates how to use Visual Basic with ADSI to determine if an account is locked out.

判断账户是否锁定

 

posted on 2013-01-11 10:59 hello wold! 阅读(450) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理