Created
April 26, 2019 10:53
-
-
Save ansemjo/bc8eab91c8a680f214ebc7d5685b44a3 to your computer and use it in GitHub Desktop.
enable root autologin when starting a container with systemd init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drop-in override to fix and enable autologin in rootless containers with systemd init | |
# e.g.: | |
# | |
# podman run --rm -it \ | |
# -v .../container-systemd-autologin.conf:/etc/systemd/system/console-getty.service.d/override.conf:ro \ | |
# centos:latest /usr/lib/systemd/systemd | |
[Service] | |
ExecStart= | |
ExecStartPre=-/usr/bin/sed -i '/pam_loginuid.so/d' /etc/pam.d/login | |
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud console 115200 38400 9600 vt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example logging of launching a container with
systemd
as init: