Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,871
Community Members
 
Community Events
184
Community Groups

Bamboo Agent running as SYSTEM account

Hi,

We have a bamboo agent installed on a Windows server and is running as a service. On the service it's setup to log on using one of our domain service accounts i.e. svc_bamboo_agent. The problem I have is that when I run a simple bamboo Script task on the agent 'echo %username%' it's displaying as 'SYSTEM' instead of the expected 'svc_bamboo_agent'. Why is this? How do I change it so the script is run under the service account 'svc_bamboo_agent?

Cheers

1 answer

1 vote
Christian Glockner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 13, 2017

Hi John,

It seems like this is a known issue on Windows.

The good news is that the process should still be running as svc_bamboo_agent - just try running whoami in your script task - you should find that that returns svc_bamboo_agent, and it's really just the %USERNAME% variable that's incorrectly set by Windows.

If you depend on that variable, you can set it to the actual username as part of your script task.

Cheers,

Christian

Premier Support Engineer

Atlassian

Awesome thanks.

I don't think this is an issue with Windows, it's more of a problem with the Tanuki wrapper that runs the agent, which does some black magic to load the environment, messing things up in the process, e.g., this other issue with the PATH variable.

I've wasted so much time because of this - it's not even funny. I even messed with the agent's JAR file trying to get it to run as my custom user, because I kept thinking the problem was the service running as SYSTEM... at least this post saved me from going mad.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events