如何设置用户帐户密码而不知道C中的旧密码? [英] How to set user account password without knowing the old password in C?
问题描述
我在写一个C ++程序来管理Windows 7上的用户帐户。
我要为现有用户帐户设置密码。
我不能使用NetUserChangePassword(Netapi32.dll),因为我不记录在创建用户时设置的以前的密码。
因此,程序必须能够设置一个新的密码(不知道旧的密码)。
在c ++中有一种编程方式吗?
感谢您的帮助。
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370659.aspxrel =nofollow> NetUserSetInfo
level
参数设置为1003。
I'm writing a C++ program to manage user accounts on Windows 7.
I would like to set the password for an existing user account.
I cannot use NetUserChangePassword (Netapi32.dll) since I don't record previous password that I set when creating the user.
So, the program must be able to just set a new password (without knowing the old password).
Is there a way to do that programmatically in c++?
Thank you for your help.
Call NetUserSetInfo
with the level
parameter set to 1003.
这篇关于如何设置用户帐户密码而不知道C中的旧密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!