summaryrefslogtreecommitdiffstats
path: root/jenkins-scripts/create_jenkins_user.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jenkins-scripts/create_jenkins_user.sh')
-rwxr-xr-xjenkins-scripts/create_jenkins_user.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/jenkins-scripts/create_jenkins_user.sh b/jenkins-scripts/create_jenkins_user.sh
index 10e47091c..3a8600274 100755
--- a/jenkins-scripts/create_jenkins_user.sh
+++ b/jenkins-scripts/create_jenkins_user.sh
@@ -39,6 +39,12 @@ then
usermod -a -G mock jenkins
fi
+# Grant the Jenkins user sudo rights
+cat <<EOFSUDO >/etc/sudoers.d/89-jenkins-user-defaults
+Defaults:jenkins !requiretty
+jenkins ALL = NOPASSWD: ALL
+EOFSUDO
+
mkdir /home/jenkins/.ssh
mkdir /w
cp -r /home/${OS}/.ssh/authorized_keys /home/jenkins/.ssh/authorized_keys