Linux PAM: pam_tally

Hi,

ich versuche momentan den Login so zu konfigurieren, dass man nach 3 Fehlversuchen gesperrt ist. Dazu brauche ich ja das PAM Modul pam_tally.so.

In der man page steht
Code:
EXAMPLES
       Add the following line to /etc/pam.d/login to lock the account after
       too many failed logins. The number of allowed fails is specified by
       /var/log/faillog and needs to be set with pam_tally or faillog(8)
       before.

           auth     required       pam_securetty.so
           auth     required       pam_tally.so per_user
           auth     required       pam_env.so
           auth     required       pam_unix.so
           auth     required       pam_nologin.so
           account  required       pam_unix.so
           password required       pam_unix.so
           session  required       pam_limits.so
           session  required       pam_unix.so
           session  required       pam_lastlog.so nowtmp
           session  optional      pam_mail.so standard

In anderen Tutorials lese ich aber von einem auth und einem account Eintrag. Was ist nun Sache? Ich glaube mir ist auch der Unterschied zwischen auth und account tasks nicht klar geworden bisher.

Außerdem möchte ich den Eintrag lieber in /etc/pam.d/common-auth machen, da es nicht nur für das login Kommando gelten soll. Wie entscheide ich hier an welcher Stelle im Stack ich den Eintrag mache??
Code:
# here are the per-package modules (the "Primary" block)
auth	sufficient	pam_thinkfinger.so
auth	[success=1 default=ignore]	pam_unix.so try_first_pass 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_smbpass.so migrate
# end of pam-auth-update config

mfg
serow


EDIT: Sry evtl wäre gut gewesen zu posten was ich konfiguriert habe und wie es sich verhält:

/etc/pam.d/common-auth
Code:
# here are the per-package modules (the "Primary" block)
auth 	required	pam_tally.so	onerr=fail deny=3 magic_root no_reset
auth	sufficient	pam_thinkfinger.so
auth	[success=1 default=ignore]	pam_unix.so try_first_pass 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_smbpass.so migrate
# end of pam-auth-update config

/etc/pam.d/common-account
Code:
# here are the per-package modules (the "Primary" block)
account required pam_tally.so onerr=fail magic_root no_reset
account	[success=1 new_authtok_reqd=done default=ignore]	pam_unix.so 
# here's the fallback if no module succeeds
account	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
account	required			pam_permit.so
# and here are more per-package modules (the "Additional" block)
# end of pam-auth-update config

Der Counter wird bei Fehllogins zwar hochgezählt, aber ich werden nicht ausgesperrt. Trotz der no_reset Optionen wird der Counter auf 0 gesetzt wenn ich das Passwort richtig eingebe.

cu
serow

EDIT:
Auf Debian 5.0 führt folgender Eintrag in /etc/pam.d/common-auth dazu, dass ich mich der screensaver nicht mehr rein lässt:
Code:
auth 	required	pam_tally.so onerr=fail deny=5
Ich wünschte ich würde mal irgendwo ne funktionierendes Tutorial finden ...
 
Zurück
Oben