In an aspx web page, I'm trying to read out some attributes regarding
password settings like UF_PASSWD_NOTRE QD, UF_PASSWD_CANT_ CHANGE,
UF_DONT_EXPIRE_ PASSWD and UF_PASSWORD_EXP IRED.
According to the documentation userAccountCont rol seems to be an integer
containing these. However only the bit UF_DONT_EXPIRE_ PASSWD seems to be
updated properly. The other three flags are reset no matter what I do to the
user account. Using ADSI Edit it seems like
"msDS-User-Account-Control-Computed" can be used to determine
UF_PASSWORD_EXP IRED, but trying to read this attribute using DirectoryEntry
etc. causes an exception to occur.
iFlags =
(int)objAccount .Properties["msDS-User-Account-Control-Computed"].Value;
It seems like this attribute is not in the collection.
How should I read these properties in asp.net ???
Thanks in advance,
Jan Nielsen
password settings like UF_PASSWD_NOTRE QD, UF_PASSWD_CANT_ CHANGE,
UF_DONT_EXPIRE_ PASSWD and UF_PASSWORD_EXP IRED.
According to the documentation userAccountCont rol seems to be an integer
containing these. However only the bit UF_DONT_EXPIRE_ PASSWD seems to be
updated properly. The other three flags are reset no matter what I do to the
user account. Using ADSI Edit it seems like
"msDS-User-Account-Control-Computed" can be used to determine
UF_PASSWORD_EXP IRED, but trying to read this attribute using DirectoryEntry
etc. causes an exception to occur.
iFlags =
(int)objAccount .Properties["msDS-User-Account-Control-Computed"].Value;
It seems like this attribute is not in the collection.
How should I read these properties in asp.net ???
Thanks in advance,
Jan Nielsen
Comment