Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I validate an NT password?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00909838
Message ID:
00936481
Views:
20
The Dll was written because of the very obvious problem that you would be unable to call the API functions to verify a password,domain/username combination on win2000 server without having to set the context user to admin.

This was not the problem with XP and Win2003 Server. Since our servers are mostly win2k I had this DLL written. It will work on XP, 2003 as well as 2000 (Not 98 of course)

Windows requires the username as well as the Domain so you will need to send the domain, username as well as password. - SSPLogonUser(cDomain,cUserid,cPw)

One caveat - The Dll like ANY other DLL will accept NULL as the password and as we know that this comparison will return a .T. or 1.

You MUST protect your login screen by evaluating the USERNAME PW fields to remove NULL. FOr instance if you entered the correct username, domain but sent a NULL as the password, the API would return 1 signifying that the PW was correct. Null is sent by pressing CTRL+0 (Ctrl+zero).

You must remove the nulls like so:
cPw = NVL(ALLTRIM(ThisForm.txtPassword.Value),"")
cUserid = NVL(ALLTRIM(ThisForm.txtUser.Value),"")


and then call the DLL

HTH
>Have a look at the DLL I uploaded to www.foxite.com. It works without you having to degrade your security settings. Very simple to call and with a sample form included. Basically the username, domain and pw are compared against the windows hashed version.
>
>This dll is free and works on winxp/win2k

>
>Hello,
>
>I downloaded and it seems to work just fine on my 2000 laptop. I had a couple of questions, if you please.
>
>1.) I noticed on your demo screen you have a "DLL test" button that uses checkuser.dll and a "test XP" that uses Logonuser(). The logonuser() api call requires that the workstation be "part of the operating system" to work correctly (or did this requirement go away in XP??). Does the checkuser.dll avoid this requirement?
>
>2.) Can I use checkuser.dll on 2003/xp machines even though you say it is NOT required (mostly so I just use the same type call and not checkuser.dll on 2000 machines and loginuser() other times)?
>
>Thanks in advance,
>
>Kevin
>2.)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform