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.
精彩评论