New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Impersonation/runas not working in custom sensor (batch)

Votes:

0

Your Vote:

Up

Down

I have a custom sensor calling a batch that does: echo %username%

In settings, security context is set to "Use Windows credentials of parent device". The parent device windows account is set to: MyUser

I'm expecting to see MyUser as the output of the batch but instead I see the name of the machine where it runs followed by $.

Am I doing something wrong or is it a bug ?

batch credentials custom-sensor impersonation runas

Created on Sep 30, 2015 9:41:28 AM by  BrunoZ (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

In the sensor settings goto the "environment" section and select Set placeholders as environment values

The username will now showup as %prtg_windowsuser%

Batch file:

@echo off
echo 0:%prtg_windowsuser%
exit 0

Created on Oct 1, 2015 2:12:22 PM by  PRTG Tools Family [prtgtoolsfamily.com] (12,885) 3 4



Votes:

0

Your Vote:

Up

Down

Thanks for your answer but I was wondering how I could run a batch AS this user and not only use this info.

Created on Oct 1, 2015 2:31:28 PM by  BrunoZ (0) 1



Votes:

0

Your Vote:

Up

Down

Hi BrunoZ

Hmm. You could use either RUNAS command in the batch, if its possible to use the switch /savecred
or
using psexec from sysinternals (Microsoft) to do so.

Maybe Paessler has a builtin solution.

regards Thomas

Created on Oct 2, 2015 10:39:44 AM by  Thomas Umbricht (2,817) 3 3



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.