We use a systemd-nspawn container to set up a test environment, among others. With F36 this is currently not workable for us because the login process is broken.
I set up a container as usual using dnf to create a container file system, e.g. using
[…]# dnf --releasever=36 --best --setopt=install_weak_deps=False \ --installroot=/var/lib/machines/testf36 install dhcp-client dnf \ fedora-release glibc glibc-langpack-en iputils less ncurses passwd \ systemd systemd-networkd vim-default-editor
I can set a password using
[…]# systemd-nspawn -D /var/lib/machines/testf36 passwd
I create a container with
[…]# systemd-nspawn -D /var/lib/machines/testf36 -b
The container starts fine and finally displays a login prompt. You can enter a name as usual. There follows no password prompt, but after a while it still displays a login prompt again.
The container even keeps running if I exit the login process (is shows up in machinectl).
It’s not a SELinux issue, the system was in permissive mode.
If I start a system service container using […]# systemctl systemd-nspawn@testf36 the container start fine, shows up in machinectl, but a […]# machinectl login testf36 produces the same phenomenon of repeated display of the login prompt without asking for the password. And […]# machinectl shell testf36 results in „Connection to machine testf36 terminated.“
== My questions: == * Does anyone has the same problem * or does anyone use a F36 systemd-nspawn container without such a problems? * Or did I miss a change, so I have to use a different procedure?
Several releases ago we had a similar issue because auf /etc/securetty, but that doesn’t exist anymore.
A F35 container works fine on a F36 host. But a F36 container doesn’t work on a F35 host either.
Peter Boy wrote on Tue, Jul 05, 2022 at 07:19:28AM +0200:
[…]# dnf --releasever=36 --best --setopt=install_weak_deps=False \ --installroot=/var/lib/machines/testf36 install dhcp-client dnf \ fedora-release glibc glibc-langpack-en iputils less ncurses passwd \ systemd systemd-networkd vim-default-editor
I can set a password using
[…]# systemd-nspawn -D /var/lib/machines/testf36 passwd
I create a container with
[…]# systemd-nspawn -D /var/lib/machines/testf36 -b
If you check the syslog of that machine (don't ask me how, I just straced agetty) you'll see it complain that there is no /bin/login: you just need to install util-linux (or possibly busybox) and you'll get a prompt, login should work as well.
Maybe it used to be pulled automatically before...
-- Dominique Martinet | Asmadeus
Am 05.07.2022 um 07:38 schrieb Dominique Martinet asmadeus@codewreck.org:
Peter Boy wrote on Tue, Jul 05, 2022 at 07:19:28AM +0200:
[…]# dnf --releasever=36 --best --setopt=install_weak_deps=False \ --installroot=/var/lib/machines/testf36 install dhcp-client dnf \ fedora-release glibc glibc-langpack-en iputils less ncurses passwd \ systemd systemd-networkd vim-default-editor
I can set a password using
[…]# systemd-nspawn -D /var/lib/machines/testf36 passwd
I create a container with
[…]# systemd-nspawn -D /var/lib/machines/testf36 -b
If you check the syslog of that machine (don't ask me how, I just straced agetty) you'll see it complain that there is no /bin/login: you just need to install util-linux (or possibly busybox) and you'll get a prompt, login should work as well.
Maybe it used to be pulled automatically before...
Thanks a lot! You saved my day!
in F35, util-linux was included as a dependency of one of my explicitly installed packages, but not in F36.
You gave me the idea to compare the package lists. There are significant differences in the list of dependencies, indeed.
But including just util-linux solved the issue.
Thanks again Peter
On Di, 05.07.22 14:38, Dominique Martinet (asmadeus@codewreck.org) wrote:
Peter Boy wrote on Tue, Jul 05, 2022 at 07:19:28AM +0200:
[…]# dnf --releasever=36 --best --setopt=install_weak_deps=False \ --installroot=/var/lib/machines/testf36 install dhcp-client dnf \ fedora-release glibc glibc-langpack-en iputils less ncurses passwd \ systemd systemd-networkd vim-default-editor
I can set a password using
[…]# systemd-nspawn -D /var/lib/machines/testf36 passwd
I create a container with
[…]# systemd-nspawn -D /var/lib/machines/testf36 -b
If you check the syslog of that machine (don't ask me how, I just straced agetty)
Use this on the host
journalctl -f -M testf36
This allows you to watch the logs for the running container live.
you'll see it complain that there is no /bin/login: you just need to install util-linux (or possibly busybox) and you'll get a prompt, login should work as well.
This smells as a bug in in the package providing getty. getty cannot work without /bin/login, hence the package should have a dep on it.
Lennart
-- Lennart Poettering, Berlin
V Tue, Jul 05, 2022 at 09:29:14AM +0200, Lennart Poettering napsal(a):
On Di, 05.07.22 14:38, Dominique Martinet (asmadeus@codewreck.org) wrote:
you'll see it complain that there is no /bin/login: you just need to install util-linux (or possibly busybox) and you'll get a prompt, login should work as well.
This smells as a bug in in the package providing getty. getty cannot work without /bin/login, hence the package should have a dep on it.
If the getty is /usr/sbin/agetty from util-linux-core, then it's a known bug https://bugzilla.redhat.com/show_bug.cgi?id=2084114.
-- Petr