ArchLinux: Running jenkins as another user

To minimize maintenance I wanted to run Jenkins as a different user that I already use for other services, as to avoid permission control hell and ssh-config hell as well.

So here's what I did:

 

Let's say the user you want is called "johndoe" and it has an userid=2000 and groupid=2004 in your box, do this:

1. Edit /etc/password

jenkins:x:2000:2004::/var/lib/jenkins:/bin/bash

 

 

2. Change permissions so they reflect the new ID

 

chown jenkins:jenkins -Rv /var/cache/jenkins/
chown -Rv jenkins:jenkins /var/lib/enkins/

 

 

I wrote this last minute and after altering things for the second time, (things got a bit reverted after upgrading Jenkins in my Archlinux home server); so let me know if this doesn't work for you and I'll check.

 

 

Tagged , , , . Bookmark the permalink.

Leave a Reply