views:

1362

answers:

2

Hey everyone,

I have an interesting problem, I am writing a password management webpage/service and I am trying to find a way to determine when a user's password is going to expire so I can manually reset their other passwords with it and send out an email, etc.

The problem I'm having is that when trying to loop through my users I'm getting the bulk of them not having a pwdlastset attribute so I can't determine when it's going to expire.

So I guess I am looking for ideas on a good way to check for when a user's password is going to expire aside from using the pwdlastset property and calculating the time left.

Thanks a bunch.

A: 

As far as I know, if pwdlastset is zero or missing, the user is either required to change their password at the next logon or their account is setup with a non-expiring password. Could this be the cause of what you are seeing?

Jeff Siver
+4  A: 
marc_s
it seems the user running my AD queries didn't have permission to view the properties of everyone, so now it seems like I can view the pwdlastset attribute, now a new problem arises with accounts that are technically disabled but not indicated as such in the useraccountcontrol, is there another setting where it would be viewable?
Jimmy
phew! You hit all the hard ones, eh? Determining account lockout is another odyssey on its own.... unfortunately, the UF_LOCKOUT flag on UserAccountControl isn't really used for that :-(
marc_s
@JImmy: get the book I mentioned - it contains all the answers, and a lot more :-) Good stuff indeed
marc_s
Thanks for the link, probably going to order that, and also thanks for your help, this has been an endeavor
Jimmy