RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1011894 - pam_tally2.so increasing failure counter even when auth was
Summary: pam_tally2.so increasing failure counter even when auth was
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pam
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-25 10:56 UTC by Alexey Moiseev
Modified: 2013-09-25 11:08 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-25 11:08:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alexey Moiseev 2013-09-25 10:56:07 UTC
Description of problem:
pam_tally2 increasing failure counter even if login was successful.
So i case if I set deny=3 to sshd pam configuration I'll be able
to login via ssh only 3 times and then will got error the following
message:
"Account locked due to 4 failed logins"

Version-Release number of selected component (if applicable):
Kernel: 2.6.32-279.el6.x86_64
pam-1.1.1-13.el6.x86_64

How reproducible:
Create a new user and configure pam settings for sshd 
to deny after 3 fail logins. Them configure ssh to use
ChallengeResponseAuthentication. Use this user to connect
via ssh from other box.

Steps to Reproduce:
1. Create user username

2. Modify /etc/pam.d/sshd by adding following line: 
auth required pam_tally2.so deny=3 unlock_time=600 
instead of 
auth required pam_sepermit.so

3. Modify /etc/ssh/sshd_config set 
PasswordAuthentication yes 
ChallengeResponseAuthentication yes

4. Restart sshd by following command:
service sshd restart

5. Check counter status using command:
pam_tally2 -u username

6. Connect to rhel mashine using user
username: ssh username@<ip address>
and enter correct password.

7. Repeat step 5. 

8. Repeat Steps 6 and 7 4 times.

Actual results:
After step 7 we got failure counter increased by 1.
After step 8 (make 4 connections) you'll got the following error message:
"Account locked due to 4 failed logins"

Expected results:
Fail counter should not be increased on successful login. 

Additional info:

Comment 2 Tomas Mraz 2013-09-25 11:08:31 UTC
Add pam_tally2 also to the account as sshd does not call the pam_setcred in the same process as authentication.


Note You need to log in before you can comment on or make changes to this bug.