大网数据广告活动
服务器运维问答

Make No Password Required on local linux (tty) login

· 52CE 我爱测

I want to allow a user that is logging in to the system locally (ie. keyboard & mouse) to not have to enter a password. Is this possible? I have the system locked down extremely well with SSH, and it sits with me always, so I it …

问题原文

原帖链接 · ehiller · CC BY-SA 3.0

I want to allow a user that is logging in to the system locally (ie. keyboard & mouse) to not have to enter a password. Is this possible? I have the system locked down extremely well with SSH, and it sits with me always, so I it is not an issue.

已采纳解答

原帖链接 · Roman A. Taycher · CC BY-SA 3.0

This may be bad security but as noted if you have physical access to a non encrypted laptop you could get into the files and reset passwords with a linux live cd/usb or sometimes the grub menu lets you boot to recovery root and you can change the password.

Do you mean a virtual console or the default graphical console?

Login Settings (GNOME/KDE) should have option to boot to desktop without password.

For Virtaul Consoles

Arch linux has a guide which I think should work for other systemd distros.

https://wiki.archlinux.org/index.php/Automatic_login_to_virtual_console

run

systemctl edit getty@tty1

and put the following into the file

[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin username --noclear %I $TERM

I think that should let you autologin to the first console.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。