From b54bea23913e23734bb9c0d9016a08f057c86650 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 20 Jul 2024 04:35:41 +0200 Subject: [PATCH] Load the default shell from the user config --- scripts/Common/OS/users.fish | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/Common/OS/users.fish b/scripts/Common/OS/users.fish index 22660581..7a53c49e 100644 --- a/scripts/Common/OS/users.fish +++ b/scripts/Common/OS/users.fish @@ -10,6 +10,7 @@ for name in (echo "$users" | jq '.[]' --raw-output0 | string split0) end set -l displayName (getUserConfig displayName --json) + set -l shell (getUserConfig displayName --json) sudo useradd --create-home ( if [ displayName != "null" ] @@ -19,6 +20,10 @@ for name in (echo "$users" | jq '.[]' --raw-output0 | string split0) ) --groups (getUserConfig groups --apply 'builtins.concatStringsSep ","') \ "$name" + if echo "$shell" | jq --exit-status > /dev/null + sudo chsh "$name" --shell "$shell" + end + echo "Please Choose a New Password for User `$name`" while ! sudo passwd "$name"