For what is the nagios user and group requisite?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

For what is the nagios user and group requisite?

Post by Jessuzz94 »

In all tutorials of Installation of Nagios people tell that you need to create in the server nagios user and group, but all time i use my normal user of the server, for what is this user and group?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: For what is the nagios user and group requisite?

Post by jdalrymple »

Main Configuration Options wrote:Nagios User

Format: nagios_user=<username/UID>
Example: nagios_user=nagios

This is used to set the effective user that the Nagios process should run as. After initial program startup and before starting to monitor anything, Nagios will drop its effective privileges and run as this user. You may specify either a username or a UID.
Nagios Group

Format: nagios_group=<groupname/GID>
Example: nagios_group=nagios

This is used to set the effective group that the Nagios process should run as. After initial program startup and before starting to monitor anything, Nagios will drop its effective privileges and run as this group. You may specify either a groupname or a GID.
It's a privilege separation thing like anything else. You can run the nagios daemon as any user you want, however it works well to use those defined in said tutorials as they generally track in such a way that all commands, command files, and such work well together. You might have to do some extra manual configuration (such as that in this file) if you want to use a different user - not recommended by us.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: For what is the nagios user and group requisite?

Post by Jessuzz94 »

But, its normal and fine if i used my default account of my server all the time?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: For what is the nagios user and group requisite?

Post by jdalrymple »

Jessuzz94 wrote:But, its normal
It is not normal. Normal is to use the nagios user and group.
Jessuzz94 wrote:and fine if i used my default account of my server all the time?
That depends on your definition of fine.
https://en.wikipedia.org/wiki/Privilege_separation
If you don't care to have privilege separation (insecure) then yes, it's fine.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: For what is the nagios user and group requisite?

Post by Jessuzz94 »

So, if i start of 0 configuring nagios, its better used all commands with the nagios user?
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: For what is the nagios user and group requisite?

Post by jdalrymple »

This is the default. You would have to take EXTRA steps to use a different user account.

Yes, we highly recommend you use the nagios user. It is up to you though to configure it as you see fit.

All nagios documentation, plugins, wizards, etc are written with the assumption that the user nagios processes checks, results, notifications and such. If you change this everything you do down the road may be subject to modification to fit your unique environment.
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: For what is the nagios user and group requisite?

Post by Jessuzz94 »

Wow, in one machine i did all with the default user as i created in the ubuntu installation and all runs fine, email notifications, snmp for the switches and routers, mrtg to bandwidth, but i will do again with nagios user, i think that it have more security to the server
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: For what is the nagios user and group requisite?

Post by jdalrymple »

You may get away with it today - but you will likely thank yourself down the road if you start with the recommended configuration. We have thousands of instances of the software running globally, probably 999 out of 1000 or more using the default user configuration.

OK to lock the thread?
Jessuzz94
Posts: 162
Joined: Thu Jun 04, 2015 12:08 pm

Re: For what is the nagios user and group requisite?

Post by Jessuzz94 »

Yes, only one issue, with the nagios user i cant do some things, like extract the file tar xzf nagios-4.0.8.tar.gz to install nagios, it give me error
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: For what is the nagios user and group requisite?

Post by Box293 »

What is the command you are using and what is the error it gives?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked