Load the default shell from the user config
This commit is contained in:
parent
2362c56fc0
commit
7bd01cc1bd
1 changed files with 5 additions and 0 deletions
|
@ -10,6 +10,7 @@ for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l displayName (getUserConfig displayName --json)
|
set -l displayName (getUserConfig displayName --json)
|
||||||
|
set -l shell (getUserConfig defaultShell --json)
|
||||||
|
|
||||||
sudo useradd --create-home (
|
sudo useradd --create-home (
|
||||||
if echo "$displayName" | jq --exit-status > /dev/null
|
if echo "$displayName" | jq --exit-status > /dev/null
|
||||||
|
@ -19,6 +20,10 @@ for name in (echo "$users" | jq '.[]' --raw-output0 | string split0)
|
||||||
) --groups (getUserConfig groups --apply 'builtins.concatStringsSep ","') \
|
) --groups (getUserConfig groups --apply 'builtins.concatStringsSep ","') \
|
||||||
"$name"
|
"$name"
|
||||||
|
|
||||||
|
if echo "$shell" | jq --exit-status > /dev/null
|
||||||
|
sudo chsh "$name" --shell (which (echo "$shell" | jq --raw-output))
|
||||||
|
end
|
||||||
|
|
||||||
echo "Please Choose a New Password for User `$name`"
|
echo "Please Choose a New Password for User `$name`"
|
||||||
|
|
||||||
while ! sudo passwd "$name"
|
while ! sudo passwd "$name"
|
||||||
|
|
Loading…
Reference in a new issue