Friday, 9 August 2013

How to check if a local user account still have the same password

How to check if a local user account still have the same password

I have a PowerShell script which does the following on Windows 7 computers:
Get a random password from a secure server-side application
reset the password of a specific local user account using this password value
As a next step, I want to periodically check if the password saved on the
server is still valid. For now, I am using ValidateCredentials from
System.DirectoryServices.AccountManagement.PrincipalContext (see
Powershell To Check Local Admin Credentials) but it involves to unencrypt
the password and send it back to the computer just for this purpose.
Do you see any better way to check if password is still valid avoiding to
use clear text password ? Is it possible to compare some hash, or anything
else ?
Regards.

No comments:

Post a Comment