Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hi Forum,

ich habe das Problem, das Nagios einen per LDAP authentifizierten User nicht ins Webfrontend lässt. Folgende Fehlermeldung (apache error log):


[Wed Nov 19 17:54:13 2008] [warn] [client 172.16.230.82] [16355] auth_ldap authenticate: user $USER authentication failed; URI /nagios/cgi-bin/tac.cgi [User not found][No such object]

[Wed Nov 19 17:54:13 2008] [error] [client 172.16.230.82] user $USER not found: /nagios/cgi-bin/tac.cgi

so sieht die apache cfg aus:

    ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

    <Directory "/usr/local/nagios/sbin">

      Options ExecCGI

      AllowOverride None

      Order allow,deny

      Allow from all

      AuthName "Nagios Access"

      AuthType Basic

      AuthzLDAPAuthoritative off

      AuthBasicProvider ldap

      AuthLDAPBindDN "cn=***,o=***"

      AuthLDAPBindPassword "***"

      AuthLDAPURL "ldaps://x.x.x.x/o=bug?uid?sub?groupMembership=cn=nagios_access,ou=**,o=**

      Require valid-user

    </Directory>


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

    <Directory "/usr/local/nagios/share">

       Options None

       AllowOverride None

       Order allow,deny

       Allow from all

       AuthName "Nagios Access"

       AuthType Basic

       AuthzLDAPAuthoritative off

       AuthBasicProvider ldap

       AuthLDAPBindDN "cn=***,o=***"

       AuthLDAPBindPassword "***"

       AuthLDAPURL "ldaps://x.x.x.x/o=bug?uid?sub?(groupMembership=cn=nagios_access,ou=***o=***

       Require valid-user

    </Directory>

Ich habe mir testhalber ein weiteres Verzeichnis eingerichtet und auch dort die LDAP-Authentifizierung verwendet. Dort kann ich mich mit meinem Login wie gewohnt anmelden. In diesem Testverzeichnis läuft eine phpinfo() um die Umgebungsvariable $_SERVER['remote_user'] auszulesen, welche von Nagios für die Prüfung der Berechtigung verwendet wird. Genau der Name steht auch in der Nagios cfg als berechtigter User und trotzdem kommt es zu o.b. Fehlermeldung im Log.

Such ich hier in der falschen Richtung oder was geht da schief? Irgendwelche Tips? Danke schonmal!

Gruß

Hallo,

bei mir funktioniert Nagios mit OpenLDAP ohne Probleme. Ich prüfe ab ob der Benutzer Mitglied der Gruppe "NagiosAccess" ist. Unten meine Konfig, den Block halt 2x, hab's etwas gekürzt. Nochwas: Das funktioniert so mit Apache 2.2; bei 2.0 oder noch älter sind die Direktiven andere... Nagios ist übrigens 3.0.3.

    AuthType                    Basic

    AuthBasicProvider           ldap

    AuthzLDAPAuthoritative      on

    AuthLDAPGroupAttribute      MemberUID

    AuthLDAPGroupAttributeIsDN  off

    AuthLDAPURL                 ldap://192.168.2.248/ou=Auth,dc=XXXX,dc=Local?uid?sub?objectClass=PosixAccount STARTTLS

    AuthName                    "Zugang zu Nagios"

    Require                     ldap-group cn=NagiosAccess,ou=Groups,ou=Auth,dc=XXXX,dc=Local

Falls das nicht weiter hilft: Was schreibt den der LDAP-Server auf? OpenLDAP z.B. ist da normalerweise sehr gesprächig (ggf. Loglevel anpassen). Alternativ vorübergehend mal kurz SSL/TLS abschalten und einen Sniffer ansetzten. Wireshark versteht das LDAP-Protokoll und gibt ebenfalls oftmals interessante Hinweise.

Greetz,

dd

Hi,

funktioniert! Ich Habe die require-Directive von valid-user auf ldap-group umgestellt und schon gehts :) Plus ein paar Kleinigkeiten. Es scheint das Nagios mit mod_auth im Zusammenspiel mit mod_authnz_ldap nicht sauber authentifizieren kann, warum is mir allerdings nicht ganz klaro...

Hier die Konfig für den Rest des Forums (falls interessiert :P)


    ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"

    <Directory "/usr/local/nagios/sbin">

      Options ExecCGI

      AllowOverride None

      Order allow,deny

      Allow from all

      AuthName "Nagios Access"

      AuthType Basic

      AuthzLDAPAuthoritative on

      AuthBasicProvider ldap

      AuthLDAPBindDN "cn=xxx,o=xxx"

      AuthLDAPBindPassword "xxx"

      AuthLDAPURL "ldaps://x.x.x.x/o=xxx?uid?sub?(objectClass=Person)"

      AuthLDAPGroupAttributeIsDN on

      Require ldap-group cn=NAGIOS_ACCESS,ou=xxx,o=xxx

    </Directory>


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

    <Directory "/usr/local/nagios/share">

       Options None

       AllowOverride None

       Order allow,deny

       Allow from all

       AuthName "Nagios Access"

       AuthType Basic

       AuthzLDAPAuthoritative on

       AuthBasicProvider ldap

       AuthLDAPBindDN "cn=xxx,o=xxx"

       AuthLDAPBindPassword "xxx"

       AuthLDAPURL "ldaps://x.x.x.x/o=xxx?uid?sub?(objectClass=Person)"

       AuthLDAPGroupAttributeIsDN on

       Require ldap-group cn=NAGIOS_ACCESS,ou=xxx,o=xxx

    </Directory>


Aber danke aufjedenfall :)

Cu


       AuthzLDAPAuthoritative on

       AuthLDAPGroupAttributeIsDN on

Das hier sind normalerweise die größten Knackpunkte. Bei "valid-user" sollte man ganz genau lesen was AuthzLDAPAuthoritative macht (auch das Kleingedruckte). Bei AuthLDAPGroupAttributeIsDN kommt's halt drauf an ob man den kompletten Pfad oder nur den Namen haben will. In der Regel reicht der Name...

Man hört sich, hab grad "Großkampfwochen", Grüßle,

dd

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.