NetUserChangePassword(server, username, oldPassword, newPassword)
Changes the password for a user.
CommentsA server or domain can be configured to require that a user log on to change the password on a user account. If that is the case, you need administrator or account operator access to change the password for another user acount. If logging on is not required, you can change the password for any user account, so long as you know the current password.
Win32 API References