Page 1 of 1

Problem reading password from resource file

Posted: Wed Mar 05, 2014 12:19 pm
by maxleonca
Hello,

I'm implementing some checks on our vm hosts, the checks seem to be working just fine if I run them by hand, but when I run them with the Nagios engine is having serious issues reading the password from the resource file.

Currently what I have is something like this on the resource file:

$USER20$=monitor
$USER21$=\@T4rd3$$

As you can see I have scaped the @ with a backslash and the $ with an extra $ but is not working.
If I run it by hand it works using just backslashes for both special characters, any idea on how to tackle this one?

Thank you

Re: Problem reading password from resource file

Posted: Wed Mar 05, 2014 12:49 pm
by tmcdonald
If it is in the resource file you should not need to escape the characters at all.

Re: Problem reading password from resource file

Posted: Thu Mar 06, 2014 12:02 pm
by maxleonca
Odd, I tried it in any way shape or form I can think of and still it doesn't work.

Any idea what may be the issue, I did double check the commands to see that the actual macros were being used and indeed they are.

Re: Problem reading password from resource file

Posted: Thu Mar 06, 2014 12:24 pm
by FTL
what happens if you wrap the password in quotes?

"@T4rd3$"

Re: Problem reading password from resource file

Posted: Thu Mar 06, 2014 12:35 pm
by abrist
You probably want to wrap the macro itself in quotes in the command:

Code: Select all

"$USER21$"

Re: Problem reading password from resource file

Posted: Mon Mar 10, 2014 11:31 am
by maxleonca
Thank you for your input, I still have the same message when I add quotes to the macro in the command file.
I figure that the issue here is the $ inside the password, but sadly I'm not in the liberty to change it.

Any other suggestions are more than welcome.

Cheers

Re: Problem reading password from resource file

Posted: Mon Mar 10, 2014 1:23 pm
by sreinhardt
Does this particular plugin allow for accepting user\pass via file? You might be able to give it a flat file instead with the password and get out of having it in resources.