开发者

How to verify user's name and password in Windows?

开发者 https://www.devze.com 2023-02-02 18:48 出处:网络
Given a user\'s name and password, is there a way to check if the name is a valid user account on the system and if the supplied password matches the passw开发者_Python百科ord for that user\'s account

Given a user's name and password, is there a way to check if the name is a valid user account on the system and if the supplied password matches the passw开发者_Python百科ord for that user's account?


Edit: The need for this arises from the way authentication is structured in this application. The app uses the local accounts on the system to allow the users to remotely access files and stuff. My app needs a way of authenticating those users to provide them with access to its services.


You should be able to use the LogonUser() API for this purpose... If the call fails, then either the username or password are bogus.

0

精彩评论

暂无评论...
验证码 换一张
取 消