Score:1

systemd-nspawn can't auto login

in flag

I'm trying to config auto login for my nspawn container and I created /etc/systemd/system/[email protected]/autologin.conf and inside of that I wrote this config:

[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --noclear --keep-baud --autologin username - 115200,38400,9600 $TERM

but when I type machinectl login [CONTAINER NAME] it just got stuck in terminal, meaning: enter image description here What should I do to make this work? Any help would be appreciated!

Will Chen avatar
nr flag
I don't feel like digging into why it works, but changing the second command to `-/sbin/agetty --noclear --autologin root --keep-baud console 115200,38400,9600 $TERM` did it for me with Debian. Source: https://ixday.github.io/post/systemd_nspawn. Also, apparently that's what the Arch Wiki *used* to say, before switching to the command you tried: https://unix.stackexchange.com/a/584311. Oh, also the `@`'s not in the examples.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.