NSClient Access to Shares

(Monitor Junkie) #1

Hello,

On the windows server there are several shares connected,

Through NRPE and NSClient ++ run a PS1 script that checks the file’s age.

server001\c$\important\files\script001.exe
server008\c$\important\files\script008.exe

My question.
What permission does one need to access share with nsclient.
According to Windows Admin, everyone has access to shares.

I only get message:
./check_nrpe -H xx.xx.xx.xx -p 5666 -c check_file_age_server001
UNKNOWN: Access denied

Thx

(Roland Sommer) #2

Shares are never connected to Windows but to a user session. When you are logged in then all shares are connected to your login. When the script is executed then the user context if different means the user that is configured to run NSClient++ (which is LocalSystem IIRC and LocalSystem does not have access rights on shares).

#3

Can confirm, as I recently had this issue as well.
Just run the NSClient as some AD user and it will work.