Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Turn auto-login on for LXC created with root password? #2558

Answered by tteck
ThiSaadeh asked this question in Q&A
Discussion options

You must be logged in to vote

yes, copy/paste, hit enter

GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
mkdir -p $(dirname $GETTY_OVERRIDE)
cat <<EOF >$GETTY_OVERRIDE
  [Service]
  ExecStart=
  ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
EOF
systemctl daemon-reload
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ThiSaadeh
Comment options

@jtcleek
Comment options

@enter360
Comment options

@netgabo
Comment options

@tteck
Comment options

Answer selected by ThiSaadeh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants