WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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)

Article ID:   W15380
File Created: 2003:05:13:11:27:24
Last Updated: 2003:05:13:11:27:24