- Vnc linux поменять пароль
- NAME
- SYNOPSIS
- DESCRIPTION
- FILES
- SEE ALSO
- AUTHOR
- vncpasswd — Man Page
- Options
- Files
- See Also
- Authors
- How to Change the VNC Password in Linux
- What is a VNC Password?
- How to Change the VNC Password.
- Where is the VNC Password stored?
- How to Remove the VNC Password.
- Author
- vncpasswd(1) — Linux man page
- Options
- Files
- See Also
- Authors
Vnc linux поменять пароль
NAME
vncpasswd - change a VNC password
SYNOPSIS
vncpasswd [passwd-file]
DESCRIPTION
vncpasswd allows you to set the password used to access VNC desktops. It stores an obfuscated version of the password in the given file (default $HOME/.vnc/passwd). The vncserver script runs vncpasswd the first time you start a VNC desktop, and invokes Xvnc with the appropriate -rfbauth option. vncviewer can also be given a password file to use via the -passwd option. The password must be at least six characters long, and only the first eight characters are significant. Note that the stored password is not encrypted securely - anyone who has access to this file can trivially find out the plaintext password, so vncpasswd always sets appropriate permissions (read and write only by the owner). However, when accessing a VNC desktop a challenge-response mechanism is used over the wire making it hard for anyone to crack the password simply by snooping on the network.
FILES
$HOME/.vnc/passwd Default location of the VNC password file.
SEE ALSO
vncviewer(1), vncserver(1), Xvnc(1) vncconfig(1), http://www.realvnc.com
AUTHOR
© 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.
vncpasswd — Man Page
vncpasswd allows you to set the password used to access VNC desktops. Its default behavior is to prompt for a VNC password and then store an obfuscated version of this password to passwd-file (or to $HOME/.vnc/passwd if no password file is specified.) The vncserver script runs vncpasswd the first time you start a VNC desktop, and it invokes Xvnc with the appropriate -rfbauth option. vncviewer can also be given a password file to use via the -passwd option.
The password must be at least six characters long (unless the -f command-line option is used— see below), and only the first eight characters are significant. Note that the stored password is not encrypted securely — anyone who has access to this file can trivially find out the plain-text password, so vncpasswd always sets appropriate permissions (read and write only by the owner.) However, when accessing a VNC desktop, a challenge-response mechanism is used over the wire making it hard for anyone to crack the password simply by snooping on the network.
Options
Filter mode. Read a plain-text password from stdin and write an encrypted version to stdout. Note that in filter mode, short or even empty passwords will be silently accepted.
A view-only password must be separated from the normal password by a newline character.
Files
Default location of the VNC password file.
See Also
Authors
Tristan Richardson, RealVNC Ltd., Antoine Martin, D. R. Commander and others.
VNC was originally developed by the RealVNC team while at Olivetti Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were implemented by Constantin Kaplinsky. Many other people have since participated in development, testing and support. This manual is part of the TigerVNC software suite.
How to Change the VNC Password in Linux
VNC stands for Virtual Network Computing. In Linux, VNC is a system that allows a computer user to control another computer remotely using a graphical interface. That is to say, VNC enables the user to interact with the Linux desktop using a keyboard and mouse of a different computer over a network.
We require a VNC password to authenticate a user to the VNC server, i.e., the application running on the remote computer. That is to say, an anonymous person will not be allowed access to the VNC server without verification.
Nowadays, recent Linux releases come with VNC in their installations. If you do not have VNC installed, follow these steps on How to Install VNC on Ubuntu. Now, let’s continue and look at how to change the VNC password in Linux.
What is a VNC Password?
A VNC password is used to authenticate a user to the VNC server. As a result, once a user is authenticated, they can remotely interact and control the desktop, keyboard, and mouse of another computer.
Your VNC password and the password you use to log in to your Linux computer are distinct entities. Therefore it is advisable to set your VNC password to be different from your Linux login password.
Further, let’s note that a user usually sets and can change the VNC password themselves. This password is generally encrypted. Similarly, a user can decrypt or delete it and replace it with another one. Deleting and replacing it is the option that is mainly recommended.
How to Change the VNC Password.
We use the VNC password command to set or change the VNC password in Linux. The VNC password is stored in an encrypted version. Also, ensure that you set a strong password so that the system is not accessed by unauthorized persons.
The vncpasswd command requests for a VNC password to access VNC desktops. It allows us to change a VNC password for security reasons. It is also advisable to change your password after every few months to lower the risk of someone obtaining it and gaining access to your system.
The vncpasswd command also lets us set the VNC password for the first time. It requests the password twice. The first password is the primary password.
Here is how to change the VNC password in Linux:
- Start by opening your Command Terminal by pressing Ctrl + Alt + T.
- Now, type the command vncpasswd
- Then, you will be prompted to enter your VNC password. If the password is below 6 characters, the output too short is seen as shown below:
If the password is more than 8 characters, the additional characters will be truncated. In other words, the extra characters will be ignored.
The second password is the read-only password. If it is too short, it will not be saved. It authenticates for view-only desktops.
- After that, you can choose to enter a view-only password by typing ‘y‘ for yes or ‘n‘ for no. When you select y, continue and enter a view-only password and then verify it.
Where is the VNC Password stored?
The VNC password is stored in the passwd file, which is usually in the .vnc folder by default. In other words, this is the location of the password when the VNC server runs for the first time.
If we run the command vncpasswd and get the alert VNC directory does not exist, it means that the .vnc folder and passwd file do not exist.
In the same vein, the vncpasswd command goes ahead and creates the hidden .vnc folder. You will be prompted to enter the password and verify it to create the folder and file successfully.
When you are done with that, you may want to view it.
Here is how you can check where the VNC password is stored using the graphical user interface.
- Begin by going to home.
- Then click View from the menu.
- After that, move your mouse and select Show Hidden Files. All hidden folders, which begin with a dot (.) are displayed.
- Finally, you will see the folder .vnc and when you open it, you will find the file passwd inside.
Here is how to view this same folder on Command Terminal.
- First, go to home by typing ‘ cd /home ‘.
- Then, type the command ls -a to view the hidden files. You will see the .vnc folder, among other hidden files and folders.
- With that out of the way, access the folder by typing ‘ cd .vnc/ ‘
- Lastly, type the command ls to view the files inside the folder. In this case, it’s the passwd file where the VNC password is stored.
For clarity, here is the default path where the VNC password is stored.
How to Remove the VNC Password.
We usually remove the VNC password to allow another one to be created or changed and then stored. To remove the passwd file which contains the VNC password, use the command below in your Command Terminal.
You can also remove the file using the graphical interface.
- Start by opening the home folder.
- Now, click View from the menu.
- Then, click Show Hidden Files.
- Then, click on .vnc folder to open.
- Finally, right-click on the file passwd and select Move to Trash.
You can confirm by checking in the .vnc folder that the file doesn’t exist anymore.
We’ve come to the end of our article. Certainly, remember that you should not share your VNC password with anyone because it gives them full control of your system. That means they can change important settings or even delete critical files.
In conclusion, we hope you have learned How to Change the VNC password in Linux. We also hope we helped you learn more about where the VNC password is stored. If you have any questions or suggestions, let us know in the comment section below.
If this guide helped you, please share it. 🙂
Author
Well-versed with most things Linux, and motivated to share whatever I’ve learned with the rest of the world.
vncpasswd(1) — Linux man page
vncpasswd allows you to set the password used to access VNC desktops. Its default behavior is to prompt for a VNC password and then store an obfuscated version of this password to passwd-file (or to $HOME/.vnc/passwd if no password file is specified.) The vncserver script runs vncpasswd the first time you start a VNC desktop, and it invokes Xvnc with the appropriate -rfbauth option. vncviewer can also be given a password file to use via the -passwd option.
The password must be at least six characters long (unless the -f command-line option is used— see below), and only the first eight characters are significant. Note that the stored password is not encrypted securely — anyone who has access to this file can trivially find out the plain-text password, so vncpasswd always sets appropriate permissions (read and write only by the owner.) However, when accessing a VNC desktop, a challenge-response mechanism is used over the wire making it hard for anyone to crack the password simply by snooping on the network.
Options
-f Filter mode. Read a plain-text password from stdin and write an encrypted version to stdout. Note that in filter mode, short or even empty passwords will be silently accepted.
Files
See Also
Authors
VNC was originally developed by the RealVNC team while at Olivetti Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were implemented by Constantin Kaplinsky. Many other people participated in development, testing and support.