Home All Groups Group Topic Archive Search About

Get machine user & password logon

Author
2 Nov 2006 8:59 PM
Kleber
Could anyone please help?

I'm trying to MATCH the user's UserName and Password imput to the user's
UserName & Password from the machine current logged on.

User's Input:
txtUserName="Joe"
txtPwd="Password"

Machine's data:
strUserName = ???
strPwd = ???

thanks a lot in advance.

Author
2 Nov 2006 9:55 PM
iwdu15
i highly doubt youl be able to get the users stored password since that would
be a breach of security. also, doesnt windows hash the user passwords so they
cant be hacked? if you could find the hashed user password and the hash
algorithm used for it, maybe you could hash their input and compare it to the
saved one
--
-iwdu15
Author
2 Nov 2006 9:58 PM
Chris Dunaway
Kleber wrote:
> Could anyone please help?
>
> I'm trying to MATCH the user's UserName and Password imput to the user's
> UserName & Password from the machine current logged on.
>
> User's Input:
> txtUserName="Joe"
> txtPwd="Password"
>
> Machine's data:
> strUserName = ???
> strPwd = ???

I doubt you will be able to "get" the user's password.  Instead your
program can try to logon using the passed in username and password and
if that succeeds, you know it is correct.  Here is a class I use that
calls the LogonUser api.  Maybe it will help you:

http://tinyurl.com/sa3cr