passwords with #, pound symbol, hash

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Be.Sure
Posts: 2
Joined: Thu Mar 20, 2014 4:04 am

passwords with #, pound symbol, hash

Post by Be.Sure »

It dose not properly escape them. Treating the reset of the line as a comment.
Tried using /usr/local/nagios/etc/resource.cfg
$USER9$=secr#et

Editing in the CCM it escapes the $. $USER9$ to \$USER9\$

How do i use a password with a #, pound symbol, hash?

Nagios XI 2012R2.3
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: passwords with #, pound symbol, hash

Post by scottwilkerson »

I believe this should work

Code: Select all

$USER9$='secr#et'
One thing I will mention, if you are using the "Test Command" in the CCM it will not work as it does not import the $USERn$ vars, you will actually have to save the host/service and let the check run.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Be.Sure
Posts: 2
Joined: Thu Mar 20, 2014 4:04 am

Re: passwords with #, pound symbol, hash

Post by Be.Sure »

Thanks.

Yep was trying the "Test Command".

After editing /usr/local/nagios/etc/resource.cfg do I need to restart anything for it to load the new/edited variables?

Ended up making a new Command (CCM > Commands > Command) with the password in it.
Locked