Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1485490

Summary: 'authconfig --enablefaillock --update' incorrectly configuring pam stack
Product: Red Hat Enterprise Linux 7 Reporter: Eugene Keck <ekeck>
Component: authconfigAssignee: Pavel Březina <pbrezina>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: atalaran, ekeck, patdung100+redhat, pkis, tmraz
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-30 08:09:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eugene Keck 2017-08-25 21:22:15 UTC
Description of problem:
When running 'authconfig --enablefaillock --update' on a new Red Hat 7.4 server. The pam stack is incorrectly configured. 

Version-Release number of selected component (if applicable):
authconfig-6.2.8-30.el7

How reproducible:
Always

Steps to Reproduce:
1. 'authconfig --enablefaillock --update'

Actual results:
auth        required      pam_env.so
auth        required      pam_faildelay.so delay=2000000
auth        required      pam_faillock.so preauth silent deny=4 unlock_time=1200
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success
auth        required      pam_deny.so

account     required      pam_faillock.so
account     required      pam_unix.so
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     required      pam_permit.so

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok

auth        required      pam_faillock.so authfail deny=4 unlock_time=1200

password    required      pam_deny.so


Expected results:
auth        required      pam_env.so
auth        required      pam_faildelay.so delay=2000000
auth        required      pam_faillock.so preauth silent deny=4 unlock_time=1200
auth        sufficient    pam_unix.so nullok try_first_pass
auth        [default=die] pam_faillock.so authfail deny=4 unlock_time=1200 
auth        required      pam_faillock.so authsucc deny=4 unlock_time=1200 
auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success
auth        required      pam_deny.so

account     required      pam_faillock.so
account     required      pam_unix.so
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     required      pam_permit.so

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password    required      pam_deny.so


Additional info:
This is what it looked like before I ran authconfig.

auth        required      pam_env.so
auth        sufficient    pam_unix.so nullok try_first_pass
auth        requisite     pam_succeed_if.so uid >= 1000 quiet_success
auth        required      pam_deny.so

account     required      pam_unix.so
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 1000 quiet
account     required      pam_permit.so

password    requisite     pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password    required      pam_deny.so

Comment 2 Pavel Březina 2017-08-28 10:40:27 UTC
Was authconfig used to generate the original stack?

Comment 4 Pavel Březina 2017-09-27 13:44:48 UTC
We do not plan to release 7.5 errata for capacity reasons. Proposing to 7.6.

Comment 5 Pavel Březina 2018-03-27 09:49:39 UTC
We do not plan to release 7.5 errata for capacity reasons. Proposing to 7.7.

Comment 8 Pavel Březina 2019-07-17 10:38:43 UTC
*** Bug 1728905 has been marked as a duplicate of this bug. ***

Comment 9 atalaran 2019-07-18 22:41:18 UTC
@pavel in my case (the closed bug) it was a brand new installation with no other configuration when authconfig was run and did not set the correct options in the PAM configs. This looks to also be quite an old bug, will a fix be rolled out for EL7 or 8 or is authconfig being replaced?

Comment 10 Pavel Březina 2019-07-19 07:34:21 UTC
Authconfig is already replaced by authselect in RHEL8. So only critical issues will be fixed in RHEL7 and even though I would like to fix this one there has not been QA capacity to test it so it was never approved to be fixed. It is quite likely that it will be closed without a fix, since a workaround (fix it manually) exist.

Comment 12 Pavel Březina 2019-07-30 09:18:37 UTC
Authconfig has been replaced by Authselect in RHEL8 therefore only critical issues that have no workaround available will be fixed. Closing as won't fix.