Discussion:
An Idea: Logout from server.
Lorenzo Capanna (SysAdmin)
1998-09-22 08:38:07 UTC
Permalink
We are trying to use VNC in this manner:

The user in a client machine connect a NT server (or workstation) at the
logon banner, then login into the server with username and password.
The user finally logout and then disconnect from VNC.

This seem to work except for one case:
if the user disconnect from VNC before logout from the
server the next user connect the VNC server with in the
last logged in desktop.

It would be useful that the VNC server force the logout of
the current user when a vnc client disconnect from it.

Please tell me what you think (and pardon for my english).

Lorenzo Capanna


---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
dave w capella
1998-09-22 09:30:52 UTC
Permalink
Post by Lorenzo Capanna (SysAdmin)
The user in a client machine connect a NT server (or workstation) at the
logon banner, then login into the server with username and password.
The user finally logout and then disconnect from VNC.
if the user disconnect from VNC before logout from the
server the next user connect the VNC server with in the
last logged in desktop.
It would be useful that the VNC server force the logout of
the current user when a vnc client disconnect from it.
i can see where this would be a useful feature when several users
are trying to use/administer a server remotely. however, it sounds
to me like a user education issue. (IMHO) if one is connected to a
secure server, one should log out before disconnecting.

in your case, an auto-logout feature might be helpful. but for me,
it would be a nuisance. my servers are locked in my office w/all the
monitors turned off, and the keyboards piled out of the way. since
i alone administer the servers, i set up a useful desktop, and leave
it to be accessed from any client on the net. this is very useful for
me, very fast, and only possible because of the way vnc currently works.

on those servers that i share admin responsibilities, i simply logout
before disconnecting. (i also try to ensure that no other admin is
sitting at the console when i connect.)

my 2 cents,
...dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dave w capella mailto:***@cornell.edu
Facilities Management http://wizard.fac.cornell.edu/
Cornell University 607-255-7792

---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
James [Wez] Weatherall
1998-09-22 09:58:09 UTC
Permalink
Post by Lorenzo Capanna (SysAdmin)
The user in a client machine connect a NT server (or workstation) at the
logon banner, then login into the server with username and password.
The user finally logout and then disconnect from VNC.
if the user disconnect from VNC before logout from the
server the next user connect the VNC server with in the
last logged in desktop.
It would be useful that the VNC server force the logout of
the current user when a vnc client disconnect from it.
Oddly enough, this feature is already present in WinVNC (3.3.2 R2). It
isn't documented, because after some testing it didn't seem very useful.

If you edit the HKEY_LOCAL_MACHINE/Software/ORL/VNC/LockSetting value in
the registry (it needs to be a DWORD) and set it to 2, then you will get
the desired effect. The settings are supposed to be:

0 - normal behaviour
1 - LockWorkstation on disconnect
2 - LogOff on disconnect

Sadly, the LockWorkstation function isn't yet present in NT, so only
settings 0 and 2 exist.

Hope that helps,

James "Wez" Weatherall
--
Olivetti & Oracle Research Laboratory, Cambridge, UK.
Tel : Work - 343000


---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
Lorenzo Capanna (SysAdmin)
1998-09-22 11:13:29 UTC
Permalink
Post by James [Wez] Weatherall
Post by Lorenzo Capanna (SysAdmin)
The user in a client machine connect a NT server (or workstation) at the
logon banner, then login into the server with username and password.
The user finally logout and then disconnect from VNC.
if the user disconnect from VNC before logout from the
server the next user connect the VNC server with in the
last logged in desktop.
It would be useful that the VNC server force the logout of
the current user when a vnc client disconnect from it.
Oddly enough, this feature is already present in WinVNC (3.3.2 R2). It
isn't documented, because after some testing it didn't seem very useful.
If you edit the HKEY_LOCAL_MACHINE/Software/ORL/VNC/LockSetting value in
the registry (it needs to be a DWORD) and set it to 2, then you will get
0 - normal behaviour
1 - LockWorkstation on disconnect
2 - LogOff on disconnect
Sadly, the LockWorkstation function isn't yet present in NT, so only
settings 0 and 2 exist.
Hope that helps,
James "Wez" Weatherall
Thanks a lot it works fine..

Lorenzo Capanna


---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
Simon Byles
1998-09-24 11:39:34 UTC
Permalink
Post by James [Wez] Weatherall
0 - normal behaviour
1 - LockWorkstation on disconnect
2 - LogOff on disconnect
Sadly, the LockWorkstation function isn't yet present in NT, so only
settings 0 and 2 exist.
Thanks. Auto logoff could be quite useful. Any idea though when option 1
will be implemented? This would be so much more useful for those of us
using VNC to remotely administer servers. Often I don't want to log off
each time I connect/reconnect, when I'm just opening VNC to check the
progress of a job. But if I'm not logging off I always want to lock the
workstation.

Simon.

