有没有办法让我配置 Nagios 以允许用户仅/nagios/cgi-bin/tac.cgi
通过 访问“战术概述” () cgi.cfg
?
# grep ^authorized_for_ /etc/nagios/cgi.cfg
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
#
答案1
通过 Nagios?据我所知没有。不过,你也许可以修改你的 Apache 配置以允许它。
(坦白说:我还没有测试过这个。)
也许类似
<DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/nagios3|/etc/nagios3
/stylesheets)>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride AuthConfig
Order Allow,Deny
Allow From All
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
AuthGroupFile /etc/nagios3/htpasswd.groups
<files index.php|side.php|tac.cgi>
require group ViewTac
</files>
require group FullAccess
</DirectoryMatch>
结合将用户分为群组会做你想做的事。