Possible bug with NRPE running under xinetd
Posted: Fri Jan 26, 2018 1:43 pm
This is based on my experience with NRPE 3.2.0 on CentOS 7.4, although based on my reading of the NRPE source it would affect other versions as well.
The default /etc/nagios/nrpe.cfg indicates in the comments that the nrpe_user and nrpe_group options are ignored if running under xinetd.
However, I've found that the behavior differs if they are set in nrpe.cfg versus not being set at all, which suggests they are not ignored.
I have 2 related users on my system:
And 2 related groups:
In nrpe.cfg:
In /etc/xinetd.d/nrpe:
This leads to warnings in the messages log such as:
I've found 2 ways to eliminate the warnings:
The default /etc/nagios/nrpe.cfg indicates in the comments that the nrpe_user and nrpe_group options are ignored if running under xinetd.
However, I've found that the behavior differs if they are set in nrpe.cfg versus not being set at all, which suggests they are not ignored.
I have 2 related users on my system:
Code: Select all
nagios:x:995:993::/var/spool/nagios:/sbin/nologin
nrpe:x:994:992:NRPE user for the NRPE service:/var/run/nrpe:/sbin/nologinCode: Select all
nagios:x:993:nrpe
nrpe:x:992:Code: Select all
nrpe_user=nrpe
nrpe_group=nrpeCode: Select all
user = nagios
group = nagiosCode: Select all
Jan 25 16:40:53 trinculo nrpe[30095]: Warning: Could not set effective GID=992
Jan 25 16:40:53 trinculo nrpe[30095]: Warning: Unable to change supplementary groups using initgroups()
Jan 25 16:40:53 trinculo nrpe[30095]: Warning: Could not set UID=994- Specify user/group nrpe/nrpe in /etc/xinetd.d/nrpe (no supplemental groups)
- Comment out the nrpe_user and nrpe_group in /etc/nagios/nrpe.cfg