Page 1 of 1

Don't create users / groups in offline installation

Posted: Wed Jan 09, 2019 7:51 am
by hubertbugaj
How can I omit the the step ./2-usersgroups in an offline installation? Creating the installed.usersgroups in the fullinstall directory didn't do the trick. I have to omit it because of an existing user in AD and the install script is failing here:

Code: Select all

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
The version I'm struggling to install is nagiosxi-5.5.8-1.el7.x86_64 on CentOS 7.5.1804.

Re: Don't create users / groups in offline installation

Posted: Wed Jan 09, 2019 4:26 pm
by npolovenko
@hubertbugaj, I looked at the code and there doesn't seem to be a way around this problem. Nagios verifies whether the user exists before touching the installed.usersgroups file. Try renaming the nagios user in the /etc/passwd and /etc/group files, then rename it back to the original after the installation is complete.

Re: Don't create users / groups in offline installation

Posted: Thu Jan 10, 2019 2:29 am
by hubertbugaj
The user nagios is in AD so it doesn't really exist in /etc/passwd.

Re: Don't create users / groups in offline installation

Posted: Thu Jan 10, 2019 6:56 am
by hubertbugaj
Managed to resolve the issue by temporarily leaving AD (removing lsass entries in /etc/nsswitch.conf for passwd).

Re: Don't create users / groups in offline installation

Posted: Thu Jan 10, 2019 8:17 am
by scottwilkerson
hubertbugaj wrote:Managed to resolve the issue by temporarily leaving AD (removing lsass entries in /etc/nsswitch.conf for passwd).
Glad to hear it is resolved.

Locking thread