Change user password in ADS and check the password policy?
- From: "Volkan Senguel" <volkan.senguel@xxxxxxxxxxxxxxxx>
- Date: Wed, 19 Aug 2009 20:49:23 +0200
Hi, im creating a app where the user can change his password, so far so good.
Now, we have on our domain a password policy which means that passwords are stored 12 time, the password must be changed on every 60 days and uses complex passwords etc...
But if i change the password to the same password, i can do that without any "error" message!?!?
How can i archive that the password policy is checked and a message is given back with a human readable text?
============================================================================================================
string message = "";
string LDAPPath = getDistinguishedName(LogonName);
try
{
DirectoryEntry deUser = new DirectoryEntry("LDAP://" + Properties.Settings.Default.DomainFull + "/" + LDAPPath, adUser, adPassword);
deUser.CommitChanges();
deUser.Invoke("SetPassword", Password);
deUser.CommitChanges();
message = "Password updated!";
}
catch (DirectoryServicesCOMException ex)
{
message = "ERROR: + ex.InnerException;
}
if(message.Contains("0x80072035"))
{
message = "INFO: The password doesn't meet the requirements!";
}
return message;
============================================================================================================
I need a way to check:
- has the password the minimum lenght
- is complex enough
- are not used for the last x passwords
???
Thank you for any help
Volkan
.
- Prev by Date: Re: Sorting a Dictionary by Property
- Next by Date: Re: How do I get the path to the exe of another installed application
- Previous by thread: $$all kinds of clothing , shoes , sungless and watch etc.
- Next by thread: Datagrid doesn't display datetime
- Index(es):
Relevant Pages
|
Loading