From b3a41ec1466774a10b1ef4d1b44c2234ec98c969 Mon Sep 17 00:00:00 2001 From: Matthias Lucas Jaros Date: Mon, 27 Oct 2025 11:57:39 +0100 Subject: Added handling of gid for git user also --- src/init | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/init b/src/init index 4c7e979..b29bfee 100755 --- a/src/init +++ b/src/init @@ -16,7 +16,7 @@ function checkUser return $status end -function createUser +function setupUser set -l userConfig (string split ':' $argv[1]) set -l user $userConfig[1] set -l key $userConfig[2] @@ -47,7 +47,8 @@ function setupGitUser echo "Setting up git user" # git user has read/write access to all repos, set git-shell # and no password login allowed -> no ssh login possible - adduser git -u $GIT_UID -D --shell "/usr/bin/git-shell" + addgroup -g $GIT_GID git + adduser git -u $GIT_UID -G git -D --shell "/usr/bin/git-shell" # group that is allowed to sudo addgroup $_GIT_SUDO_GROUP end @@ -157,7 +158,7 @@ end # Setup users setupGitUser for userConfig in $users - createUser "$userConfig" + setupUser "$userConfig" end # Setup repos -- cgit v1.3.1