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.