Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Murphy
  Where is Ken Murphy?
 Springhill
 Canada
 Ken Murphy
 To: Toms
  Where is Toms?
 
 Hong Kong
 Toms
 Tags
Subject: RE: Check Nt password(just return .t. or .f. only)
Thread ID: 7467 Message ID: 113309 # Views: 2 # Ratings: 1
Version: Unknown Category: General VFP Topics
Date: Friday, November 17, 2006 3:17:08 AM         
   


> This is Toms Ng from Hong Kong(again).
> I have an existing program writing in VFP 6.0 running on NT. Everything is ok.
> I want to ask is it possible to check(just check only) the userid and password with WAPI or DLL.
> Before login the program, user need to input the USERID and PASSWORD.
> This kind of data is saved in user.dbf , now , i want to use the user's userid and password in NT to login my program.
> When users type his/her NT userid and password in my program , i pass this two parameter to the WAPI or DLL function and get the TRUE or FALSE signal , if TRUE , login , else retry.
> I just want to get the true or false signal(is the userid and password valid in NT). I dont need to retrieve the usreid and password(i know this is the security of NT , cannot retrieve password).
>
> Please give me some tips.
>
> Toms
>


Toms,

What are you trying to achieve here? All you normally need do is identify the user. SYS(0) or GETENV([USERNAME]) will do this for you. NT will know if that user has access to what ever it is you are looking at. It sounds as if you are attempting to determine if the user has read permissions before he/she attempts to read something. If the user does not have permission, a FOPEN() will fail. Just try to FOPEN([Path2\FileName.Ext],10) for read permission or FOPEN([Path2\FileName.Ext],12) for read/write permission. If the function returns a positive integer as a file handle, your user has permission. If FOPEN() returns -1, the user does not have permission. (Don't forget to FCLOSE() it if your FOPEN() succeeds.)

Ken
You shall know the truth - and the truth shall set you free. (John 8:33)

ENTIRE THREAD

Check Nt password(just return .t. or .f. only) Posted by Toms @ 2/12/2002 9:25:18 AM
RE: Check Nt password(just return .t. or .f. only) Posted by Simon Arnold @ 2/12/2002 10:38:41 AM
Follow up. Posted by Simon Arnold @ 2/12/2002 10:47:43 AM
RE: Follow up. Posted by CJ moore @ 2/12/2002 10:54:52 AM
RE: Follow up. Posted by Paul Brown @ 2/13/2002 10:47:50 AM
RE: Follow up. Posted by Mike Gagnon @ 11/17/2006 12:05:12 AM
RE: Check Nt password(just return .t. or .f. only) Posted by Alexander Golovlev @ 2/14/2002 1:03:24 PM
RE: Check Nt password(just return .t. or .f. only) Posted by Ken Murphy @ 11/17/2006 3:17:08 AM
RE: Check Nt password(just return .t. or .f. only) Posted by Bernard Bout @ 11/17/2006 4:11:30 AM