[Pkg-nagios-devel] Bug#640064: icinga-common: Please be consistent: either use hardcoded or customized user/group in icinga initscript
Patricia Jung
pju at censhare.com
Wed Jun 13 10:15:08 UTC 2012
Package: icinga-common
Version: 1.0.2-2
Severity: normal
Hello,
as I do understand why you're insisting on nagios:nagios as a hardcoded user in the icinga init script, the init script is inconsistent when it comes to this issue: check_config () honours icinga_user/icinga_group settings in icinga.cfg while start() does not. This leads to the problem that icinga won't start up with a completely valid and consistent customized icinga.cfg.
There are two ways to solve the problem:
1) Implement an appropriate error message in check_config () if $icinga_user != "nagios" or $icinga_group != "nagios".
2) Apply the following patch to /etc/init.d/icinga which allows icinga to start up with customized user/group settings:
--- /etc/init.d/icinga 2012-06-13 11:21:53.626034466 +0200
+++ /etc/init.d/icinga_orig 2012-06-13 11:21:13.234034826 +0200
@@ -123,7 +123,7 @@
start () {
DIRECTORY=$(dirname $THEPIDFILE)
[ ! -d $DIRECTORY ] && mkdir -p $DIRECTORY
- chown $(get_config icinga_user):$(get_config icinga_group) $DIRECTORY
+ chown nagios:nagios $DIRECTORY
if ! check_started; then
if ! check_named_pipe; then
-- System Information:
Debian Release: 6.0.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages icinga-common depends on:
ii adduser 3.112+nmu2 add and remove users and groups
ii bsd-mailx [mailx] 8.1.2-0.20100314cvs-1 simple mail user agent
ii coreutils 8.5-1 GNU core utilities
ii lsb-base 3.2-23.2squeeze1 Linux Standard Base 3.2 init scrip
ii nagios-plugins-bas 1.4.15-3squeeze1 Plugins for the nagios network mon
ii ucf 3.0025+nmu1 Update Configuration File: preserv
Versions of packages icinga-common recommends:
ii nagios-plugins 1.4.15-3squeeze1 Plugins for the nagios network mon
icinga-common suggests no packages.
-- Configuration Files:
/etc/icinga/icinga.cfg changed [not included]
/etc/init.d/icinga changed [patch see above]
-- no debconf information
Best
Patricia
--
Patricia Jung
Senior Software and Support Engineer
censhare AG
Paul-Gerhardt-Allee 50, 81245 Muenchen, Germany
Fon +49 89 568236-311
Fax +49 89 568236-501
http://www.censhare.com
http://blog.censhare.com
Vorstand: Walter Bauer, Robert Motzke, Dieter Reichert
Aufsichtsratsvorsitzende: Veronika Lorenz
Handelsregister: Amtsgericht Muenchen HRB 140617
USt-ID: DE219222021
More information about the Pkg-nagios-devel
mailing list