diff options
| author | 2025-10-20 20:52:07 +0200 | |
|---|---|---|
| committer | 2025-10-20 20:52:07 +0200 | |
| commit | 9e946a8a45c23a72d7a55e4ca37360ab84f963cc (patch) | |
| tree | 095189a568f06c2ee042ea6f325e3a7e4a3b5d3d /src/init | |
| parent | 0c3a8a9d78f1a7086efcde9bdd605ec911454458 (diff) | |
Restrict sudo to specific group
Diffstat (limited to 'src/init')
| -rwxr-xr-x | src/init | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -31,6 +31,8 @@ function createUser # user is not restricted, this is done in ssh config with forceCommand # we need to be able to run a fish script to check for permissions adduser --home $HOME -D "$user" + # add user to sudo group + addgroup "$user" $_GIT_SUDO_GROUP # unlock account to allow ssh logins passwd -u "$user" mkdir "$HOME/.ssh" @@ -45,6 +47,8 @@ function setupGitUser # 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" + # group that is allowed to sudo + addgroup $_GIT_SUDO_GROUP end function setupRepo |
