brian_andrews
asked on
Determine NT User ID from Machine Name
Is there any way I can determine which network UserID is currently logged on to a particular machine based solely on the machine name?
nope.
the machine name has nothing to do with the current logged on user.
Will you be running the process on the machine in or on some other machine??
ASKER
What about the reverse...retrieving a machine name based on a network userid?
ASKER
A remote machine...
Check out
if on another machine try looking at this....
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/hh/network/ntlmapi2_6msv.asp
use NetWkstaGetInfo with WKSTA_INFO_102
You'll need to have privs for this...
Otherwise use GetUserName api.
if on another machine try looking at this....
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/hh/network/ntlmapi2_6msv.asp
use NetWkstaGetInfo with WKSTA_INFO_102
You'll need to have privs for this...
Otherwise use GetUserName api.
<<What about the reverse...retrieving a machine name based on a network userid? >> That's another question..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, this site provides a good example.
Super! VBNet is the site I always try first when I am stuck on something :-) Then I give www.planet-source-code.com a try ...
Good Luck!
Good Luck!