Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Don't Expire Password

Keywords: 	 Don't Expire Password

Question:

My Question is (using dsSetProperty()?):

What is the setting for the ADSI Extender to:

1) Never expire the password.

2) Do not require the change of password at next logon

Answer:

; Make sure don't expire password is set.
UF_DONT_EXPIRE_PASSWD = 65536
sProperty = "userAccountControl" ; Bit mask values in constants.wbt
nValue = dsGetProperty(sUser, sProperty)
nValue = nValue | UF_DONT_EXPIRE_PASSWD 
dsSetProperty(sUser, sProperty, nValue)


; Set the expire time to never
sProperty = "pwdLastSet"; Set -1 to prevent expire next login. 
nValue = -1
dsSetProperty(sUser, sProperty, nValue)