How Run Jenkins Under Another User in Linux?
Contents

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 ).

How run jenkins as another user?

There are two steps:

  1. The main thing is to update the JENKINS_USER environment variable. …
  2. Update ownership of jenkins directories: chown -R ptran /var/log/jenkins chown -R ptran /var/lib/jenkins chown -R ptran /var/run/jenkins chown -R ptran /var/cache/jenkins.
  3. Restart jenkins sudo service jenkins restart.

How do I run jenkins as non root user?

Jenkins run as a non-root user

To change the Jenkins user, Open “/etc/sysconfig/jenkins” file. Changing JENKINS_USER variable and Make sure user exists in your system. Changing JENKINS_USER to huupv USER. The restarted Jenkins and check user has changed with ps command.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest