LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-17-2015, 02:20 PM   #1
claforce
LQ Newbie
 
Registered: Jun 2014
Posts: 17

Rep: Reputation: Disabled
pam faillock and krb5 on Centos 6.6


Hello,
I'm looking for a little assistance getting my pam configuration right. What I am trying to do is configure account locking for local accounts after 5 invalid logins, but allow any non-local account to authenticate through kerberos. I have had both of these configurations working separately but I'm trying to merge them at this point. I've tried to do some google searching to find any similar examples, but haven't had much luck. If someone has an example or could point me to a resource that may help that would be great. Below is what I currently have for a config which is only working for the local stuff now:

Code:
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required       pam_faillock.so preauth silent audit deny=5 unlock_time=1800
auth        sufficient     pam_unix.so nullok try_first_pass
auth        [default=die]  pam_faillock.so authfail audit deny=5 unlock_time=1800
auth        sufficient    pam_krb5.so use_first_pass
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        required      pam_deny.so

account     required      pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 500 quiet
account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
account     required      pam_permit.so
account required pam_faillock.so

password    requisite     pam_cracklib.so try_first_pass retry=3 type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=4
password    sufficient    pam_krb5.so use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_krb5.so
Let me know if I can offer anymore details.

Thanks,

Chris.
 
Old 02-17-2015, 03:06 PM   #2
claforce
LQ Newbie
 
Registered: Jun 2014
Posts: 17

Original Poster
Rep: Reputation: Disabled
Does this look correct to everyone? With the below config I can login via local password or AD password(via kerberos) and account lockout stuff seems to work. I'm pretty newbie'ish with the pam stuff so I just want to make sure this is an okay way to do it.
Thanks,

Chris.

Code:
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required       pam_faillock.so preauth silent audit deny=5 unlock_time=1800
auth        sufficient     pam_unix.so nullok try_first_pass
auth        sufficient    pam_krb5.so use_first_pass
auth        [default=die]  pam_faillock.so authfail audit deny=5 unlock_time=1800
auth        requisite     pam_succeed_if.so uid >= 500 quiet
auth        required      pam_deny.so

account     required      pam_unix.so broken_shadow
account     sufficient    pam_localuser.so
account     sufficient    pam_succeed_if.so uid < 500 quiet
account     [default=bad success=ok user_unknown=ignore] pam_krb5.so
account     required      pam_permit.so
account required pam_faillock.so

password    requisite     pam_cracklib.so try_first_pass retry=3 type=
password    sufficient    pam_unix.so sha512 shadow nullok try_first_pass use_authtok remember=4
password    sufficient    pam_krb5.so use_authtok
password    required      pam_deny.so

session     optional      pam_keyinit.so revoke
session     required      pam_limits.so
session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session     required      pam_unix.so
session     optional      pam_krb5.so
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to configure pam-radius for WiKID Two-factor Authentication on Centos 7 LXer Syndicated Linux News 0 07-22-2014 05:21 PM
CentOS 6.3, PAM+LDAP authentication and host attribute pianist Linux - Software 4 09-28-2012 07:53 AM
Centos 6, Samba 3.5.4 and nss-pam-ldapd cobly Linux - Software 1 08-20-2011 09:11 AM
[SOLVED] CentOS 5.3 and MIT KRB5 "Improper format of Kerberos configuration file" MheAd Linux - Software 1 04-05-2010 03:34 PM
problema al autenticar openvpn con pam en centos 5.0 julycorredor Linux - Networking 2 02-17-2010 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration