LDAP Authentification on Nagios 4

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

LDAP Authentification on Nagios 4

Postby cocoyanouck » Thu Feb 21, 2019 10:49 am

Hi,

I want to implement LDAP authentification on my Nagios 4.4.3 (Debian 9).
The goal is to connect with our windows account on the web interface instead of "nagiosadmin"

I tried to read several articles but I'm really lost ...

https://support.nagios.com/kb/article/a ... n-600.html
http://www.localhostrich.com/en/apache- ... gios-ldap/
https://blog.pythian.com/nagios-authent ... directory/
viewtopic.php?f=34&t=48916#p253463
https://itefix.net/content/nagios-authe ... -directory
https://access.redhat.com/documentation ... figuration

Could you help me to do this, step by step please ?

Thanks a lot.
cocoyanouck
 
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: LDAP Authentification on Nagios 4

Postby ssax » Mon Feb 25, 2019 9:44 am

Very strange, having trouble getting it working on my end as well. I'll let you know what I find.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 5052
Joined: Wed Feb 11, 2015 12:54 pm

Re: LDAP Authentification on Nagios 4

Postby ssax » Mon Feb 25, 2019 10:40 am

Here is what worked for me:

Code: Select all
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file.  Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

<Directory "/usr/local/nagios/sbin">
#  SSLRequireSSL
   Options ExecCGI
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
         AuthBasicProvider ldap
         AuthType Basic
         AuthName "Nagios Access"
         AuthLDAPURL "ldap://192.168.X.X:3268/dc=contoso,dc=local?sAMAccountName?sub" NONE
         AuthLDAPBindDN "CN=Your User,CN=Users,DC=contoso,DC=local"
         AuthLDAPBindPassword "Pass"
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>

Alias /nagios "/usr/local/nagios/share"

<Directory "/usr/local/nagios/share">
#  SSLRequireSSL
   Options None
   AllowOverride None
   <IfVersion >= 2.3>
      <RequireAll>
         Require all granted
         AuthBasicProvider ldap
         AuthType Basic
         AuthName "Nagios Access"
         AuthLDAPURL "ldap://192.168.X.X:3268/dc=contoso,dc=local?sAMAccountName?sub" NONE
         AuthLDAPBindDN "CN=Your User,CN=Users,DC=contoso,DC=local"
         AuthLDAPBindPassword "Pass"
         Require valid-user
      </RequireAll>
   </IfVersion>
   <IfVersion < 2.3>
      Order allow,deny
      Allow from all
#     Order deny,allow
#     Deny from all
#     Allow from 127.0.0.1

      AuthName "Nagios Access"
      AuthType Basic
      AuthUserFile /usr/local/nagios/etc/htpasswd.users
      Require valid-user
   </IfVersion>
</Directory>
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 5052
Joined: Wed Feb 11, 2015 12:54 pm

Re: LDAP Authentification on Nagios 4

Postby cocoyanouck » Mon Mar 11, 2019 9:38 am

Hi,

Great, it's working fine, thank you so much.

You can close this ticket :)
cocoyanouck
 
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: LDAP Authentification on Nagios 4

Postby ssax » Mon Mar 11, 2019 2:52 pm

That's great to hear, thanks for the update! Locking the thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 5052
Joined: Wed Feb 11, 2015 12:54 pm


Return to Community Support

Who is online

Users browsing this forum: Google [Bot] and 27 guests