What you need to do is make the password different depending on what user account you 
use to create the VNC session.

For instance,

Linux account: user1
Linux password: user1-pwd

As root, I issue the command "su user1".  Then, as user1, I issue the command 
"vncserver :1".  If this is the first time I have ever run the command I will be 
prompted for the password.  I put in "user1-pwd".  Now there is a VNC session running 
on the Linux box on port 1.

Using the client, I connect to LINUXBOX:1.  It prompts me for a password.  The 
password will be the Linux password of user1.

So if you set it up this way, the only way someone could connect to your VNC session 
running on a specific port is if they know your Linux password (which they don't, 
because you follow good password protocols!).

What you don't want to do is have a generic VNC password that everyone knows for your 
Linux user account or (gasp) the root account.  Each user should have their own Linux 
account, with a VNC server session running on a specific port for that account with 
the VNC password the same as their login password.

C-ya
Chris



> -----Original Message-----
> From: Bruce Douglas [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 11, 2002 2:51 PM
> To: Christopher Tesla; [EMAIL PROTECTED]
> Subject: RE: logging out of display manager...
> 
> 
> ok...
> 
> another question... if I have created multiple VNC 
> sessions/displays such
> that I'm able to connect using a client. If I kill my client, 
> how do I stop
> someone else from being able to access my desktop if they 
> connect to their
> vnc client using the same display number.
> 
> I ask this because it appears that when i setup the 
> vncserver, I give it a
> passowrd, which is also required for each client connecting 
> to the linux
> box. However, the password doesn't change, so anybody could access my
> desktop... assuming they know the vncserver password. Is 
> there a way to have
> "multiple" passwords, one each for a different display/user????
> 
> thanks...
> 
> bruce
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Christopher Tesla
> Sent: Wednesday, December 11, 2002 11:06 AM
> To: Bruce Douglas; [EMAIL PROTECTED]
> Subject: RE: logging out of display manager...
> 
> 
> This is not 100% true all the time, but...
> 
> If you go to your /tmp/.X11-unix directory there will be a 
> file for each
> server that is running.  For instance:
> 
> /tmp/.X11-unix
> ls -a
> X0
> X1
> X2
> X3
> X4
> 
> Means you have a VNC server running on ports :0 :1 :2 :3 :4
> 
> Again, I have had instances where the VNC server was down, 
> but the X file
> was still there.  But in most cases this will give you the 
> proper info.
> 
> C-ya
> Chris
> 
> > -----Original Message-----
> > From: Bruce Douglas [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 11, 2002 1:59 PM
> > To: Christopher Tesla; [EMAIL PROTECTED]
> > Subject: RE: logging out of display manager...
> >
> >
> > ok...
> >
> > Here's what should be a simple question.. but I can't seem 
> to find the
> > answer....
> >
> > Is there an easy way to determine which display device
> > numbers are in use at
> > a given time?
> >
> > Thanks...
> >
> > Bruce
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Christopher Tesla
> > Sent: Wednesday, December 11, 2002 10:29 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: logging out of display manager...
> >
> >
> > This is my process for starting VNC on my Linux box:
> >
> > 1) Telnet in the box
> >
> > 2)  I run a script, as root, that SUs as each user and starts
> > a VNC server
> > on different ports:
> >
> > su user1 -c "vncserver :1"
> > su user2 -c "vncserver :2"
> > su user3 -c "vncserver :3"
> > etc.
> >
> > 3)  Now each user can activate their client and connect to
> > SERVER:x where x
> > is the port number assigned to them.
> >
> >
> > Now, lets say that user2 makes some changes to her .twmrc
> > file (say, make
> > the background a different color).  That change will not take
> > appear until
> > the VNC server is restarted.  The way it works now:
> >
> > 1) I telnet into server
> > 2) I SU as user2
> > 3) I run "vncserver -kill :2"
> > 3) I run "vncserver :2"
> > 4) I exit SU
> > 5) I quit telnet
> >
> > Now the user can re-connect to their port (2) and they will
> > see the changes
> > they have made.  And actually, I have a script for each user
> > that does steps
> > 2-4 above.  So I just run "vncrestart-user2" as root and it
> > does it all for
> > me.
> >
> > What I want is a method for the user to perform steps 2-4 on their
> > own...without having to telnet into the server and run the
> > commands from the
> > shell.  But if user2 is connected via VNC and they run a
> > script that should
> > shut down their vnc session, wait, then restart it...the
> > restart command
> > never takes.
> >
> > I hope this answers your question, although it raises one of
> > my own!  :)
> >
> > > -----Original Message-----
> > > From: Bruce Douglas [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, December 11, 2002 1:06 PM
> > > To: Christopher Tesla; [EMAIL PROTECTED]
> > > Subject: RE: logging out of display manager...
> > >
> > >
> > > Chris,
> > >
> > > Thanks for your response.... But I'm still confused.... What
> > > should be the
> > > process for starting/using vnc...
> > >
> > > Should I :
> > >   1) SSH into the Linux box
> > >   2) Start the vncserver - keep this window running (and
> > > how do i know the
> > > correct display number)
> > >   3) Start my client
> > >   4) Kill the vncserver from the SSH term
> > >   5) Kill the SSH term
> > >
> > >   This effectively keeps a SSH Term running for the
> > > duration, while I'm
> > > running VNC Client. But it        also kills the VNC server when
> > > finished...
> > >
> > > OR...
> > >   1) SSH into the Linux box
> > >   2) Start the vncserver - create multiple windows, each
> > > with a different
> > > display number
> > >   3) Have the user(s) start their client(s)
> > >
> > >   But don't I still need to know how to stop/restart the
> > > VNC session on the
> > > Server. Otherwise, it     never gets released.
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On
> > > Behalf Of Christopher Tesla
> > > Sent: Wednesday, December 11, 2002 9:03 AM
> > > To: Bruce Douglas; [EMAIL PROTECTED]
> > > Subject: RE: logging out of display manager...
> > >
> > >
> > > What I have tried to do is force VNC to restart the session
> > > using a command
> > > in the .twmrc menu called Restart.
> > >
> > > I have several VNC sessions running on a RedHat 7.2 server.
> > > I want each
> > > user to be able to shutdown and restart their VNC connection
> > > if they want
> > > (for instance, if they make any changes to their shell settings).
> > >
> > > I thought that sending this command:
> > >
> > > vncserver -kill :1 | sleep 3 | vncserver :1
> > >
> > > would kill the VNC session running on port 1, wait, then
> > > restart the server
> > > on port 1.  Well, the kill command works fine, but the
> > > session never starts
> > > up again.
> > >
> > > I even tried sending the commands via su:
> > >
> > > su username -c "vncserver -kill :1 | sleep 3 | vncserver :1"
> > >
> > > but that did the same thing.
> > >
> > > The only way to make this work so far is I allow the users to
> > > Quit (not
> > > Restart) and then I start their session manually.  Very
> > > stinky, but the
> > > users don't restart their sessions too frequently.
> > >
> > > If anybody has any ideas, I would be happy to hear them.
> > >
> > > > -----Original Message-----
> > > > From: Bruce Douglas [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, December 11, 2002 11:41 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: logging out of display manager...
> > > >
> > > >
> > > > Hi...
> > > >
> > > > Relatively new to VNC.. I have the VNC server steup on a
> > > > Linux box. I have
> > > > it configured to use GNOME as the display manager. I'm able
> > > > to connect using
> > > > a client eith no problem. The issue I'm trying to better
> > > > understand has to
> > > > do with logging out or stopping the session of VNC on the
> > > > server. When I
> > > > logout of the session on the Linux box, (using the "Logout"
> > > > button from
> > > > GNOME), the screen seems to still leave a term window running.
> > > >
> > > > My question, is there a way to kill the session of the GNOME
> > > > display window,
> > > > without killing the vncserver? Or, do I not quite uunderstand
> > > > how to use
> > > > VNC. I assumed that once I had the VNC server running, I
> > > > could more or less
> > > > remotely log into the Linux bos, using VNC to remotely
> > > > display the desktop.
> > > > I'm really just looking for the right/correct way to shut
> > > > down/kill the
> > > > desktop.
> > > >
> > > > Also, if I want to allow multiple sessions/users to connect
> > > > to the Linux
> > > > box, do I have to start multiple sessions/display windows
> > > > during the initial
> > > > startup of VNC??
> > > >
> > > > Thanks
> > > >
> > > > Bruce Douglas
> > > > [EMAIL PROTECTED]
> > > > _______________________________________________
> > > > VNC-List mailing list
> > > > [EMAIL PROTECTED]
> > > > http://www.realvnc.com/mailman/listinfo/vnc-list
> > > _______________________________________________
> > > VNC-List mailing list
> > > [EMAIL PROTECTED]
> > > http://www.realvnc.com/mailman/listinfo/vnc-list
> > _______________________________________________
> > VNC-List mailing list
> > [EMAIL PROTECTED]
> > http://www.realvnc.com/mailman/listinfo/vnc-list
> _______________________________________________
> VNC-List mailing list
> [EMAIL PROTECTED]
> http://www.realvnc.com/mailman/listinfo/vnc-list
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list

Reply via email to