.htpasswd login
Chris
atstake at gmail.com
Mon Mar 23 02:55:02 CET 2009
On Fri, Mar 20, 2009 at 5:08 PM, Klaus Umbach
<treibholz at sozial-inkompetent.de> wrote:
> On 20/03/09 16:28, Chris wrote:
>> I like to implement .htpasswd so users can log in using their Active
>> Directory user name and password to have a basic view of Nagios
>> interface (as in a 'normal user') At the moment I have htpasswd.users
>> with only one user - nagiosadmin. I would like to keep the nagiosadmin
>> user to handle the admin. tasks. Everyone else will get a normal
>> active directory login.
>
> You can use LDAP-authentication in Apache and file-based-authentication
> parallel.
>
>
> <DirectoryMatch (/usr/share/nagios3/htdocs|/usr/lib/cgi-bin/)>
> Options FollowSymLinks
>
> DirectoryIndex index.html
>
> AllowOverride AuthConfig
> Order Allow,Deny
> Allow From All
>
> AuthName "Nagios Access"
> AuthType Basic
> AuthUserFile /etc/nagios3/htpasswd.users
>
> # LDAP Auth
> AuthBasicProvider ldap file
> AuthzLDAPAuthoritative off
> AuthLDAPBindDN "ACCOUNT"
> AuthLDAPBindPassword "PASSWORD"
> AuthLDAPURL "ldap://dc.foobar.de:389/ou=test,dc=foo,dc=bar,dc=de?sAMAccountName?sub?(ObjectClass=*)"
>
> require valid-user
> </DirectoryMatch>
Thanks. I have addedd AuthUserFile /etc/nagios/.htaccess to my
/etc/apache2/conf.d/nagios.conf
ScriptAlias /nagios/cgi-bin "/usr/lib/nagios/cgi"
<Directory "/usr/lib/nagios/cgi">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
AuthUserFile /etc/nagios/.htaccess
Require valid-user
</Directory>
Alias /nagios "/usr/share/nagios"
<Directory "/usr/share/nagios">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthName "Nagios"
AuthType Basic
AuthUserFile /etc/nagios/htpasswd.users
AuthUserFile /etc/nagios/.htaccess
Require valid-user
</Directory>
My /etc/nagios/.htaccess files look like this
AuthName "AD"
AuthType Basic
AuthLDAPURL ldap://ad:389/ou=tree,dc=company,dc=com?sAMAccountName?sub
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
require valid-user
I restarted apache2 and nagios, but now I can't login - neither as
nagiosadmin nor as AD user.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
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