SMB check argument

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

SMB check argument

Post by emartine »

I have an smb check argument where the account necessary to reach the share has ! in the password. Is there a way to bypass having nagios interpret the !s in the password?
I have tried adding the \ in front of the ! but when nagios saves the command, the password is interpreted as an argument for each ! and it separates the password into different fields.
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: SMB check argument

Post by emartine »

$USER1$/smb_checksize -H $HOSTADDRESS$ -S $ARG1$ -U $ARG2$ -P $USER11$ -W $ARG3$ -C $ARG4$ where user11 is the password but I get the response Error: Check Username/Password
this works fine on the command line. Just trying to get the syntax right. Password was defined in /usr/local/nagios/etc/resource.cfg as $USER11$=!blah!blah!blah
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMB check argument

Post by lmiltchev »

Can you show us the actual service config? Please, hide the password.
Do you have one or two backslashes? Is the macro wrapped in a single or double quotes?
When you say it works from the command line, do you mean running the check in a terminal (ssh/putty session) or testing within the CCM?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
emartine
Posts: 660
Joined: Thu Dec 29, 2011 10:47 am

Re: SMB check argument

Post by emartine »

Found out what was wrong. It required the domain in front of the username for the account to work.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMB check argument

Post by lmiltchev »

Found out what was wrong. It required the domain in front of the username for the account to work.
Great! I am marking this topic as resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked