Page 1 of 2
For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 2:11 pm
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?
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 2:40 pm
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.
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 3:19 pm
by Jessuzz94
But, its normal and fine if i used my default account of my server all the time?
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 3:23 pm
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.
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 3:28 pm
by Jessuzz94
So, if i start of 0 configuring nagios, its better used all commands with the nagios user?
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 3:36 pm
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.
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 3:52 pm
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
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 3:55 pm
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?
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 6:21 pm
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
Re: For what is the nagios user and group requisite?
Posted: Mon Jun 29, 2015 6:29 pm
by Box293
What is the command you are using and what is the error it gives?