Link to home
Start Free TrialLog in
Avatar of shawndong
shawndong

asked on

How to verify NT password?

I got a mission to verify password before creating service.

It seems that there is no API function to do this directly.

The two possible solutions are

1. LogonUser(). This can verify passwd however it requires the user must have TCB privilege(Acting as part of operating system).

2. NetUserChangePassword(). The trick is to use this function to change password to itself. It will also verify the password. However if the account has "Allow Changes in X days" set in the "Minimum Password Age", this function will hang up forever.

Can anyone tell me another function to do it?

Thanks a lot in advance.


ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial