Page 1 of 1

Installation fails: "User 'nagios' was not created

Posted: Mon Mar 16, 2015 11:03 am
by gabrotherton
Good morning,

I need help installing Nagios XI on a machine mounted on the NFS network.

We are installing our licensed version of Nagios XI on RHEL 6.6 64-bit. Before running the installation, I created the nagios user and the groups nagios and nagcmd. In our network, the users and groups are all mounted, so there is no local nagios user installed. I have manually added the mount point in the fstab so there is a /home/nagios directory. However when I run the ./fullinstall script as root the install is failing with this error:

Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
RESULT=0
Running './2-usersgroups'...
Adding users and groups...
useradd: user 'nagios' already exists
groupadd: group 'nagios' already exists
groupadd: group 'nagcmd' already exists
ERROR: User 'nagios' was not created - exiting.
RESULT=1

Re: Installation fails: "User 'nagios' was not created

Posted: Mon Mar 16, 2015 11:48 am
by jdalrymple
Removing the error checking for the user creation is pretty trivial, and we can help you with that.

The question is what are you trying to achieve? Is it just the goal to have an NFS mounted home directory? This will not network mount the Nagios config files. If nothing like that and you just wish to have that NFS mounted home directory simply comment out the lines 33 and 40 in nagiosxi/2-usergroups:

Code: Select all

     32         echo "ERROR: User '$nagiosuser' was not created - exiting." >&2
     33 #       exit 1
     34 fi
     35
     36 # Make sure groups exist
     37 for group in "$nagiosgroup" "$nagioscmdgroup"; do
     38         if ! grep -q "^$group:" /etc/group; then
     39                 echo "ERROR: Group '$group' was not created - exiting." >&2
     40 #               exit 1
     41         fi

Re: Installation fails: "User 'nagios' was not created

Posted: Mon Mar 16, 2015 11:50 am
by ssax
You can also skip over this section by running the command below in the root of your XI installer directory:

Code: Select all

touch installed.usersgroups
*** Make sure that you've added your apache user to the nagios and nagcmd groups in /etc/group

Then run ./fullinstall again and it should skip that section.

Re: Installation fails: "User 'nagios' was not created

Posted: Mon Mar 16, 2015 12:56 pm
by gabrotherton
Thanks for the update and the quick solutions. I did use the second reply to by-pass the check and the installation completed. I was able to login and activate my license key.

This thread can be closed.