{"id":1036,"date":"2015-03-03T08:32:04","date_gmt":"2015-03-03T16:32:04","guid":{"rendered":"http:\/\/blog.portnumber53.com\/?p=1036"},"modified":"2015-03-03T08:32:04","modified_gmt":"2015-03-03T16:32:04","slug":"archlinux-running-jenkins-as-another-user","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2015\/03\/03\/archlinux-running-jenkins-as-another-user\/","title":{"rendered":"ArchLinux: Running jenkins as another user"},"content":{"rendered":"<p>\n\tTo 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.\n<\/p>\n<p>\n\tSo here&#39;s what I did:\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\tLet&#39;s say the user you want is called &quot;johndoe&quot; and it has an userid=2000 and groupid=2004 in your box, do this:\n<\/p>\n<p>\n\t1. Edit \/etc\/password\n<\/p>\n<p>\n\tjenkins:x:<span style=\"line-height: 20.7999992370605px;\">2000<\/span>:<span style=\"line-height: 20.7999992370605px;\">2004<\/span>::\/var\/lib\/jenkins:\/bin\/bash\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t2. Change permissions so they reflect the new ID\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\tchown jenkins:jenkins -Rv \/var\/cache\/jenkins\/<br \/>\n\tchown -Rv jenkins:jenkins \/var\/lib\/enkins\/\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\tI 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&#39;t work for you and I&#39;ll check.\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#39;s what I did: &nbsp; Let&#39;s say the user you want is called &quot;johndoe&quot; and it has an userid=2000&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/blog.portnumber53.com\/index.php\/2015\/03\/03\/archlinux-running-jenkins-as-another-user\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[50,98,196,219],"class_list":["post-1036","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-archlinux","tag-custom-user","tag-jenkins","tag-linux"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/1036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=1036"}],"version-history":[{"count":0,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/1036\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=1036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=1036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=1036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}