From d00b46ea87668fc0a9a8303106c9379bf591bed0 Mon Sep 17 00:00:00 2001 From: Luca BRUNO Date: Aug 09 2022 11:02:59 +0000 Subject: Align sysusers-generated shell value with upstream systemd default --- diff --git a/sysusers.generate-pre.sh b/sysusers.generate-pre.sh index 95a0938..5e56179 100755 --- a/sysusers.generate-pre.sh +++ b/sysusers.generate-pre.sh @@ -14,7 +14,7 @@ user() { [ "$desc" = '-' ] && desc= { [ "$home" = '-' ] || [ "$home" = '' ]; } && home=/ - { [ "$shell" = '-' ] || [ "$shell" = '' ]; } && shell=/sbin/nologin + { [ "$shell" = '-' ] || [ "$shell" = '' ]; } && shell=/usr/sbin/nologin if [ "$uid" = '-' ] || [ "$uid" = '' ]; then cat </dev/null; then if ! getent passwd '$uid' >/dev/null; then - useradd -r -u '$uid' -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user' || : + useradd -r -u '$uid' -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : else - useradd -r -g '$group' -d '$home' -s /sbin/nologin -c '$desc' '$user' || : + useradd -r -g '$group' -d '$home' -s '$shell' -c '$desc' '$user' || : fi fi