What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Impersonation/runas not working in custom sensor (batch)

Votes:

0

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



3 Replies

Votes:

0

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



Votes:

0

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



Votes:

0

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




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.