Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SYS(0) returns full name?
Message
De
29/12/2015 14:27:59
 
 
À
29/12/2015 10:27:57
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01629376
Message ID:
01629400
Vues:
72
>Hey all,
>
>Saw something really weird in a table where we capture and store SYS(0) when a user inserts a new record in a table. If we have a user "John R. Smith", for example, his username should be "jsmith", and SYS(0) should return:
>
>{machine name} # jsmith
>
>But we have a user for for whom SYS(0) is returning:
>
>{machine name} # John R. Smith
>
>I have never seen anything like that before. I trust SYS(0), at times, to get a username to build email addresses, just as one example. I have not tested what our more general GetUserName() function (which uses the Windows API call to WNetGetUser()) returns for this person, but I assume it works OK.
>
>This person is accessing our Foxpro application through a Windows-virtualized session on a Mac (Parallels, I think), so I assume that has something to do with it. Does anyone else have experience with this? An internet search turned up zilch, though it is difficult to search for anything specific...

A Windows VM running on Parallels (or any other hypervisor) is a Windows computer. As such it will have its own local accounts, and may or may not be domain-joined in which case domain accounts may have local standard or admin privileges.

If you're seeing "John R. Smith" returned as part of SYS( 0 ), then it's most likely that's the user's logon name for that VM.

It may be that the user logs on to his Mac with the user name "John R. Smith" but the Mac account name is not accessible from the Windows VM. If that's the case maybe when he set up the VM he used the same user name for the initial local account.

If you're in a corporate environment where computers can/should be domain-joined this should not be an issue, as the user can be instructed to log on to the VM with an appropriate "jsmith" account. If accounts are strictly local, you may need to create a new one named "jsmith". If you'd like to preserve the existing "John R. Smith" profile on the VM, you can use the free ForensIT User Profile Wizard: https://www.forensit.com/downloads.html
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform