Active directory lock C#
-
Friday, April 27, 2012 2:12 PM0
Hi
We are generating the Random temprary Password and sending the password in the mail to the user .The account should be locked unless the user changes the password by using the temp password .Once the password is changed,user account should be unlocked
Thanks
Girish
All Replies
-
Friday, April 27, 2012 2:16 PMThis cannot be done. You cannot define what password is acceptable when the user changes password, except by enforcing complexity rules, etc.
Grant Ward, a.k.a. Bigteddy
-
Friday, April 27, 2012 3:53 PM
Also, if the account is locked, how can you expect the user to retreive the email?
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
My Blog: http://unlockpowershell.wordpress.com
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"}) -
Friday, April 27, 2012 4:05 PM
While I'm at it, you are not asking anything about scripting as far as I can tell?
Even the title is C# :)
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
My Blog: http://unlockpowershell.wordpress.com
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})- Marked As Answer by Bill_StewartMicrosoft Community Contributor, Moderator Wednesday, May 02, 2012 6:54 PM
-
Friday, April 27, 2012 5:05 PMModerator
Hi Girishgouda,
Your question doesn't make sense. I think you should describe the goal, not the steps. Also, as Karl pointed out, why ask a C# question in a scripting forum?
Bill
-
Sunday, April 29, 2012 2:41 AMModerator
The account cannot be locked, or the user will be unable to logon with the password you communicate to them.
When you assign the new random password, you can expire the password so it must be reset at first logon. If the password is reasonably complex and random, only the person with the correct password will be able to logon with it.
Richard Mueller - MVP Directory Services

