Top Banner
Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat
16

Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Sep 27, 2019

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Working with PAM (Pluggable Authentication Modules)Scott McBrienCurriculum Manager, Red Hat

Page 2: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

What is PAM?

Page 3: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Configuration files

/etc/pam.d/

/etc/security/

Page 4: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Overview of configuration file locations and content

Page 5: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

PAM Controls

required

sufficient

optional

include

requisite

substack (RHEL7)

Page 6: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Trace Through of auth Rules

Example: sshd

Page 7: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Trace through of sshd

Page 8: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

What we saw: /etc/pam.d/sshd

auth required pam_sepermit.so

auth substack password-auth

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

auth include postlogin

(no auth rules in postlogin)

Page 9: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Managing Password Complexity

Page 10: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Managing Password Complexity

minlen

ocredit

dcredit

ucredit

lcredit

Page 11: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Using pam_tally2.so

Page 12: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Using pam_tally2.so in configuration files

Page 13: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Using pam_tally2 on the command line

Page 14: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Other Pointers

* Keep an already authenticated session open

* Order is important

* Remember password-auth vs. system-auth

Page 15: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

Documentation

pam_* manual pages

/usr/share/doc/pam*

Page 16: Working with PAM (Pluggable Authentication Modules) · Working with PAM (Pluggable Authentication Modules) Scott McBrien Curriculum Manager, Red Hat

More security topics?

Red Hat Server Hardening (RH413)

http://www.redhat.com/training/courses/rh413

Materials available from http://people.redhat.com/~smcbrien