How to Change VNC Password Using Linux?

It does not matter where you are located, anyone can access your computer remotely over the internet and use it. Nowadays, sharing a computer screen is the most common task, especially for IT experts. For this purpose, there are various sharing apps accessible on all platforms like Mac, Windows, and Linux. 

VNC stands for Virtual Network Computing is the most frequently used application for Linux users that allows you to share your Linux machine with others. As Linux is a security-optimized OS, it does not grant access to an anonymous user without authentication. For authentication, a VNC server password is utilized. However, the VNC password can be changed or reset if there is any need.

Today, this guide aims to provide possible ways to change your VNC server password using Linux.

Content Covered:

  1. What is a VNC Server Password?
  2. How to Change VNC Server Password Using Linux?
  3. Method 1: Using RealVNC Server App (GUI)
  4. Method 2: Using vncpasswd Command (CLI) 
  5. Method 3: Using passwd File 
  6. How to Configure Multiple VNC Password Users?
  7. How Do I Find My VNC Password?
  8. How to Setup/Config VNC Server Password on Linux?
  9. How to Change VNC Account Password?
  10. Finishing Tutorial

Note: For the installation and configuration of VNC server on Linux, read our comprehensive guide on How to install and configure VNC on Ubuntu.

What is a VNC Server Password?

As already said, the VNC server password is the password that is required to authenticate the user to access the Linux sharing screen. So that only the authorized user has access to your Linux machine. Access to the Linux machine varies based on the permissions given. 

How to Change VNC Server Password Using Linux?

To change the RealVNC server password, there are three possible ways to be considered. It can be done by using the RealVNC app (GUI method), the “vncpasswd” command (CLI), or the “passwd” file. Let us deep dive into these methods.

Note: We are using the RealVNC server app to change the VNC server password.

Method 1: Using RealVNC Server App (GUI)

The easiest way to change the VNC server password is from the RealVNC server app. To do so, the following instructions are utilized: 

Step 1: Launch RealVNC App 

Open your RealVNC app on your Linux machine and you will find the “Change password” option under “Authentication”. Simply click on it:

Step 2: Change VNC Password

You will be prompted to change the VNC password, type the new password, confirm, and hit “OK”:

Now, open the RealVNC server from the source machine and connect it by using the updated password and hit the “OK” button:

That is all from the first method.

Method 2: Using vncpasswd Command (CLI) 

Another method to change the RealVNC server password is by using the “vncpasswd” command. Simply, type the “vncpasswd -user” command in the terminal and you will be asked to set the password. Type your desired password and retype it to verify. Doing this will change your RealVNC server password. Check out the below execution:

vncpasswd -user

Moreover, if you have forgotten your RealVNC server password, you can use this method to reset the password.

Method 3: Using passwd File

RealVNC server password is stored in the “passwd” file located under the hidden directory named “.vnc”. You can access the “passwd” file and change your password inside it. For this, have a quick look at the 2-step instructions. 

Step 1: Open .vnc Folder

Open your Linux terminal and move to the “.vnc” directory with the help of the “cd” utility. Once moved, hit the “ls” command to list the directory content:

cd .vnc
ls

From the above output, you will see the “passwd” file which stores your VNC server password.

Step 2: Access passwd File

Open the passwd file with any editor like nano and check the stored password:

nano passwd

You can change the VNC password in this file (passwd) and save it by pressing “Ctrl+X”.

How to Configure Multiple VNC Password Users?

As the RealVNC server requires a premium subscription to use, its professional or enterprise subscription allows to set three kinds of passwords. These include:

  • Standard User
  • Administrative User
  • ViewOnly User

When the new user is created for the VNC password, the user will be asked to assign a specific type of user password.

How Do I Find My VNC Password?

To find your VNC server password, access the “passwd” file inside the hidden directory “.vnc”. Navigate to your “.vnc” folder and open the “passwd” file to view your RealVNC server password. We have explained in Method 3. 

How to Setup/Config VNC Server Password on Linux?

To set up/configure the VNC server password in Linux, consider the “vncpasswd” command. It will reset your previous password if there is any and set the new password. To do this, check the Method 2 in the article. 

How to Change VNC Account Password?

If your concern is changing the VNC account password. Let’s walk in the provided instructions to do so: 

Step 1: Open RealVNC Viewer

Open your RealVNC Viewer app, click on your account name, and press “Manage account online” from the drop-down: 

Step 2: Open Account Security Settings

You will be reiterated to your browser, press the account name drop-down at the upper right corner and open the “Security” settings:

Step 3: Change VNC Account Password

On the “Security” settings page, press the “Change password” option:

Enter the old password and new password in the dialog boxes and hit the “Change” button. Make sure your password must be at least 8 characters long and difficult to guess:

By performing the above steps, the password for your VNC account will be changed.

Finishing Tutorial

To change your VNC server password, open your RealVNC server app and press the “Change password” option under the “Authentication” section. Otherwise, use the “vncpasswd -user” command in the terminal and reset/change the VNC server password. Or open the “passwd” file under the hidden directory “.vnc” to view the VNC server password or change the password and save the file. This guide has enlightened the possible methods to change the VNC password using Linux.