首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >任何随机密码都会导致在tty上成功登录。

任何随机密码都会导致在tty上成功登录。
EN

Unix & Linux用户
提问于 2013-07-16 09:01:25
回答 1查看 657关注 0票数 6

我可以登录到我的机器(FreeBSD 9.1-版本)为任何用户(例如:rootoperator或任何存在于/etc/passwd中的任何)使用任何随机密码,我键入.

我试图用root重新设置passwd密码,但是如果我尝试登录,我可以用我输入的任意密码登录.真奇怪。

只有当我直接从tty登录时,这才有效。当尝试通过SSH登录时,一切都是应该的--我需要给出正确的密码才能登录。怎么解决这个问题?

编辑:/etc/ttys的内容:

代码语言:javascript
复制
# name  getty                           type    status          comments
#
# If console is marked "insecure", then init will ask for the root password
# when going to single-user mode.
console none                            unknown off secure
#

console none                            unknown off secure
#
ttyv0   "/usr/libexec/getty Pc"         xterm   on  secure
# Virtual terminals
ttyv1   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv2   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv3   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv4   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv5   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv6   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv7   "/usr/libexec/getty Pc"         xterm   on  secure
ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure
# Serial terminals
# The 'dialup' keyword identifies dialin lines to login, fingerd etc.
ttyu0   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu1   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu2   "/usr/libexec/getty std.9600"   dialup  off secure
ttyu3   "/usr/libexec/getty std.9600"   dialup  off secure
# Dumb console
dcons   "/usr/libexec/getty std.9600"   vt100   off secure
EN

回答 1

Unix & Linux用户

发布于 2013-09-04 08:38:41

编辑/etc/ttys,以便行:

代码语言:javascript
复制
console none                            unknown off secure

改为:

代码语言:javascript
复制
console none                            unknown off insecure

另外,您的配置中应该只有一个控制台行。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/83240

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档