Re: PAM-Konfiguration
On Mon, 2020-02-17 at 15:10 +0100, Martin Johannes Dauser wrote:
> Hallo,
>
> falls du die log-Einträge von pam meinst, so würde ich sagen: "nein".
>
> Selbiges passiert z.B. bei Nutzung von pam_unix vor pam_ldap. Da musste
> ich einmal die RegularExpressions von fail2ban anpassen, damit fail2ban,
> durch die negativen log-Einträge von pam.unix, die LDAP-User nicht
> einfach aussperrt.
>
> [default=ignore] sagt, dass das Ergebnis in der PAM-Bewertung bei
> Mißerfolg nicht bewertet werden soll, aber ein Log-Eintrag wird trotzdem
> geschrieben, und ich schätze dieser Log-Eintrag wird von deiner
> Anwendung ausgelesen.
>
Es muss hier nicht unbedingt /var/log/ ausgelesen werden, vielleicht
liefert pam per dbus seine Zwischenergebnisse ab? (Wobei mir hierfür
kein sinnvoller Use-Case einfallen würde ...)
> Martin
>
> On Thu, 2020-02-13 at 16:58 +0100, Christoph Pleger wrote:
> > Hallo,
> >
> > ich habe eine PAM-Konfiguration erstellt, die es ermöglichen soll, dass
> > ein Benutzer sich entweder mit einer Smartcard und einer passenden PIN
> > einloggen kann, oder mit UNIX-Passwort. So sieht meine
> > /etc/pam.d/common-auth aus:
> >
> > #
> > # /etc/pam.d/common-auth - authentication settings common to all
> > services
> > #
> > # This file is included from other service-specific PAM config files,
> > # and should contain a list of the authentication modules that define
> > # the central authentication scheme for use on the system
> > # (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
> > # traditional Unix authentication mechanisms.
> > #
> > # As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
> > # To take advantage of this, it is recommended that you configure any
> > # local modules either before or after the default block, and use
> > # pam-auth-update to manage selection of other modules. See
> > # pam-auth-update(8) for details.
> >
> > auth [success=2 default=ignore] pam_p11.so
> > /usr/local/lib/libcvP11.so
> >
> > # here are the per-package modules (the "Primary" block)
> > auth [success=1 default=ignore] pam_unix.so nullok_secure
> > # here's the fallback if no module succeeds
> > auth requisite pam_deny.so
> > # prime the stack with a positive return value if there isn't one
> > already;
> > # this avoids us returning an error just because nothing sets a success
> > code
> > # since the modules above will each just jump around
> > auth required pam_permit.so
> > # and here are more per-package modules (the "Additional" block)
> > auth optional pam_group.so
> > auth optional pam_cap.so
> > # end of pam-auth-update config
> >
> >
> > Das funktioniert auch fast wie gewünscht, "fast" deswegen, weil bei
> > Anmeldung mit Unix-Passswort der Login zwar funktioniert, die Anwendung
> > aber trotzdem vorher kurz "Anmeldung fehlgeschlagen" anzeigt. Gibt es
> > eine Möglichkeit, die falsche Fehlermeldung weg zu bekommen?
> >
> > Viele Grüße
> > Christoph
> >
Reply to: