PDA

View Full Version : Unlocking windows user accounts


scrupul0us
06-16-2009, 07:02 PM
I have a list of windows user accounts that often get locked out (they are being used for authentication on the web and after 3 fails they lock out)...

rather than have my client call me all the time to unlock these I would like to provide him with a simple interface to unlock the 5-6 usernames assigned to his account

I did some googling and mainly found examples dealing with active directory, but not the actual windows users hive...

im running server 2003

any examples or links to helpful literature would be greatly appreciated...

Mike_O
06-16-2009, 09:36 PM
Hey scrupul0us,

I do believe you're on the right track. If I remember correctly, the classes you have to reference are DirectoryEntry and DirectorySearcher. Using those, you should be able to unlock users.

Mike

scrupul0us
06-16-2009, 10:51 PM
DirectoryEntry and DirectorySearcher

Mike, those deal with active directory... I'm trying to access users local to the machine

Mike_O
06-16-2009, 11:12 PM
Hey,

Doesn't matter if they're on the local or remote machine. You can still use these classes to manage users. I remember a while ago, I wrote a little test application similar to what you're looking for, and I know for sure it's doable because I did in fact test it on my local machine at first. Sorry, I wish I kept the code, but I can't seem to find it. If I do, I'll give it to you. Anyway, I'd say keep doing more research regarding these two classes.

Mike

scrupul0us
06-16-2009, 11:21 PM
will do Mike,thanks