Implementation of pam_tally2.so counts successful logins as failures

This document (7011883) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11

Situation

After adding pam_tally2.so to /etc/pam.d/common-auth file like this:

auth    required    pam_env.so
auth    required    pam_unix2.so
auth    required    pam_tally2.so onerr=fail deny=6


After each successful login, the failed login count is incremented.  After the number of successful logins matches the maximum failed login count the account is locked and the account has to be manually reset.

The user logs in successfully.

user1@server:~> ssh geeko@sles15sp3
Password:
Last login: Fri Jul 16 10:56:54 2021 from 192.168.0.170
geeko@sles15sp3:~>


However, on the server pam_tally2 shows a login failure.

sles15sp3:~ # pam_tally2
Login           Failures Latest failure     From
geeko               1    07/16/21 10:57:16  192.168.0.170


When the user correctly logs in after the sixth attempt (matching deny=6 above), they get an error and locked account.

user1@server:~> ssh geeko@sles15sp3
Password:
Account locked due to 7 failed logins


The pam_tally2 command shows too many failed login attempts.

sles15sp3:~ # pam_tally2
Login           Failures Latest failure     From
geeko               7    07/16/21 10:59:50  192.168.0.170

 

Resolution

By adding the following line to the /etc/pam.d/common-account file this problem will be resolved:

account    required    pam_tally2.so

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7011883
  • Creation Date: 05-Mar-2013
  • Modified Date:16-Jul-2021
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center