I'm installing jenkins on a local server to be accessed locally within my network. I see this line in the docs for jenkins:
The 'jenkins' user is created to run this service. If you change this to a different user via the config file, you must change the owner of /var/log/jenkins, /var/lib/jenkins, and /var/cache/jenkins.
I already created a jenkins user on the centos server before installing jenkins. Jenkins runs and seems to work just fine. I'm curious whether creating a user with the same name will present any issues in the future.
Run Jenkins on Localhost 8080 Open the web browser and type "localhost:8080". Enter the credentials and log in. If you install Jenkins for the first time, the dashboard will ask you to install the recommended plugins. Install all the recommended plugins.
To run Jenkins service using a local or domain user, specify the domain user name and password with which you want to run Jenkins, click on Test Credentials to test your domain credentials and click on Next.
#1) As A Standalone Application Step 1: After downloading the Java Generic Package, as explained above, launch the command prompt as administrator and type Java –jar jenkins.
TL;DR Jenkins will use the user you created, but you may want to double check some settings for consistency.
The preinstall script (see below) in the Jenkins package will try to create the jenkins user and jenkins group, but if either step fails because the user or group exists, it's not an error -- a common case when this occurs is when the user account remains from a previous Jenkins installation. Jenkins will run using the existing user and permissions on the Jenkins directories will be set correctly.
/usr/sbin/groupadd -r jenkins &>/dev/null || :
# SUSE version had -o here, but in Fedora -o isn't allowed without -u
/usr/sbin/useradd -g jenkins -s /bin/false -r -c "Jenkins Continuous Integration Server" \
-d "/var/lib/jenkins" jenkins &>/dev/null || :
Assuming this is what you want, everything is fine. There are a couple things you might want to check:
/bin/false
). This means that the jenkins user will be able to run processes and own files and directories, but will not be able to log in through ssh or the console. This is a security setting that reduces the possible vectors of intrusion. Depending on your plans for your jenkins user, you may want to similarly disable logins. The last two are primarily for convenience -- e.g. it may be useful to have other users who can read Jenkins log files (be belonging to the associated group). I can't think of things that would go wrong if these aren't set as in the preinstall script, but it seems like a good idea to be consistent.
These user account settings are stored in /etc/passwd. On Debian/Ubuntu distributions, user account settings can be modified with usermod.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With