summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-11-15 13:15:58 +0100
committerGravatar Matthias Lucas Jaros <jarlucmat@mailbox.org>2025-11-15 13:15:58 +0100
commit92191ad19d7bf6d83165f352fd9b239a982e397c (patch)
tree69bd09619bda9712e729f817b998cf0b214fbb4c /src
parenta8504dd5efa4df7c813adfda16630660a694718a (diff)
Only create ssh folder when setting up non existing user
Diffstat (limited to 'src')
-rwxr-xr-xsrc/init3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/init b/src/init
index 64564da..b25637c 100755
--- a/src/init
+++ b/src/init
@@ -43,10 +43,11 @@ function setupUser
addgroup "$user" $_GIT_SUDO_GROUP; or fail "Failed to add user $user to group $_GIT_SUDO_GROUP"
# unlock account to allow ssh logins
passwd -u "$user" &>/dev/null; or fail "Failed to unlock account of $user"
+ # create ssh folder
+ mkdir "$HOME/.ssh"
end
# Copy/Overwrite ssh key
- mkdir "$HOME/.ssh"
echo "$key" > "$HOME/.ssh/authorized_keys"
chown -R $user "$HOME"
chmod -R 700 "$HOME"