PDA

Click to See Complete Forum and Search --> : [RESOLVED] I have a computer name, can I see who is logged on?


Ecniv
Sep 14th, 2005, 05:03 AM
Hi,

I do not think this is possible without Admin permissions, but I thought it would be nice to try.

I have computer names on this network at work, via ldb files. Is there an API call or some way to find out who is logged on at the machine in question?
Like when you pres ctrl+alt+del it has <domain>/<user> on the screen. Surely someone could see this, but I am thinking that it might be breaking security on the network, so I am in doubt as to whether I could get this.

Any pointers to websites with info or the names of useful API calls etc please :)
Or a note to say 'no it is not possible' :)

Thanks in advance

MalcolmCarmen
Sep 14th, 2005, 02:19 PM
I am going out on a limb here with my initial assumption - first, I am sure that the whatever protocol manages window's groups & user logins probably has a specification for encryption.

The thing I'd be more "worried" about is that any decent network is switched (as opposed to be "hubbed") and you wouldn't be able to spy on logged in users anyway. However, maybe you can already see these users online in your workgroup?

Just making an ill-informed speculation ;)

si_the_geek
Sep 14th, 2005, 04:21 PM
I can't remember if it was ever solved or not, but WokaWidget was playing around with this kind of thing a while back here (maybe a year or two ago)... if anybody could do it, I'd guess it would be him - and his code will still be with his posts ;)

Ecniv
Sep 15th, 2005, 03:31 AM
Thanks n thanks :)

A colleague here gave me a link to :
Information/batch file (http://www.jsifaq.com/SUBQ/tip8400/rh8433.htm) and
PSLoggedon (http://www.sysinternals.com/files/PsLoggedOn.zip) <-- on the first link as a psloggedon link

This does return who is logged on but in a dos window only :/

The source is available here (http://www.sysinternals.com/Utilities/PsLoggedOn.html) using an api call NetSessionEnum.

MS site is entirely unhelpful (vb wise) as the example and code is in C++... Same for vb api's site. :(

I did find another link to vb code, that sort of works (I am looking into it a little more today) here (http://www.andreavb.com/tip060001.html).

I will have a search for Wokas posts shortly. Thanks :thumb:

Edit:
For now, it doesn't appear to be working the way I want, so I am going to leave it and perhaps come back to it at a later stage.
Post up if you find a site that explains it in vb :) please :)

si_the_geek
Sep 15th, 2005, 08:03 PM
I thought it would be this thread (where Woka asked the question):
http://www.vbforums.com/showthread.php?t=144860

But it seems he posted the answer in the first post of a different thread:
http://www.vbforums.com/showthread.php?t=145192