问题
I am looking for a way to change the windows password throgh a python script.
somthing like a win32api that can help me?
Thanks!
回答1:
You can do this with the Win32 function NetUserChangePassword. From Python you can access that with win32net.NetUserChangePassword.
Although as the documentation points out this won't work if you are using active directory. But in that case you are surely not in a position to change user passwords programmatically.
来源:https://stackoverflow.com/questions/33712874/change-windows-user-password-with-python