nagios: Checking a samba share without a password

Rick Wargo

I was getting errors (Access Denied) when I tried to check a samba share that had no password (I know – bad practice). Turns out I needed to add a new entry in checkcommands.cfg specifically to test for no password.

define command{
command_name check_samba_disk_nopw
command_line $USER1$/check_disk_smb --hostname="$HOSTADDRESS$" --share="$ARG1$" -u "$ARG2$" -p "''" -w 85 -c 95
}

The trick is passing the nested empty quotes to check_disk_smb. This will make it work. Unfortunately, typing the command on the command line works, even without the nested quotes. It must be some internal parsing nagios does to the command_line parameter.

Share and Enjoy:
  • Facebook
  • Twitter
  • LinkedIn
  • StumbleUpon
  • del.icio.us
  • Google Buzz
  • Yahoo! Buzz
  • Digg
  • email

Leave a Reply

stop spam with honeypot!