How to validate windows password with cmd or python?

Viewed 566

Is there any way to validate windows password with cmd or python ?

My approach using cmd:

C:\users\username>net user USERNAME - mypassword
True
C:\users\username>net user USERNAME - pass
False

An example of what I'd like in python:

>>> import win32api
>>> win32api.password.check(mypassword)
True
>>> win32api.password.check(pass)
False

Is that possible?

0 Answers
Related