Installation fails: "User 'nagios' was not created

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gabrotherton
Posts: 57
Joined: Wed Dec 03, 2014 11:16 am

Installation fails: "User 'nagios' was not created

Post 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
You do not have the required permissions to view the files attached to this post.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

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

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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.
gabrotherton
Posts: 57
Joined: Wed Dec 03, 2014 11:16 am

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

Post 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.
Locked