How to change VNC Server password on Linux

I was recnetly asked how to reset a password for VNC Server on a Linux machine.
For those that would also like to know here is how I did it.

You can either connect to the machine remotely over an ssh program like putty or you can do this directly from the terminal.

Open up a command prompt for the user that you have vnc server running as.
Then type

vncpasswd


You will then be prompted to enter a new password twice. Choose your new vnc server password and then restart the vncserver service using the following command.

service vncserver restart


The above commands work when run as the root user on Centos but should work similarly on most other variation of Linux.

Hope this helps.

Labels: ,