]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(systemd-sysusers): remove (g)shadow created by systemd-sysusers
authorJo Zzsi <jozzsicsataban@gmail.com>
Wed, 21 May 2025 12:38:30 +0000 (08:38 -0400)
committerLaszlo <laszlo.gombos@gmail.com>
Sat, 12 Jul 2025 14:26:23 +0000 (10:26 -0400)
The files shadow and gshadow do NOT exist when using the commit before f3dacc0.

This commit restores the earlier behaviour.

Fixes #1242

modules.d/68systemd-sysusers/module-setup.sh

index c1ef40cdf78f6339b9e0f86b7ce6ede995ff08b0..099b998011f0e21e6adb5f5ce8b0f9c6950f19c6 100755 (executable)
@@ -23,4 +23,8 @@ install() {
         set -o pipefail
         systemd-sysusers --root="$initdir" 2>&1 >&3 | grep -v "^Creating " >&2
     } 3>&1
+
+    # delete shadow files as initramfs is not designed to ask for a non-root user password
+    # interactively and their permissions crashes the build.
+    rm -f "$initdir/etc/shadow" "$initdir/etc/gshadow"
 }