Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRPE v4.1 repo EPEL : nrpe_user and nrpe_group in nrpe.fg not used #279

Open
jbeaujour opened this issue Sep 13, 2023 · 2 comments
Open
Labels

Comments

@jbeaujour
Copy link

When installing the NRPE package from the EPEL repo on REDHAT 8, the file /usr/lib/systemd/system/nrpe.service is created for systemd and is configured for a linux user "nrpe".
If we want to change this user in the /etc/nagios/nrpe.cfg file or in an include file, without changing the systemd file, this user (for example "nagios") is not used.
It is mandatory to modify the systemd file /usr/lib/systemd/system/nrpe.service to achieve the desired result
Is this a nrpe bug or do these two values have no use in the nrpe.cfg file?
Is there another method to achieve the desired result?
THANKS

@sawolf
Copy link
Contributor

sawolf commented Sep 13, 2023

My understanding of the nrpe_user and nrpe_group directives is that NRPE expects to start as root, and "drop" permissions to the specified levels after startup. A non-root user will not be able to set their UID or GID, so if you set it separately in your systemd file, the nrpe.cfg directives may not be usable.

I do think we should at least log a warning or info message when this fails, though, so I'll keep this issue open for now.

@jbeaujour
Copy link
Author

jbeaujour commented Sep 13, 2023

Indeed, I entered the user as "root" in nrpe.service and the user as "nagios" in nrpe.cfg, and in this case the nrpe daemon is started in "nagios"
On the other hand, we want to use the rpm package from EPEL and which will create the nrpe.service file itself.
In this case, should we ask the packager to reintroduce the creation of the nrpe.service file with the "root" user?

I guess it's the --with-nrpe-user=<user> configure option that will change this user

Otherwise do we have to recompile the package ourselves? what we do not want to do if possible
THANKS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants