Controlling user Jenkins runs as

ยอดดู 323 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Stuart Henderson

ยังไม่อ่าน,
24 พ.ค. 2559 18:50:0824/5/59
ถึง Jenkins Users
Apologies in advance for being a noob.

I'm having big problems on our new Jenkins 2 server on Windows 2012 and would really appreciate some advice/help.

I'm trying to run a Powershell script to establish a remote session to another (same domain) Windows 2012 machine. I can do this no trouble at all from the Powershell command line. I installed the Powershell plugin and thought it would be a walk in the park to use that to drive the Powershell script to do what I need. Uh hu....

I get "access denied" messages every time. I think it might be because the Powershell script run by Jenkins is executing as a different user. I have tried injecting user names and passwords into the build - but I'm not confident that the correct user is being selected. I can run local Powershell scripts no trouble, and when I do I can get Powershell to dump the current user name and it's not anything like the user I need it to be for removing to work :-( how the heck can I control which user runs the Powershell code from Jenkins?

Would very much appreciate any clues.

Niksan

ยังไม่อ่าน,
24 พ.ค. 2559 20:11:3624/5/59
ถึง Jenkins Users
If you're running as a service, change the service settings to run as whichever user you desire. I think it defaults to user 'system' by default.

Stuart Henderson

ยังไม่อ่าน,
25 พ.ค. 2559 19:23:4125/5/59
ถึง Jenkins Users
Hi,
Thank you. That worked as solved the problem. Much appreciated.

Rony Mathew

ยังไม่อ่าน,
15 ม.ค. 2563 10:05:5715/1/63
ถึง Jenkins Users
Thank You!! It works.
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