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

How do I disable automatic login in a debian live (standard) image?

· 52CE 我爱测

I'm doing a big thing , and I need to disable the automatic login on a debian live image. I've copied the filesystem.squashfs from the debian live standard iso, and extraced it: $ cd /var/www/html/os/debian/10.5L $ sudo mkdir squ…

问题原文

原帖链接 · rudepeople · CC BY-SA 4.0

I'm doing a big thing, and I need to disable the automatic login on a debian live image.

I've copied the filesystem.squashfs from the debian live standard iso, and extraced it:

$ cd /var/www/html/os/debian/10.5L
$ sudo mkdir squashfs-temp
$ cd squashfs-temp
$ sudo unsquashfs /var/www/html/os/debian/10.5L/filesystem.squashfs
$ sudo chroot /var/www/html/os/debian/10.5L/squashfs-temp/squashfs-root/
$ sudo mkdir -p /var/www/html/os/debian/10.5L
$ sudo mount -o loop -t iso9660 /ISO/debian-live-10.5.0-amd64-standard.iso /mnt/loop
$ sudo cp -R /mnt/loop/* /images/os/debian/10.5L
$ sudo umount /mnt/loop
$ sudo cp /images/os/debian/10.5L/live/filesystem.squashfs /var/www/html/os/debian/10.5L
$ cd /var/www/html/os/debian/10.5L
$ sudo mkdir squashfs-temp
$ cd squashfs-temp
$ sudo unsquashfs /var/www/html/os/debian/10.5L/filesystem.squashfs
$ sudo chroot /var/www/html/os/debian/10.5L/squashfs-temp/squashfs-root/

For my project to work, I need to disable automatic login and set an admin password. the problem is, I've looked at the usual locations:

/etc/systemd/system/getty.target.wants/[email omitted]
/etc/systemd/logind.conf

Neither appear to have the typical autologin settings. Additionally, this is the standard image, so there's no GUI, ergo no DM config files to edit (that I'm aware of/can find)... so where is the config that sets the image to automatically log in on boot?

已采纳解答

原帖链接 · Christopher H · CC BY-SA 4.0

You can set the option live-config.noautologin in a configuration file.

Configuration files can be placed either in the root filesystem itself (/etc/live/config.conf and/or /etc/live/config/*), or on the live media (live/config.conf and/or live/config/*). If both places are used for a certain option, the ones from the live media take precedence over the ones from the root filesystem.

If you do use config files, you need to use the boot=live parameter.

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

资料来源与适用范围

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

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

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