0

I'm logged in as my user account (an admin) in Jenkins. I have project-based security on, with no access to "anonymous" user. Now when I run my Jenkins jobs manually, or via cron, the jobs run as "anonymous" user. How can I set my jobs to run as "jenkins" user by default?

Note I read Run jenkins job as another user, and the the default user is /etc/default/jenkins is jenkins, and that user owns the Jenkins files.

I mean why are my jobs "Running as anonymous" (seen on a job's console session) when I run them as my user, an admin user, or triggered by a timer?

Chris F
  • 14,337
  • 30
  • 94
  • 192
  • Where are you seeing "anonymous" user? Are you jobs running on the Controller or nodes (or co-located nodes)? What platform (Win/Lnx/Mac)? – Ian W Mar 02 '22 at 00:10
  • @IanW thanks for replying. On a job's console session, I see first line `Started by user myuser`, 2nd line `Running as anonymous`. My master node is on a Ubuntu Linux, and I have both Linxu and Windows build nodes where my jobs run, and it's exhibited on either build node. – Chris F Mar 02 '22 at 00:52

1 Answers1

1

I found it.

In Manage Jenkins -> Configure Global Security, toward the middle of page there's a section called Access Control For Builds. The Strategy was set to Run as anonymous, I set it to Run as SYSTEM.

Chris F
  • 14,337
  • 30
  • 94
  • 192