Powershell Script Running as "NT AUTHORITY\SYSTEM"

I have a Powershell script (from a package) step that executes some helm and kubectl commands.

My tentacle is configured to run under a particular user account (e.g. not Local System).

However, when the Powershell script executes, it appears to run under the NT AUTHORITY\SYSTEM account instead of my special user account.

I believe this to be the case because I:

  • Hit Deploy.
  • Monitored running processes with Process Explorer.
  • Viewed the properties of the running powershell.exe processes.

See the screenshot at the bottom.

The end result of this is that my kubectl configuration data does not end up where it is expected to be and any attempts to interact with a cluster through the command will fail.

I’ve done a pretty exhaustive search attempting to figure out how to affect this behavior, but have come up empty. If you could provide some guidance it would be greatly appreciated.

(I understand that your full Kubernetes support is still in development, but we’re trying to get something up and running in the meantime.)

We’re on version 3.4.14.

Hi Tony,

Thanks for getting in touch. We are shipping a preview of K8 support in the 2018.8.0 release, due early next week.

Could you send me a copy of the deployment log as that will show what is running the task and what account it is running under.

Also a screenshot of your step configuration would be great.

Thanks for the reply, Robert.

My apologies for the delay (holiday weekend in the states).

I’ve attached the deployment log and a screenshot of the step configuration, as requested. Thanks, in advance, for your help.

DeploymentLog.log (5.5 KB)

Hi Tony,

Thanks for that. The log doesn’t have the account info I was looking for, we added that in a later version.

However it looks like the step is running “On the Octopus Server” and not the tentacle. In your project’s process, check to make sure you have chosen to run the step on the deployment target and not on the server or on behalf of.

If you get stuck, a screenshot of the step details in the project’s deployment process would help.

Regards,

Rob W

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.