vncpasswd 更新登录密码 如何设置短密码 空密码

本文介绍了如何在Ubuntu系统中使用vncpasswd命令更新VNC登录密码,包括设置超过6个字符的密码以及如何通过-f选项创建短密码或空密码。操作过程包括使用vncpasswd命令,理解其选项,并将生成的密文重定向到密码文件中以完成设置。

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.

评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

YasinLeeX

再来一杯西湖龙井。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值