Warm tip: This article is reproduced from serverfault.com, please click

NetUserChangePassword() can set a password to Administrator?

发布于 2020-11-28 05:19:35

When you enable Administrator user to login, the password is empty by default. At least on Windows 10, if you want login in a remote computer (via RDP) with Administrator user, must set a password before.

NetUserChangePassword() will be successful to this? considering that usually remote computer have only 2 users (already including Administrator), then my application is executed on second user >>

enter image description here

Questioner
Coringa
Viewed
0
Strive Sun - MSFT 2020-11-30 11:25:09

Yes, you can use NetUserSetInfo to set the administrator password locally.

Members of the Administrators local group can set any modifiable user account elements. All users can set the usri2_country_code member of the USER_INFO_2 structure (and the usri1024_country_code member of the USER_INFO_1024 structure) for their own accounts.