If you wish to set “Password never expires”, use the UserAccountControl attribute. Check Q285395.

 

Russell Potter

Directory Specialist

Directory Technologies, Infrastructure Technology, H&I

Tel: +61 8 9491 5196 +61 419 638 738

http://www.dir.telstra.com

Infrastructure Services

 

-----Original Message-----
From: Matthew Saunders [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 5 December 2001 7:10 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Setting "Password Never Expires" for a user from a .vbs

 

Hi.  I use a vbscript to create users and folders from a commandline (like,

 

NEWUSER username firstname lastname group firstpasswd )

 

and I want to be optionally able to set "password never expires" for a user.  (which is appropriate in some situations I face).  I can do this via the GUI of course but my research has drawn a blank when I found this:

 

PasswordExpirationDate

The password expiration date is not a property on the user object. It is a calculated value based on the sum of pwdLastSet for the user and maxPwdAge of the user's domain. To get the password expiration date, call the IADsUser::get_PasswordExpirationDate method. You cannot modify this property for a user; instead, call IADsDomain::put_MaxPasswordAge method to change the setting for the domain.

.

Source: http://www.unav.edu/cti/ldap-smb/AD-gluser.html

 

So does anyone have any ideas or is this basically impossible?  How does the gui change it per-user?

 

Many thanks,

 

Matthew Saunders

Just a humble ICT Teacher...

Reply via email to