Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Domain userid vs. local userid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00853287
Message ID:
00853437
Vues:
22
Unfortunately, this returns the same user info as Sys(0). Let me give you the scenario.

This workstation has a local user set up called User1. The workstation is Work1. The server is named Server1 and has a user defined in its domain called User2.

I log into the workstation as User1. I then connect to Server1 as User2. So, according to my Windows workstation I'm User1 ... according to the server I'm User2.

I then launch a VFP program on the server that does the following:
? Sys(0)
oWSHNet = CREATEOBJECT('Wscript.Network')
? oWSHNet.ComputerName
? oWSHNet.UserName
What I get is:
Work1 # User1
Work1
User1
Somehow, I need to be able to tell that the user is connected to Server1 as User2.

>Probably this is what you need:
>
>oWSHNet = CREATEOBJECT('Wscript.Network')
>?oWSHNet.ComputerName, oWSHNet.UserName, oWSHNet.UserDomain
>
>
>>Our in-house enterprise application has user-based security. We currently use a third-party routine to pull the user's login name from our Novell file server. In other words, how they've logged into the server (not their local machine) is what determines their permissions within the app.
>>
>>Our networking guys are trying to rid us of the Novell server and the p2p networking and move to a MS domain model. We will no longer be able to use the third-party routine to pull the login name.
>>
>>I've seen a number of threads showing how to pull a user's loginid using sys(0) or to check that their username and password are correct in the domain but I've not seen a way to actually grab the userid that they used to log into the domain.
>>
>>If a user were to set up a user account on their local machine and log into their local machine then turn around and manually log into the domain as themselves, I believe that sys(0) would return the username & id of their local login rather than their domain login. This would in essence give the user the ability to spoof their login and gain permissions in our app that they should not normally have.
>>
>>Is there any way to find out who they've logged in as on the domain?
>>
>>Thanks so much for your help!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform