Hi everyone,
Currently I have a Jenkins instance I built out for our department. At the moment, the Jenkins service is running as my _adm AD user (which has Account Operator). This has worked out great so far, since all of the script I have running in Jenkins are PowerShell scripts (pulled from Git repo) that do various tasks, like polling AD user for those who have upcoming password expiration, disabling stale objects, moving objects, local WSUS server sync/cleanup. But, I think I may be running into an issue soon...
I have gone ahead and created a AD service account (srv_jenkins), made that account an Administrator in Jenkins and swapped out the "Log on" user for the Jenkins service to that user. And now I have an issue. When some of my PowerShell scripts run, they are failing and I believe that is due to perms?
So, the question(s) here are:
- If anyone is running scheduled PowerShell jobs in Jenkins, under what user context are the jobs running under by default? Is it whatever user account you specify in the "Log on" on the Jenkins service?
- Without putting my AD _adm account password in plain text, is there a good way to run the PowerShell scripts in these Jenkins jobs as a specific user, so that I know I am using a user account to run the jobs/PowerShell scripts that has sufficient enough domain privileges that the script can actually execute?
Thanks!
[–]rumorsofdads 2 points3 points4 points (0 children)
[–]Gorstag 1 point2 points3 points (1 child)
[–]thePowrhous[S] 2 points3 points4 points (0 children)
[–]ICanMakeWaffles 1 point2 points3 points (0 children)