NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

NCPA on Windows user context for Powershell scripts? #866

Closed riahc3 closed 2 years ago

riahc3 commented 2 years ago

What is the user context for NCPA on Windows for Powershell scripts?

The reason I ask this is because I am generated a credentials file and it is not importing it correctly.

When you export a credential file, it can only be ran by that user and that computer. I did it for SYSTEM ,thinking it was system, but it does not work thru NCPA, only thru a Powershell ran under system.

Any suggestions?

ccztux commented 2 years ago

All scripts on windows will be executed by the user the service ncpa_listener runs as.

jomann09 commented 2 years ago

NCPA on windows uses system by default I believe, since that is the user for the service that it installs by default. You can edit how powershell scripts run in the ncpa config here https://github.com/NagiosEnterprises/ncpa/blob/master/agent/etc/ncpa.cfg#L354. I'm going to close this.