XP Remote Desktop - any way of knowing if session is in use?

Associate
Joined
22 Oct 2002
Posts
172
Location
The bowels of student hell.
Hi people,

we have quite a big problem at work whereby there's loads of us needing to connect to remote machines all the time using RDP. We all log onto these machines with the same username and pass, so session-stealing is a big problem. This is because you never know if anyone else in the building is currently logged on and doing any work on the same machine. It can get very frustrating.

So now to my question...... does anyone know if it's possible to somehow check if there is a free session going BEFORE you connect using RDP? Without connecting to the console session and running tsadmin? Of course - this doesn't include standing up and shouting "OI YOU SLAGS - WHICH ONE OF YOU IS CONNECTED TO <#####> ?" lol ;)
 
press ctrl, alt and del once and look at the users tab, tells you what users are logged into the workstation wether or not its remotly or locally.
 
zen62619 said:
press ctrl, alt and del once and look at the users tab, tells you what users are logged into the workstation wether or not its remotly or locally.

Sorry maybe I was a bit unclear.... I need to be able to tell if there is somone using the session I'm about to log on to from a remote machine. I.E:

1) My PC ------<vpn> ------------> Remote PC

2) My PC ---"is session in use?" ---> Remote pc

3) My PC <------"no"--------------- Remote PC

4) My PC -----------connect------> Remote PC

else.....

5) My PC ------ don't connect-----> Remote PC


I don't think it's possible but i thought I'd ask.
 
DeathByMonkey said:
Sorry maybe I was a bit unclear.... I need to be able to tell if there is somone using the session I'm about to log on to from a remote machine. I.E:

1) My PC ------<vpn> ------------> Remote PC

2) My PC ---"is session in use?" ---> Remote pc

3) My PC <------"no"--------------- Remote PC

4) My PC -----------connect------> Remote PC

else.....

5) My PC ------ don't connect-----> Remote PC


I don't think it's possible but i thought I'd ask.

It would just create another session and log the other user off. Theres no way to see if there is already someone on that session that I'm aware of.
 
zen62619 said:
It would just create another session and log the other user off. Theres no way to see if there is already someone on that session that I'm aware of.


Yeah thought so. That's the problem though - you just log on gung ho and kick someone off and then hear an angry voice across the office "who stole my bloody session!!!???" lol. Never mind, thx anyway
 
zen62619 said:
It would just create another session and log the other user off. Theres no way to see if there is already someone on that session that I'm aware of.

It will not do this though - not with windows xp. XP only allows one remote desktop session to be active. (unless you mod the system files... which isn't advisable as it has many side effects especially if it is on a domain.)

The only way is to be sat at the machine and check, or to use the tsadmin method. - Or speak to the numerous people before hand!?

Alex
 
You could always try VNC - this allows you to limit the sessions/kick user off/share sessions

Just my £0.02 worth
 
isn't there an option to allow multiple sessions on the same machine? If not I believe vnc typically offers the ability for multiple sessions.
 
VNC isn't really an option as remote desktop is just 'the way it is' at our place. All our clients are set up with 2 available sessions plus the console session. Some are set up so that you cannot log in if both sessions are currently in use - "maximum number of sessions exceeded" error when logging in - and some of them do not have this setting, so you can just steal a session that is currently in use.

It's not really a major thing, I just wanted to satisfy my curiosity that it was not possible to tell (via my own pc) that the remote computer's sessions are in use before trying to connect and potentially stealing a colleagues session.

Thanks for your replies anyway.

Keep it awesome guys, :-p
 
The only thing I can think of is if you offer "Remote Assistance" to the PC in question it will tell you the user, if any, currently logged on. If no user logged on away you go. (Assuming remote assistance is allowed on the remote PC's)
 
Assuming that your connecting to Server 2003, you could install the adminpak.msi on your local machine and use tsadmin to remotely view any open / idle sessions before you connect. Or am I reading this wrong?
 
Last edited:
just_grass said:
It will not do this though - not with windows xp. XP only allows one remote desktop session to be active. (unless you mod the system files... which isn't advisable as it has many side effects especially if it is on a domain.)

The only way is to be sat at the machine and check, or to use the tsadmin method. - Or speak to the numerous people before hand!?

Alex

What I ment was it will log the new current user on with that username and then log the other user off who is using it.
 
aix0 said:
Assuming that your connecting to Server 2003, you could install the adminpak.msi on your local machine and use tsadmin to remotely view any open / idle sessions before you connect. Or am I reading this wrong?


Downloaded this app.... it looks promising but it only shows me using the priveledges I am looged on with on my own local machine. Now, these ARE administrator priveledges, but the username and pass won't work on the remote machine (and thus are NOT admin priveledges on the remote machine). Is there any way to run adminpak with a specific username and password?


To make it clearer, at work we have a server in the building that we connect to to do work. When we log in, we use the same username and pass as our local machines, but do not have admin priveledges on the server. If I run tsadmin on this session it just shows me my own logon session. If i make a separate remote desktop session using the admin user and pass and THEN run tsadmin, I see EVERYONE's session, including my own.

So, when I run adminpak on my local machine, using my local username and pass, i look onto the server and only see my own session. What I need to be able to do is run adminpak with the server admin user and pass, and I think then it would show everyone's sessions.

I then presume the same would happen over a vpn to a remote clients machine (use adminpak with the remote admin user and pass to see all open sessions on the remote machine).

Tell me if I'm being a donk here :D
 
Are you in a domain enviroment?

edit:

What you need to do is, locate the Terminal Services Manager console icon and hold the shift key whilst right clicking it. This will bring up the rick click context menu and the second option from the top should be "run as".

This should open up a login box, from, this you need to select the second option "The following user" and enter *DOMAINNAME*\administrator in the username field and whatever in the password field. See if that works.
 
Last edited:
aix0 said:
What you need to do is, locate the Terminal Services Manager console icon and hold the shift key whilst right clicking it. This will bring up the rick click context menu and the second option from the top should be "run as".

This should open up a login box, from, this you need to select the second option "The following user" and enter *DOMAINNAME*\administrator in the username field and whatever in the password field. See if that works.

Damn! This is exactly what I was looking for before. Unfortunately it doesn't seem to work. I tried using the domain our server runs on and using the admin pass for that, but it cant seem to authenticate.

Fell at the final hurdle... :'( doh!
 
Is your PC not a member of the domain?

edit:

Do you get anything, if you do this at a CMD prompt?

C:\query session /server:*SERVERNAME*
 
Last edited:
aix0 said:
Is your PC not a member of the domain?

edit:

Do you get anything, if you do this at a CMD prompt?

C:\query session /server:*SERVERNAME*


Run-as doesnt seem to work..... I am currently logged onto a domain, lets call it AAAA as user "user".

so if i do run-as, it gives the option of logging on as current user (AAAA\user) or as someone else. If i choose someone else, and type AAAA\user I get an incorrectuser/pass error... weird eh? :-s

the query command is not found when I try to run it.

Thanks for your help by the way.
 
The query command should be just what you're looking for! If it wont work, try this;

Click here and download the file (query.exe) to c:\windows\system32. Then go back to the CMD line and retry that command. I'm 99% certain that this will solve your problem.

Let me know how you go on.
 
An NBTSTAT will tell you the names of people logged in assuming that you can reach the machine on the usual MS ports, and nobody has been clever and locked down netbios etc. Failing that have you considered installing openSSH for windows on the machine? It basically gives you a command prompt where possibly you could query who is logged in?
 
Back
Top Bottom