Re: Update Lockout user attribute Programmatically

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You can't programmatically lock a user in any other way than by generating
the required failed number of authentications that your policy specifies.
lockoutTime can only be set to 0 by users and
msds-user-account-control-computed is a read-only, computed attribute.

You can programmatically disable users by changing userAccountControl.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Ryan Sanders" <RyanLSanders@xxxxxxxxxxxxxxxxx> wrote in message
news:_ijgh.24353$B42.18458@xxxxxxxxxxxxxxx
Because that is what the boss said, you know how that goes. Also there
are nearly 500 use case setup one of these calls for the program to lock
the account, many other call for disable account. I am not the BA, this
is what they told me needs to occur.

I believe that the site returns a different message to the end user and
thus different corrective action based on status locked or disabled.

So can this be done? Flip a flag or change an attribute value to lock the
accounts.

Thanks.


Jorge de Almeida Pinto [MVP - DS] wrote:
why do you want to lock and not disable? what is the purpose?



.



Relevant Pages

  • Re: MFC, Threads, PostMessage, and Reentrant WindowProc
    ... with a single global lock which is set before a blocking I/O call, ... memory mapping hardware. ... programming is that the basic paradigms have not changed. ... plus the canonical locking order rule. ...
    (microsoft.public.vc.mfc)
  • Re: Why not use this as a lock object in lock
    ... Can somebody explain what can happen if I have a lock section and use this ... practices" advice in programming is "theoretical bullshit". ... When one follows good advice, such as never locking on "this", it helps avoid certain classes of bugs. ... But it's still good advice to keep your locking objects private, so that one can ensure that when locking on an object, it's only ever being used for a lock in code that one has control over. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Fast Threading ?
    ... >>>You should compare to implementation of lock based synchronization. ... > When threaded programming came out a lot of people has problems with it ... I wonder where they get their DOS or CP/M developers from? ...
    (borland.public.delphi.language.basm)
  • Synchronizing Multiple Computers
    ... These days parallel programming seems to be growing in popularity, ... for example) and this usually means employing multiple computers. ... server would just basically be a server which sits and waits for lock ... and then requests a lock. ...
    (comp.unix.programmer)
  • Re: thread autorelease pools help requested
    ... there's a link to the Multithreading Programming Topics guide. ... nothing explains what precisely lock does. ...
    (comp.sys.mac.programmer.help)