How to expire passwd in active directory?

  • Thread starter Thread starter Himanshu
  • Start date Start date
H

Himanshu

Hi,
I need to configure passwd to be expired for a user to do
a certain test. When I try setting UserAccountControl flag
to a particular value corrrespodning to passwd expired it
is reset back to 512(normal account). How can I specify
password validity period for a user?
Thanks
Himanshu
 
This is specific to the domain. You cannot set this on an individual
basis -only at the domain level or at a local computer level.


--

Paul Williams

http://www.msresource.net
http://forums.msresource.net
______________________________________
Hi,
I need to configure passwd to be expired for a user to do
a certain test. When I try setting UserAccountControl flag
to a particular value corrrespodning to passwd expired it
is reset back to 512(normal account). How can I specify
password validity period for a user?
Thanks
Himanshu
 
Hi,
I did that using group policies.
But Where do I change the current date so that the
password becomes expired right away. I have kep max
password age as 1. So it would be still valid for a day,
what if I want to expire it right away?
Any help appreciated.
Thanks
Himanshu
 
To immediately expire a user set pwdlastset attribute to 0.

Alternatively

set o=getobject("WinNT://domain/username,user")
o.passwordexpired=1;
o.setinfo()
 
Joe,
I tried setting pwdlastset attribute to 0 but that did
change the value of UserAccountControl flag? The latter
should get set to 833608.
ANy ideas?
Thanks
Himanshu
 
In AD using LDAP mechanisms to display useraccountcontrol it won't.

userAccountControl is slowly being deprecated.
 
Back
Top