Link to home
Create AccountLog in
Avatar of E=mc2
E=mc2Flag for Canada

asked on

Check login credentials for a computer user

I would like to check the login credentials for any user, to see if it's still the same password or if it has changed,.
A script would be beneficial or a program.
Avatar of Wesley Miller
Wesley Miller
Flag of United States of America image

Is this for a Local Account , Active Directory  , or Azure Account ?
Avatar of E=mc2

ASKER

This is for Active Directory, on a Windows Server 2016
This tells you when a password was last set for a given user:

$date = [DateTime]( get-aduser michael.smith -prop pwdLastSet ).pwdLastSet
$date = $date.AddYears( 1600 ).ToLocalTime()
$date

Open in new window

Avatar of E=mc2

ASKER

Thanks Michael, is this a script?  If yes, what type is it?
Yes. That's PowerShell using the ActiveDirectory module.
Use DSInternals to pull the user hash and compare it against the previously found hash. pwdLastSet will not be accurate if someone bypasses security and use the same password
https://www.experts-exchange.com/articles/32998/Two-way-Password-Synchronization-from-one-Active-Directory-Domain-to-another-using-DSInternals.html
Avatar of E=mc2

ASKER

Michael, the Powershell script does not work for me, however thank you.
ASKER CERTIFIED SOLUTION
Avatar of E=mc2
E=mc2
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of E=mc2

ASKER

I thought this worked but it does not.