We want (have) changed the default username and group from our default installation icinga2.
From “nagios” to “icinga”, why… hmm we think it have to. We use the repo from icinga.
Changed the following file: → “/etc/default/icinga2”
# default settings for icinga2's initscript
ICINGA2_USER="icinga"
ICINGA2_GROUP="icinga"
#DAEMON_ARGS="-e /var/log/icinga2/icinga2.err"
we can stop, start, reload, restart … and so one… works like a charm… so far so good
● icinga2.service - Icinga host/service/network monitoring system
Loaded: loaded (/lib/systemd/system/icinga2.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/icinga2.service.d
└─limits.conf
Active: active (running) since Tue 2021-09-14 11:08:43 CEST; 12min ago
Process: 781 ExecStartPre=/usr/lib/icinga2/prepare-dirs /etc/default/icinga2 (code=exited, status=0/SUCCESS)
Main PID: 795 (icinga2)
Status: “Startup finished.”
but… if we want to check the config icinga2 daemon -C we got this error
critical/cli: Invalid group specified: nagios
with -x debug it also not working to get more information.
I tried do change directly username and group in /usr/lib/icinga2/prepare-dirs but dind’t help either
Somebody a idea, or is it compiled with group “nagios”?
Many thanks
Because icinga2 daemon -C is not working any more and to troubleshot with systemctl status icinga2.service is very annoying. I changed the group back from icinga to nagiosgroupmod --new-name nagios icinga … but now I stuck with
# icinga2 daemon -C
critical/cli: Invalid user specified: nagios
so now back on “nagios:nagios” … but it would be nice if somebody has a idea.
we think it make’s more sense to rename the user and group like i wrote above “icinga:icinga”.
our monitoring admins have to login with a unprivileged user … and it would be nice if the user would be “icinga” and not “nagios”. when we talk about monitoring, all talk from “icinga”. and last time our youngest employee (apprentice) ask me why i have to login with “nagios”, and hi got right. For almost all it looks like cosmetic…… but a example: my sons name is Marco, and I don’t call them Stephan
Both the nagios and icinga users are created with /sbin/nologin (at least on CentOS 7), so you may want to consider why you want users logging in as them in the first place.
We won’t work as root, and it offers to work with the user which the service runs. I think there’s “many roads lead to rome” or “There’s more than one way to skin a cat”
Thanks both for the response
From my point of view, for this “not necessary” challenge, we found a option to change username by editing /etc/default/icinga2 and it works……. except icinga2 daemon -C.. and we want ask the community if we miss something.