Q: Need to use a default user, but still allow changing to another user

Marc Powell marc at ena.com
Wed Mar 19 15:11:24 CET 2008



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Cary Petterborg
> Sent: Tuesday, March 18, 2008 10:26 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Q: Need to use a default user,but still allow
> changing to another user
> 
> We are trying to make things easy for "managers" who want to look at
> statuses without logging in (it is a request by the managers, not
> something WE thought up on our own to help them). This can be done by
> setting a default user, right? So you set the default user, but then
you
> can't log in as a different user to get different views, etc.

I haven't tested this but I don't see why those would be mutually
exclusive...

> Does anyone have a solution that they are using for this type of case?
I

I think a very simple modification to your htaccess is all that's
necessary.

<Directory /usr/local/nagios/sbin>
    AllowOverride AuthConfig
    Options FollowSymLinks ExecCGI
    Order deny,allow
    Deny from all
    Allow from 192.168.1.10
# or Allow from 192.168
# or Allow from 192.168.1.0/24
# or Allow from yourdomain.com
    Satisfy any
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>

<Directory "/usr/local/nagios/share">
    Options None
    AllowOverride None
    Order deny,allow
    Deny from all
    Allow from 192.168.1.10
# or Allow from 192.168
# or Allow from 192.168.1.0/24
# or Allow from yourdomain.com
    Satisfy any
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>

The 'Satisy any' directive means that if either a specific Allow matches
_or_ the user passed authentication then they are allowed in. In the
first case, they wouldn't be prompted to log in, REMOTE_USER would not
be set and nagios would fall back to the default username.

--
Marc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list