Always add zuul group to zuul user
Not all distros - like openSUSE - create a separate group for each user. Be explicit when creating zuul user like in nodepool/elements/jenkins-slave/install.d/20-jenkins-slave. Code later assumes that user and group are both named zuul, so we need to set the specific zuul group. Also, set /bin/bash as root shell following a similar change for jenkins done in Ic671b7c5344a1e7980bede88bee730b50764e60b to keep these two invocations in sync. Change-Id: Iec8de3c0799aa023ace8f172f84bf8a137d0967b
This commit is contained in:
parent
2e308fc94a
commit
ec333103e1
@ -6,7 +6,11 @@ fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
useradd -m zuul
|
||||
# Add zuul user and group. Note we don't want to rely on
|
||||
# "useradd"'s group adding behaviour, because it might differ across
|
||||
# distros.
|
||||
groupadd zuul
|
||||
useradd -m zuul -g zuul -s /bin/bash
|
||||
|
||||
cat > /etc/sudoers.d/zuul << EOF
|
||||
zuul ALL=(ALL) NOPASSWD:ALL
|
||||
|
Loading…
x
Reference in New Issue
Block a user