J
Jan Nielsen
In an aspx web page, I'm trying to read out some attributes regarding
password settings like UF_PASSWD_NOTREQD, UF_PASSWD_CANT_CHANGE,
UF_DONT_EXPIRE_PASSWD and UF_PASSWORD_EXPIRED.
According to the documentation userAccountControl 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_EXPIRED, 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_NOTREQD, UF_PASSWD_CANT_CHANGE,
UF_DONT_EXPIRE_PASSWD and UF_PASSWORD_EXPIRED.
According to the documentation userAccountControl 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_EXPIRED, 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