can we configure nrpe to run as different user

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

can we configure nrpe to run as different user

Post by mohan23 »

We have some vms built in azure and due to some restrictions in naming conventions in azure, we can't create user nagios on endpoint Linux machine...


Is it possible to configure nrpe to run as user like s-nagios instead of nagios user? If so how? And what are the changes to be done while installing nrpe agent on server?

Is there any changes required on nagios server if we want to configure nrpe to run as s-nagios user instead of nagios on endpoint machine

Appreciate a quick response.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: can we configure nrpe to run as different user

Post by tgriep »

Yes, you can change which user the NRPE agent runs as.
If you use the linux-agent-installer that Nagios provides, you would have to edit the following files.

Code: Select all

/etc/xinetd.d/nrpe
/usr/local/nagios/etc/nrpe.cfg
Change the username to what you need.

Also, make sure the username you have setup can access and run the plugins in the /usr/local/nagios/libexec folder and that the user account is part of the nagios group in the /etc/group file.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Re: can we configure nrpe to run as different user

Post by mohan23 »

Can we have nagios run or installed with different user and group is also different group ? So
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: can we configure nrpe to run as different user

Post by tgriep »

Yes, you can use a different group to run the agent and also, install it as another group.
You would have to edit the installer script and subcomponents to change the user and group creation and settings to what you need.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mohan23
Posts: 118
Joined: Tue Oct 03, 2017 7:11 am

Re: can we configure nrpe to run as different user

Post by mohan23 »

Installing nrpe agent with different user ID and different group is fine.


I want to o install nagios xi with differ user ID and different group. I don't want nagios to run as nagios user, instead I want nagios to run as user called s-nagios and this user should be part of group called s-nagios... Can this be possible? And how
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: can we configure nrpe to run as different user

Post by tgriep »

Getting XI to run as a different user is not possible as the scripts are setup to use the nagios user account and they cannot be changed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked