有没有办法让我配置 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
#
Run Code Online (Sandbox Code Playgroud)
通过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>
Run Code Online (Sandbox Code Playgroud)
结合将用户分组会做你正在寻找的东西。