Load the default shell from the user config
This commit is contained in:
parent
a72fd9d045
commit
9ebbca3b3c
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue