Page 1 of 1

Administrator and Acknowledgment

Posted: Wed Apr 11, 2012 2:31 am
by srrhd
Hi,

It appears that users with Admin authorization level can't acknowledge a problem. Only the default user 'nagiosadmin' can.

Looking into the users profile i found nothing to allow this action. Is this a bug, or a permission problem on our server ?

Regards,

Aurelien.

Re: Administrator and Acknowledgment

Posted: Wed Apr 11, 2012 8:32 am
by scottwilkerson
Has this Admin account ever logged in to the XI interface, or have you just masqueraded as the user?

The reason I ask is that the user is added to the htpasswd file that Nagios Core uses the first time they login to XI. If this hasn't been done, they may not have the authorization to submit the command.

Re: Administrator and Acknowledgment

Posted: Mon Apr 16, 2012 9:12 am
by srrhd
Yes it had. In fact, i tryed to acknowledge from the XI Interface.

As you pointed the utilization of htpasswd, i gave a look at it and if /usr/local/nagiosxi/etc/htpasswd.users contains all the users, /usr/local/nagios/etc/htpasswd.users contains only "nagiosadmin". I tryied to implement all the users into the nagios' htpasswd but the problem persist. Here is the error message:
192.168.80.188 - 2012-04-16 - 18h-05m-00s.png

Re: Administrator and Acknowledgment

Posted: Mon Apr 16, 2012 9:24 am
by mguthrie
The admin level permissions need to write to the /usr/local/nagios/etc/cgi.cfg file. Can you post either the cgi.cfg file or the config directives that this admin user is authorized for in that file?

Re: Administrator and Acknowledgment

Posted: Mon Apr 16, 2012 6:29 pm
by scottwilkerson
I believe this was solved via email by restarting apache.

Re: Administrator and Acknowledgment

Posted: Mon Apr 16, 2012 11:51 pm
by srrhd
Mike, here is the cgi.cfg:

Code: Select all

[root@NagiosXI]# cat /usr/local/nagios/etc/cgi.cfg
# MODIFIED
default_statusmap_layout=6


# UNMODIFIED
action_url_target=_blank
authorized_for_all_host_commands=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_system_information=nagiosadmin
default_statuswrl_layout=4
escape_html_tags=1
lock_author_names=1
main_config_file=/usr/local/nagios/etc/nagios.cfg
notes_url_target=_blank
physical_html_path=/usr/local/nagios/share
ping_syntax=/bin/ping -n -U -c 5 $HOSTADDRESS$
refresh_rate=90
show_context_help=0
url_html_path=/nagios
use_authentication=1
use_pending_states=1
use_ssl_authentication=0
I guess it says that only nagiosadmin has right on things... Here is how the user is defined:
192.168.80.188 - 2012-04-17 - 08h-45m-49s.png
Scott, i don't know which email you are refering to, but a "service httpd restart" do not solve the problem.

Re: Administrator and Acknowledgment

Posted: Tue Apr 17, 2012 9:20 am
by mguthrie
It looks like the cgi.cfg file didn't get updated properly when the admin permission was assigned, maybe because of a permissions issue with the file (??).

Code: Select all

-rw-rw-r-- 1 apache nagios 1042 Apr 13 15:32 cgi.cfg
Try creating a test admin user and see if they get added to the cgi.cfg file, if they do you can probably just recreate this admin user to fix the issue. Maybe keep an eye on the apache log as well during this process in case it fails.

Code: Select all

tail -f /var/log/httpd/error_log

Re: Administrator and Acknowledgment

Posted: Wed Apr 18, 2012 1:44 am
by srrhd
As all the users were created longtime ago maybe the problem of cgi.cfg's update was solved since.

Creating a new user force the update and now all the Admin user appear in the cgi.cfg.

Just two points that seems wierd:
  • * all the users are listed twice.
    * after deleting the Admin test user, it still appear in the cgi.cfg.
Whatever those points aren't blocking for us. Thanks for your support, once again.

Aurelien.

Re: Administrator and Acknowledgment

Posted: Wed Apr 18, 2012 1:49 am
by srrhd
I just read in the change log that the problem of deletion is fixed in the new release. You're fast ! :D

Re: Administrator and Acknowledgment

Posted: Wed Apr 18, 2012 9:11 am
by mguthrie
We'll keep our eyes open for the issue of the users being listed twice. Thanks for the update!