Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Authenticate user in the operating system
Message
 
 
To
08/10/2001 05:37:18
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00565368
Message ID:
00565413
Views:
24
Peter,
Unfortunately, LogonUser probably won't work for you. It requires that the user context executing it have rights to participate as part of the operating system. Rick Strahl uses this technique in his West Wind utilities. However, his utilities are used mostly within WebConnect and as such, operate under the system user for IIS (which can work as part of the OS).

I don't know how integrated your 98/ME are, but the following message gives an example of what you can do with NT/2000. See Message#449121 for an example of how you may be able to do what you want.

HTH.

>Hi Vlad!
>
>Thank you, LSA seems to be the way to approach the problem.
>
>Sorry if you took my reply personally, it wasn't my meaning. The reason that I don't question the customer is because they are about 1000 users nation wide in the application so I assume they have their reasons to work this way.
>
>Thanks again!
>/Peter Rosberg
>
>>Hi!
>>
>>You can try to search the windows scripting host or API functions. VFP do not have this functionality built in. For example, I just found "LogonUser" API function in MSND, but I'm not sure that only this function is enough (you will need also to know domain name etc.).
>>
>>HTH.
>>
>>
>>P.S. It is not my business too, but on your place I would like to explain customer that this is not needed, or at least have a little sense because user already logged onto the system. Of course, do this when customer is in good mood. And, of course, if you're not working in some military company where you receive tasks as orders. :)
>>
>>
>>
>>>It is not my business to question our customer's security policy. If they want to authenticate the user every time he/she starts an application in Windows my job is to solve the problem.
>>>
>>>We have received a specification from the customer in which they say that the system must work this way. So again, is there anyone that knows how this could be done?
>>>
>>>Any help is much appreciated
>>>/Peter Rosberg
>>>
>>>>Hi!
>>>>
>>>>Why authenticate user in the domain when he/she already logged into the system because running VFP app? Do you want protect applicatoin from running app by somebody when user gone to drink coffee? ;)
>>>>
>>>>>Hi Vlad!
>>>>>
>>>>>Thank you for your answer.
>>>>>
>>>>>I think I was a bit vague in my question. The thing I want to do is when the user enters username and password in our application I want to validate this in the domain.
>>>>>
>>>>>/Peter Rosberg
>>>>>
>>>>>>Hi!
>>>>>>
>>>>>>VFP application access VFP database through network, right?
>>>>>>Make a network share on the server machine. Grant users of this application sequrity rights to access that network share. In the VFP app use sys(0) to see what user is currently logged in. All other leave for system.
>>>>>>
>>>>>>The trick here is that user can access network resources only after user logon on the machine. The VFP database accessed through network is not exception here. When you need to disable certain features for certain users, just yse sys(0) VFP function to see what user is logged on currently, however for this you will require separate administrating module anyway, because you will not be able to add new configuring options to the system sequrity (like defining which users can access particular part of your application). Well you can organize this too, but this will not be so obvious and intuitive for administrators (make separate network share for each particular functionality in your applicaion that you want to disable for certain users. In application check if user have access to that share, if not - feature not available).
>>>>>>
>>>>>>>Does anyone have any idea how I can authenticate a user in 98/Me/NT 4/2000 from VFP6/VFP7?
>>>>>>>
>>>>>>>We have a customer with lots of users and they don't want to administer the user access in both our system and the operating system.
>>>>>>>
>>>>>>>Maybe someone can point me in the right direction.
>>>>>>>
>>>>>>>Thanks
>>>>>>>/Peter Rosberg
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform