How to add more users to the CORE?

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.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

How to add more users to the CORE?

Post by dlukinski »

Hi

How to add more read-only full view users to the CORE?

Thank you
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: How to add more users to the CORE?

Post by npolovenko »

@dlukinski, Here's what I did:
1. Create a new user via command line:

Code: Select all

htpasswd /usr/local/nagios/etc/htpasswd.users newusername
2. Create a contact for the new user:
nano /usr/local/nagios/etc/objects/contacts.cgf

Code: Select all

define contact{
        contact_name                    newuser            ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           newuser           ; Full name of user
        email                           newuser@localhost        ;
        }
3. Open the cgi.cgf file: nano /usr/local/nagios/etc/cgi.cfg
Find and chnage the following lines:

Code: Select all

authorized_for_read_only=newuser
authorized_for_all_services=nagiosadmin,newuser
authorized_for_all_hosts=nagiosadmin,newuser
4. Restart Nagios and apache

Code: Select all

service httpd restart
service nagios restart
5. Only If nagios will get stuck at verifying configuration during the step 4:
killall -9 nagios
service nagios start

That should do it.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: How to add more users to the CORE?

Post by dlukinski »

npolovenko wrote:@dlukinski, Here's what I did:
1. Create a new user via command line:

Code: Select all

htpasswd /usr/local/nagios/etc/htpasswd.users newusername
2. Create a contact for the new user:
nano /usr/local/nagios/etc/objects/contacts.cgf

Code: Select all

define contact{
        contact_name                    newuser            ; Short name of user
        use                             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias                           newuser           ; Full name of user
        email                           newuser@localhost        ;
        }
3. Open the cgi.cgf file: nano /usr/local/nagios/etc/cgi.cfg
Find and chnage the following lines:

Code: Select all

authorized_for_read_only=newuser
authorized_for_all_services=nagiosadmin,newuser
authorized_for_all_hosts=nagiosadmin,newuser[/code
4. Restart Nagios and apache[code]service httpd restart
service nagios restart
5. Only If nagios will get stuck at verifying configuration during the step 4:
killall -9 nagios
service nagios start

That should do it.

This worked. Thank you, please close the case
Locked