Bug 122700

Summary: System-Auth Stack -- improper ordering of auth fields
Product: [Fedora] Fedora Reporter: Travis Groth <lists>
Component: authconfigAssignee: Tomas Mraz <tmraz>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: j, smooge
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-15 07:36:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Travis Groth 2004-05-07 03:20:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040207 Firefox/0.8

Description of problem:
When you use authconfig to enable kerberos authentication, it 
automatically adds the entries in /etc/pam.d/system-auth. 
Unfortunately, the stack is ordered incorrectly.  The system currently
uses something like:
auth     sufficent  pam_unix.so   nullok likeauth
auth     sufficent  pam_krb5.so   use_first_pass

Unfortunately, this setup will completely lock one out of ALL
authentication that passes through the system-auth pam stack if
kerberos is unavailible.  Granted, this may have a security purpose
behind it, but at the very least you should be able to use one local
account to recover the machine if say....the NIC goes down....or
you're on a laptop and only auth to kerberos while in the office.  I
have changed my /etc/pam.d/system-auth file to look as follows:

auth        required      /lib/security/$ISA/pam_env.so
auth        sufficient    /lib/security/$ISA/pam_krb5.so null_ok
auth        sufficient    /lib/security/$ISA/pam_unix.so try_first_pass
auth        required      /lib/security/$ISA/pam_deny.so

This allows kerberos or local logins when on the network and allows
for local logins when the network is unavailible.

Version-Release number of selected component (if applicable):
pam-0.77-15

How reproducible:
Always

Steps to Reproduce:
1.  Enable pam authentication
2.  Disconnect Network
3.  Try logging in as local user
    

Actual Results:  It fails with the current pam stack ordering and options

Expected Results:  I would have expected for pam_unix to kick out an
'authenticated' even though its before pam_krb5.  This is not the
case.  Instead if pam_krb5 fails (regardless of what pam_unix should
be returning).

Additional info:

I know from past experience that the pam_krb5 is VERY picky.  Confirm
my ordering of the pam stack and implement it.  It took me a while to
figure it out on the rest of my systems.  I simply copied and pasted
it from my debian server and it magically works.

Comment 1 Tomas Mraz 2004-10-15 07:34:07 UTC

*** This bug has been marked as a duplicate of 55193 ***