ubuntu中vnc的用户密码以加密形式保存在 ~/.vnc/passwd中。
修改密码可以用vncpasswd
ycli@AppSvr:~/.vnc$ vncpasswd
Password: 输入你的密码大于6个字符
Verify: 再输一遍
Would you like to enter a view-only password (y/n)? n 询问你是否要再输入一个只有观看权限而被禁止操作远程桌面的密码。一般我们都不需要这样的一个只能看屏幕的权限。所以此处输入n
如果你想要密码短一些,比如只想要4个字符或者密码为空,可以用一下所谓的的过滤模式 -f 参数,这破命令真是难以理解,看了半天文档也不懂,可能是我英语太差了。所以我把官网的文档粘过来了(下面标红的就是)。为此专门出国用google都没查到示例。后来硬摸索出来了,其实就是让你把生成的密文重新定向到密码文件中。。。如下操作即可:
ycli@AppSvr:~/.vnc$ vncpasswd -f > ~/.vnc/passwd
没有任何提示,你需要输入一次你的新密码并回车(要设置空密码就直接回车)
还是么有任何提示,再输入一遍密码并回车
好了完事了。
=============================以下是官方文档。
NAME
vncpasswd − change the VNC password
SYNOPSIS
vncpasswd [passwd-file]
vncpasswd −f
DESCRIPTION
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. |
A view-only password must be separated from the normal password by a newline character.
本文介绍了如何在Ubuntu系统中使用vncpasswd命令更新VNC登录密码,包括设置超过6个字符的密码以及如何通过-f选项创建短密码或空密码。操作过程包括使用vncpasswd命令,理解其选项,并将生成的密文重定向到密码文件中以完成设置。
5685





