diff options
| author | 2025-11-15 13:15:58 +0100 | |
|---|---|---|
| committer | 2025-11-15 13:15:58 +0100 | |
| commit | 92191ad19d7bf6d83165f352fd9b239a982e397c (patch) | |
| tree | 69bd09619bda9712e729f817b998cf0b214fbb4c | |
| parent | a8504dd5efa4df7c813adfda16630660a694718a (diff) | |
Only create ssh folder when setting up non existing user
| -rwxr-xr-x | src/init | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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" |
