You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.