Skip to content

Instantly share code, notes, and snippets.

@RoesWibowo
Created March 23, 2017 04:46
Show Gist options
  • Save RoesWibowo/f4bd693e9c7a6eb2db9634741e24513a to your computer and use it in GitHub Desktop.
Save RoesWibowo/f4bd693e9c7a6eb2db9634741e24513a to your computer and use it in GitHub Desktop.
Change jenkins user linux
To change the jenkins user, open the /etc/sysconfig/jenkins (in debian this file is created in /etc/default) and change the JENKINS_USER to whatever you want. Make sure that user exists in the system (you can check the user in the /etc/passwd file ).
$JENKINS_USER="manula"
Then change the ownership of the Jenkins home, Jenkins webroot and logs.
chown -R manula:manula /var/lib/jenkins
chown -R manula:manula /var/cache/jenkins
chown -R manula:manula /var/log/jenkins
Then restarted the Jenkins jenkins and check the user has changed using a ps command
/etc/init.d/jenkins restart
ps -ef | grep jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment