Page 1 of 1

How to add more users to the CORE?

Posted: Tue Jan 30, 2018 10:38 am
by dlukinski
Hi

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

Thank you

Re: How to add more users to the CORE?

Posted: Tue Jan 30, 2018 11:27 am
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.

Re: How to add more users to the CORE?

Posted: Thu Feb 01, 2018 7:53 am
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