Force useradd to use added group 00/8000/1
authorAndrew Grimberg <agrimberg@linuxfoundation.org>
Fri, 11 Aug 2017 18:25:47 +0000 (11:25 -0700)
committerAndrew Grimberg <agrimberg@linuxfoundation.org>
Fri, 11 Aug 2017 18:25:47 +0000 (11:25 -0700)
Since we are now making sure that the jenkins group exists before the
jenkins user is created (likely because of opensuse not autogenerating
the group?) we now need to force the user addition to use the group

Change-Id: Ie900348fc43bf6b8bc5ebad2d4820ae705e52da4
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
jenkins-scripts/create_jenkins_user.sh

index cb45e7d..960b04b 100755 (executable)
@@ -16,7 +16,7 @@
 OS=$(facter operatingsystem | tr '[:upper:]' '[:lower:]')
 
 groupadd jenkins
-useradd -m -s /bin/bash jenkins
+useradd -m -s /bin/bash -g jenkins jenkins
 
 # Check if docker group exists
 grep -q docker /etc/group