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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checking Password Age

Status
Not open for further replies.
Jun 12, 2003
8
US
I need help in determining a users password age so I can determine if it is time for them to change their password.

Thanks,

Darin
 
This will give you the age of the password in days :-

on error resume next
dim wshshell, objuser, myfile, FSO
objPath =inputbox("Please enter users login")
adsPath = "WinNT://idghead/" & objPath &",user"
Set objuser = GetObject(adsPath)
set FSO = CreateObject("scripting.FileSystemObject")
set myFile = fso.CreateTextFile(""&objpath&".txt", true)
myfile.writeline("Password Age : "&objuser.passwordage/86400&"")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top