Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there a way for me to configure Nagios to allow user to access only "Tactical Overview" (/nagios/cgi-bin/tac.cgi) through 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
# 
share|improve this question

1 Answer 1

Through Nagios? Not that I'm aware of. You could probably hack your apache configuration to allow it, though.

(Full disclosure: I haven't tested this.)

Maybe something like

<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>

combined with separating the users into groups would do what you're looking for.

share|improve this answer
    
I was thinking of doing it through Apache as well, just from looking at your example, you're missing AuthGroupFile, but I get the idea.. –  alexus Aug 14 '13 at 14:13
    
Yeah. I went ahead and added it. :) –  Katherine Villyard Aug 14 '13 at 16:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.