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

Windows Printer Queue Monitoring; PFT Sensor; unknown user or bad password; account locked

Votes:

0

tl;dr don't use a password that contains double quotes (") followed by another character. Double quotes (") as last character however works just fine.

Hi everyone,

I changed the windows system credential used by PRTG to access windows Systems. Everything seemed to work, according to my Tests, but the moment switched the "live" credentials it all went south.

I noticed that all works fine, no problems with the WMI or powershell sensors, as long as I keep the only print queue senor (ptfsensor) we have on pause. As soon as I un-pause the pftsensor the domain user gets locked due to the number of bad password counts. The event viewer of our print server gave me some clues, first there are a few entries with "Failure Reason: Unknown user name or bad password" followed by some more with "Failure Reason: Account locked out".

It came to my mind that one of the special chars used in the password might be the source of this problem even though I explicitly choose characters from ascii 32 - 127.

After some trial and error, I found out that the problem only occurs if the password contains double quotes (") and if the double quotes (") aren't the last char of the password.

Can someone explain to me why this only happen in this specific situation and why it is only the ptfsensor that got a problem with it?

Regards, More

bad double-quotes password pftsensor print prtg queue unknown user wmi

Created on Nov 15, 2022 2:38:36 PM



Best Answer

Accepted Answer

Votes:

1

Actually that is a way to escape a double quote.

A few examples taken from https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter

program a b REM sends (a) and (b) program """a""" REM sends ("a") program """a b""" REM sends ("a) and (b") program """"Hello,""" Mike said." REM sends ("Hello," Mike said.) program ""a""b""c""d"" REM sends (abcd) since the "" groups wrap nothing program "hello to """quotes"" REM sends (hello to "quotes") program """"hello world"" REM sends ("hello world") program """hello" world"" REM sends ("hello world") program """hello "world"" REM sends ("hello) and (world") program "hello ""world""" REM sends (hello "world") program "hello """world"" REM sends (hello "world")


Sensors | Multi Channel Sensors | Tools | Notifications

Kind regards,

[[https://prtgtoolsfamily.com]] PRTG Tools Family

Created on Nov 17, 2022 12:46:04 PM



4 Replies

Votes:

0

The PTF sensor takes it's settings as parameters on the command line. These parameters are seperated by spaces. To prevent parameters that contains spaces to be broken up, all parameters get surrounded by double quotes. Like: password="my secret password" If however your password contains a double quote it is presented like password="my secret" password". This wil be interpreted as password="my secret"

Created on Nov 16, 2022 1:11:48 PM



Votes:

1

The PTF sensor takes it's settings as parameters on the command line.
These parameters are seperated by spaces.
To prevent parameters that contains spaces to be broken up, all parameters get surrounded by double quotes.

Like: password="my secret password"

If however your password contains a double quote it wil be presented as
password="my secret" password".

This wil be interpreted as password="my secret"


Sensors | Multi Channel Sensors | Tools | Notifications

Kind regards,

[[https://prtgtoolsfamily.com]] PRTG Tools Family

Created on Nov 16, 2022 1:15:45 PM



Votes:

0

The PTF sensor takes it's settings as parameters on the command line. These parameters are seperated by spaces. To prevent parameters that contains spaces to be broken up, all parameters get surrounded by double quotes.

Like: password="my secret password"

If however your password contains a double quote it wil be presented as password="my secret" password".

This wil be interpreted as password="my secret"

That makes sense, any idea why password="my secret password"" (with the double quote as last character) works? For my understanding that is going to be interpreted as password="my secret password", which should result in wrong password entries and therefor locking the user account after a few seconds. But somehow that doesn´t happen, and the sensor works fine.

Created on Nov 17, 2022 9:04:36 AM



Accepted Answer

Votes:

1

Actually that is a way to escape a double quote.

A few examples taken from https://stackoverflow.com/questions/7760545/escape-double-quotes-in-parameter

program a b REM sends (a) and (b) program """a""" REM sends ("a") program """a b""" REM sends ("a) and (b") program """"Hello,""" Mike said." REM sends ("Hello," Mike said.) program ""a""b""c""d"" REM sends (abcd) since the "" groups wrap nothing program "hello to """quotes"" REM sends (hello to "quotes") program """"hello world"" REM sends ("hello world") program """hello" world"" REM sends ("hello world") program """hello "world"" REM sends ("hello) and (world") program "hello ""world""" REM sends (hello "world") program "hello """world"" REM sends (hello "world")


Sensors | Multi Channel Sensors | Tools | Notifications

Kind regards,

[[https://prtgtoolsfamily.com]] PRTG Tools Family

Created on Nov 17, 2022 12:46:04 PM




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.