From: Daan De Meyer Date: Fri, 22 May 2020 18:43:59 +0000 (+0200) Subject: Arch: Fix root login when using systemd-nspawn X-Git-Tag: v6~81^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F424%2Fhead;p=thirdparty%2Fmkosi.git Arch: Fix root login when using systemd-nspawn --- diff --git a/mkosi b/mkosi index 18540d28a..f566f2ec7 100755 --- a/mkosi +++ b/mkosi @@ -2168,6 +2168,14 @@ Server = {repository_server} with open(os.path.join(workspace, 'root', 'etc/locale.conf'), 'w') as f: f.write('LANG=en_US.UTF-8\n') + # Arch still uses pam_securetty which prevents root login into + # systemd-nspawn containers. See https://bugs.archlinux.org/task/45903. + def rm_securetty(line: str) -> str: + if 'pam_securetty.so' in line: + return '' + return line + patch_file(os.path.join(root, 'etc/pam.d/login'), rm_securetty) + @completestep('Installing openSUSE') def install_opensuse(args: CommandLineArguments, workspace: str, do_run_build_script: bool) -> None: