PDA

View Full Version : Nagios User not found but Nagios User is there


Hildebrand
10-24-2008, 09:48 AM
Hello togehter,

we have Nagios 3.0.4 running on our Server.
Everthing works well with Nagios since many weeks.
No we want to install Centron on the same Server as nice addon.

During the installation we get this error:


Where is your CentPlugins Traps binary
default to [/usr/local/centreon/bin]
>
Path /usr/local/centreon/bin OK
Finding Apache group : www-data
Finding Apache user : www-data
Nagios User not found FAIL
Have you create you nagios user ? use this command
useradd -G

If you want to force a nagios user name, use (FORCE_)NAGIOS_USER variable(s) in a template file and try 'bash install.sh -f file'

Do you want me to remove the centreon temporary working space to continue installation ?
[y/n], default to [y]:
>

But there is a nagios User:

srv-monitor01:/usr/local/src/centreon-2.0-RC7# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/bin/sh
man:x:6:12:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
list:x:38:38:Mailing List Manager:/var/list:/bin/sh
irc:x:39:39:ircd:/var/run/ircd:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
user:x:1000:1000:user,,,:/home/user:/bin/bash
sshd:x:100:65534::/var/run/sshd:/usr/sbin/nologin
nagios:x:1001:1001:,,,:/home/nagios:/bin/bash
ntp:x:101:103::/home/ntp:/bin/false
postfix:x:102:105::/var/spool/postfix:/bin/false
mysql:x:103:107:MySQL Server,,,:/var/lib/mysql:/bin/false
ntop:x:104:108::/var/lib/ntop:/bin/false
snmp:x:105:65534::/var/lib/snmp:/bin/false
srv-monitor01:/usr/local/src/centreon-2.0-RC7#

And also a Nagios group called nagcmd

srv-monitor01:/usr/local/src/centreon-2.0-RC7# cat /etc/group
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
sasl:x:45:
plugdev:x:46:user
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
crontab:x:101:
ssh:x:102:
user:x:1000:
nagios:x:1001:
nagcmd:x:1002:nagios,www-data
ntp:x:103:
ssl-cert:x:104:
postfix:x:105:
postdrop:x:106:
mysql:x:107:
ntop:x:108:
srv-monitor01:/usr/local/src/centreon-2.0-RC7#

So where could be the problem that centron does not find the nagios user ?
Tested under Debian Etch with centron-2.0-RC7 and the SVN Checkout from yesterday.
We tried also to use the installer with the "-f" option and a variable File.
But that does also not work.

LOG_DIR="$BASE_DIR/log"
LOG_FILE="$LOG_DIR/install_centreon.log"
TMPDIR="/tmp/centreon-setup"
SNMP_DIR="/etc/snmp/"
CENTREON_CONF_1_4="/etc/[co][er][ne][to][rn]*.conf"
DEFAULT_CENTREON_CONF="/etc/centreon/centreon.conf"
CENTREON_CONF="/etc/centreon.conf"
#use $CENTREON_ETC/centreon.conf
PEAR_MODULES_LIST="pear.lst"
DEFAULT_INSTALL_DIR_NAGIOS="/usr/local/nagios"
DEFAULT_INSTALL_DIR_CENTREON="/usr/local/centreon"
DEFAULT_NAGIOS_ETC="/usr/local/nagios/etc"
DEFAULT_NAGIOS_PLUGIN="/usr/local/nagios/libexec"
DEFAULT_NAGIOS_IMG="/usr/local/nagios/share/images/s"
DEFAULT_NAGIOS_BINARY="/usr/local/nagios/bin/nagios"
DEFAULT_NAGIOSTATS_BINARY="/usr/local/nagios/bin/nagiostats"
DEFAULT_NAGIOS_VAR="/usr/local/nagios/var"
DEFAULT_NDO2DB_BINARY="/usr/sbin/ndo2db"
DEFAULT_NDOMOD_BINARY="/usr/sbin/ndomod.o"
DEFAULT_RRD_PERL="/usr/lib/perl5"
DEFAULT_SUDO_FILE="/etc/sudoers"
DEFAULT_WEB_USER="www-data"
DEFAULT_WEB_GROUP="www-data"
DEFAULT_NAGIOS_USER="nagios"
DEFAULT_NAGIOS_GROUP="nagcmd"
DEFAULT_BIN_RRDTOOL="/usr/bin/rrdtool"
DEFAULT_BIN_MAIL="/usr/bin/mail"
DEFAULT_BIN_SSH="/usr/bin/ssh"
DEFAULT_BIN_SCP="/usr/bin/scp"
DEFAULT_INIT_D="/etc/init.d"
DEFAULT_CRON_D="/etc/cron.d"
DEFAULT_PEAR_PATH="/usr/share/php"
DEFAULT_PHP_BIN="/usr/bin/php"
DEFAULT_PERL_BIN="/usr/bin/perl"
DEFAULT_CENTREON_LOG="/usr/local/centreon/log"
DEFAULT_CENTREON_ETC="/etc/centreon"
DEFAULT_CENTREON_RUNDIR="/var/run/centreon"
DEFAULT_CENTREON_GENDIR="/usr/local/centreon"
DEFAULT_CENTREON_VARLIB="/var/lib/centreon"
DEFAULT_CENTSTORAGE_RRD="/var/lib/centreon"
DEFAULT_CENTPLUGINS_TMP="/var/lib/centreon/centplugins"
DEFAULT_CENTSTORAGE_BINDIR="bin"
DEFAULT_CENTCORE_BINDIR="bin"
DEFAULT_SNMP_ETC="/etc/snmp"
DEFAULT_SNMPTT_BINDIR="/usr/local/centreon/bin/"
DEFAULT_CENTPLUGINSTRAPS_BINDIR="/usr/local/centreon/bin"



Thanks for any help.
- Hildebrand

WAtt
10-24-2008, 10:32 AM
Hi,

To define nagios user and group, I use nagios.cfg file.

Could you check in this file if user exist ?


I use this method on install script:
[code]
* get user and group in nagios.cfg
* test if user exist on server
[code]

Hildebrand
10-24-2008, 10:58 AM
And exaclty this was the problem/solution.
The User and the Group was not defind in the nagios.cfg.

Now i can go on with the installation.

Thanks!

Hildebrand
11-03-2008, 12:49 PM
This was exactly the Problem and solution. THANKS!

BTW: I replied a week before here and a message said that my post first must be read by an Mod and then get unlock.