Running Jenkins as a different Windows User

2,250 views
Skip to first unread message

ayesha s

unread,
Mar 10, 2016, 4:53:56 AM3/10/16
to Jenkins Users

I have installed latest Jenkins LTS on windows server 2008

I need to change JENKINS_USER.How can I change this ?
If I try to change the LOGON USER for jenkins from services.msc then Jenkins does not open on the browser-in fact the pid keeps on changing constantly which is not correct thing.
So I want the best way to start/run jenkins as a different windows user.

jer...@bodycad.com

unread,
Mar 10, 2016, 11:27:43 AM3/10/16
to Jenkins Users
Seem like a permission problems, the pid change is probably due to the services failing to launch properly and retry to launch it again. Check if the services can log anything and see what is happening there, inside the Windows Computer management application, you can enable the services log. Also check the log of Jenkins itself.

Make sure the Jenkins folder and workspace are available to the wanted user into folder permissions. Another thing to consider, the services tools into Windows will have hard time to access GUI context, so if you run tests that run GUI elements, you may want to run the services as a logable user to have the proper context.

Take care with network map drive, if any are used, services doesn't see them as user does. 

NOTE mounting Windows drive for services:
  1. download Windows tools for psexec: http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
  2. install the tools
  3. open a cmd.exe
  4. type psexec -i -s cmd.exe
    1. into new shell type whoami
      1. should see: nt authority\system
    2. mount the drive with net use 
Jerome

ayesha s

unread,
Mar 14, 2016, 2:56:13 AM3/14/16
to Jenkins Users
Hi Jerome,

Thanks for looking into my query.I will try the steps you suggested and let you know if thhat helps.

ayesha s

unread,
Apr 4, 2016, 4:46:08 AM4/4/16
to Jenkins Users
I installed the SSL certificate and now my the jekins service is running fine  as needed.
Reply all
Reply to author
Forward
0 new messages