[Pkg-nagios-devel] Bug#437357: nagios2: questionable location of 'nagios' user's home directory

Matt Zagrabelny mzagrabe at d.umn.edu
Sun Aug 12 01:55:21 UTC 2007

Package: nagios2
Version: 2.6-2+etch1
Severity: normal

Greetings Nagios2 Maintainers,

I realize that this may not be a bug, but I imagine it deserves another
opinion and it perhaps having this issue archived on the 'net will be
useful as well.

I am trying to use the nagios plugin 'check_by_ssh'. The issue arises
every reboot:

* The directory /var/run is cleaned of all regular files by
  /etc/init.d/bootclean via /etc/init.d/mountall-bootclean.sh from

* The 'nagios' user's home directory is /var/run/nagios2/.

* The check_by_ssh will fail becuase it does not have any knowledge of
  the host it trying to connect to because
  /var/run/nagios2/.ssh/known_hosts was removed at boot.

* It appears that the 'check_by_ssh' plugin does not have a
  StrictHostKeyChecking option.

Some options for solving this problem are:

1) Modify /etc/init.d/bootclean - this seems like a very bad idea

2) Change the home directory for the user 'nagios' from a location
   inside '/var/run' to one in, perhaps, '/home'. Though I do not know
   what the repercussions of that would be.

3) Make a script that runs on shutdown which saves
   /var/run/nagios2/.ssh/{regular_files} to a safe location:
   Make a second script that runs on boot which populates
   /var/run/nagios2/.ssh/ with the files from /var/local/nagios-save/.

Please tell me what you think. Is this a bug? Maybe just a feature
request for nagios-plugins so that 'check_by_ssh' has a
StrictHostKeyChecking option available.

Thanks for the time.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686-bigmem
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages nagios2 depends on:
ii  libc6                     2.3.6.ds1-13   GNU C Library: Shared libraries
ii  libgd2-noxpm              2.0.33-5.2     GD Graphics Library version 2 (wit
ii  libjpeg62                 6b-13          The Independent JPEG Group's JPEG 
ii  libperl5.8                5.8.8-7        Shared Perl library
ii  libpng12-0                1.2.15~beta5-1 PNG library - runtime
ii  nagios2-common            2.6-2+etch1    support files for nagios2
ii  perl                      5.8.8-7        Larry Wall's Practical Extraction 
ii  zlib1g                    1:1.2.3-13     compression library - runtime

nagios2 recommends no packages.

-- no debconf information

More information about the Pkg-nagios-devel mailing list