Package: nagios-nrpe-server
Version: 2.12-5ubuntu1.2
Severity: normal

Dear Maintainer,
*** Please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these lines ***

When setting nagios-nrpe-server to run under any user that is not nagios, the initscript creates a conflict since it has a chown command hardcoded to
user nagios which is the default in the package.

The in the init script as per the package included in ubuntu precise:


*** 43,47 ****
  #since /var/run can be wiped completly we create our run directory here
  if [ ! -d "$PIDDIR" ]; then
        mkdir "$PIDDIR"
        chown nagios "$PIDDIR"
  fi
---


In my nrpe_local.cfg configuration I have nagios set to run as a custom user:

nrpe_user=srv-monitor
nrpe_group=srv-monitor


Hence when I restart the server the upstart script will leave the permissions messed up and the service will fail to start properly.


IMHO the initscript should either not try to chown the piddir at all, or at least parse this setting from /etc/default or any other config, but the way the package is right now makes unpractical or simply impossible to run the service reliably unless with the default "nagios" user.

In my cluster I did add this setting as a variable in the header of the initscript. Ideally it should be parsed through the relevant /etc/default file.

-----
NAGIOS_USER=srv-monitor
[...]
        chown "$NAGIOS_USER" "$PIDDIR"
-----



Cheers,
-kali-



-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.5.0-51-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages nagios-nrpe-server depends on:
ii  adduser      3.113ubuntu2
ii  libc6        2.15-0ubuntu10.5
ii  libssl1.0.0  1.0.1-4ubuntu5.16
ii  libwrap0     7.6.q-21
ii  lsb-base     4.0-0ubuntu20.3

Versions of packages nagios-nrpe-server recommends:
ii  nagios-plugins        1.4.15-5ubuntu3.2
ii  nagios-plugins-basic  1.4.15-5ubuntu3.2

nagios-nrpe-server suggests no packages.

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to