---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
James [Wez] Weatherall
1998-09-24 11:54:28 UTC
Permalink
Post by Simon Byles
Thanks. Auto logoff could be quite useful. Any idea though when option 1
will be implemented? This would be so much more useful for those of us
using VNC to remotely administer servers. Often I don't want to log off
each time I connect/reconnect, when I'm just opening VNC to check the
progress of a job. But if I'm not logging off I always want to lock the
workstation.
I haven't found any way of locking the workstation on WinNT 4 as yet. NT5
will have a function to do it, according to the docs.

So option 1 isn't likely to be implemented any time soon, unless someone
knows a good way of doing it - anyone know how locked screen-savers work?

Cheers,

James "Wez" Weatherall
--
Olivetti & Oracle Research Laboratory, Cambridge, UK.
Tel : Work - 343000


---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
Simon Byles
1998-09-24 12:31:34 UTC
Permalink
Post by James [Wez] Weatherall
I haven't found any way of locking the workstation on WinNT 4
as yet. NT5
will have a function to do it, according to the docs.
So option 1 isn't likely to be implemented any time soon,
unless someone
knows a good way of doing it - anyone know how locked
screen-savers work?
Thanks James, that's a shame. There has to be a way because PCAnywhere
offers both options, but I'm afraid I'm not a programmer myself and
don't know what the method could be. Perhaps someone on the list does
though? ::hopes::

Simon.

---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
Donnelly, Mark J.
1998-09-24 15:20:16 UTC
Permalink
Hey:

How about as a kludge you send the necessary keystrokes... VNC is already
set up to do that, so you would only have to code up a dialog for the server
(accessible off the settings dialog) which specifies the key sequence to
execute.

For example, the key sequence on my NTWS would be C-A-D, followed by a
return (I have the Novell integration, and I can't remember if that changed
the sequence or not). So, when the VNC Server gets a disconnect, it would
then send the locally-saved sequence to initiate a station lock.

Other than that, the only references (other than LockWorkStation, the NT5
function) that I found in MSDN regarding locking a workstation are in the
GINA stuff (replacing WinLogon) in MSDN under:

Specifications -> Windows NT Security: Replacable Winlogin user interface

If you want to invoke a screensaver and call it fine (I'm not sure if this
will work though), you can issue a WM_SYSCOMMAND with a wParam of
SC_SCREENSAVE, and DefWndProc should hopefully take care of it for you.

Hope some of this helps,
--Mark Donnelly

-----Original Message-----
I haven't found any way of locking the workstation on WinNT 4 as yet. NT5
will have a function to do it, according to the docs.

So option 1 isn't likely to be implemented any time soon, unless someone
knows a good way of doing it - anyone know how locked screen-savers work?

---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
Simon Byles
1998-09-25 09:20:00 UTC
Permalink
A reader of the list sent me the code snippet below. Thought I should
forward it.

Simon.
Post by Lorenzo Capanna (SysAdmin)
----------
From: Paul Mauriks
Sent: 25 September 1998 01:16
To: 'Simon Byles'
Subject: RE: An Idea: Logout from server.
#define SC_SCREENSAVE 0xF140
#define WM_SSYSCOMMAND 0x0112
puts("Starting Screen Saver...");
PostMessage(ScreenHandle(),WM_SYSCOMMAND,SC_SCREENSAVE,0);
PostMessage(pHwnd,pMsg,pWParam,pLParamLo,pLParamHi)
{
return( va_arg() == 4
?
DynamicLink("USER32","PostMessageA",STDCALL,pHwnd,pMsg,pWParam,pLParam
Lo
)
: PostMessage(pHwnd,pMsg,pWParam,(pLParamHi<<16)|pLParamLo)
);
}
It comes from that Wonderful Cmm scripting language "Scriptease" -
perhaps this stuff might be usefull to someone , because I'm not to up
to date with Windows Programming.
To me it looks like all thats required is to pass a message to a
Window
(presumably the desktop window) which is just a dll.
Hope that this stuff is helpfull
Post by Donnelly, Mark J.
-----Original Message-----
Sent: Thursday,24 September 1998 9:19
Subject: RE: An Idea: Logout from server.
James [Wez] Weatherall wrote on Thursday, September 24, 1998 11:50
Post by James [Wez] Weatherall
I haven't found any way of locking the workstation on WinNT 4
as yet. NT5
will have a function to do it, according to the docs.
So option 1 isn't likely to be implemented any time soon,
unless someone
knows a good way of doing it - anyone know how locked
screen-savers work?
Thanks James, that's a shame. There has to be a way because
PCAnywhere
Post by Donnelly, Mark J.
offers both options, but I'm afraid I'm not a programmer myself and
don't know what the method could be. Perhaps someone on the list
does
Post by Donnelly, Mark J.
Simon.
---------------------------------------------------------------------
Post by Donnelly, Mark J.
The VNC mailing list - see
http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
---------------------------------------------------------------------
The VNC mailing list - see http://www.orl.co.uk/vnc/intouch.html
---------------------------------------------------------------------
Continue reading on narkive:
Loading...