Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing password at next login - Active directory

Status
Not open for further replies.

LeoLionHeart

Programmer
Apr 4, 2006
45
GB
I need the user to change the password when they first logon.

Code:
.Properties("userAccountControl").Value = ADS_USER_FLAG.ADS_UF_NORMAL_ACCOUNT Or ADS_USER_FLAG.ADS_UF_PASSWD_NOTREQD Or ADS_USER_FLAG.ADS_UF_DONT_EXPIRE_PASSWD

The code above sets the tick box in AD to password never expires.

I have tried this

Code:
.Properties("pwdLastSet")(0) = 0

but the tick box for User must change password at next logon doesn't appear to be ticked.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top