Xymon Mailing List Archive search

client file check

list Scot Kreienkamp
Tue, 7 Jul 2009 10:18:49 -0400
Message-Id: <user-1013c32c9b2f@xymon.invalid>

That doesn't work.  It doesn't like the backticks in client-local.cfg.
Now my clients say no files checked.

Thanks,
 
Scot Kreienkamp
La-Z-Boy Inc.
user-462cf0b6d846@xymon.invalid
XXX-XXX-XXXX ext XXXX

-----Original Message-----
From: Brand, Thomas R. [mailto:user-10a840458972@xymon.invalid] 
Sent: Monday, July 06, 2009 4:31 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: RE: [hobbit] client file check

-----Original Message-----
From: dOCtoR MADneSs [mailto:user-d54077869176@xymon.invalid]

You could try something like this :
in local-client.cfg add a section for this host :
[my_host]
file:`sudo ls /your/file`
and in hobbit-clients.cfg add a line in your host section :
HOST=my_host
FILE /your/file YOUR_SWITCHES

anyone disagree with it ?
Somewhat of a security risk; when using sudo, I recommend using 
full path to the executable: 
sudo /bin/ls /your/file

and in your /etc/sudoers file:

# Hobbit may run /bin/ls but flags are not allowed
hobbit   ALL = NOPASSWD: /bin/ls [!-]*


t09trbrxs# su - hobbit
hobbit at t09trbrxs:~> sudo /bin/ls /root/.ssh/authorized_keys
/root/.ssh/authorized_keys
hobbit at t09trbrxs:~> sudo /bin/ls --color=always
/root/.ssh/authorized_keys
hobbit's password:
hobbit at t09trbrxs:~>