2020-02-07 23:32:38 +01:00
|
|
|
#%PAM-1.0
|
|
|
|
#
|
|
|
|
# Most of these PAM modules have man pages included, like
|
2020-02-11 05:45:36 +01:00
|
|
|
# pam_unix(8) for example.
|
2020-02-07 23:32:38 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
##################
|
|
|
|
# Authentication #
|
|
|
|
##################
|
|
|
|
#
|
|
|
|
auth required pam_env.so
|
2020-02-20 05:50:54 +01:00
|
|
|
auth optional pam_group.so
|
2020-02-07 23:32:38 +01:00
|
|
|
auth sufficient pam_unix.so likeauth nullok
|
|
|
|
auth required pam_deny.so
|
|
|
|
auth optional pam_gnome_keyring.so
|
|
|
|
|
|
|
|
##################
|
|
|
|
# Account checks #
|
|
|
|
##################
|
|
|
|
#
|
|
|
|
# Only root can login if file /etc/nologin exists.
|
|
|
|
# This is equivalent to NOLOGINS_FILE on login.defs
|
|
|
|
#
|
|
|
|
account required pam_nologin.so
|
|
|
|
#
|
|
|
|
# Enable restrictions by time, specified in /etc/security/time.conf
|
|
|
|
# This is equivalent to PORTTIME_CHECKS_ENAB on login.defs
|
|
|
|
#
|
2020-02-20 05:50:54 +01:00
|
|
|
account required pam_time.so
|
2020-02-07 23:32:38 +01:00
|
|
|
account required pam_unix.so
|
|
|
|
account sufficient pam_succeed_if.so uid < 100 quiet
|
|
|
|
account required pam_permit.so
|
|
|
|
|
2020-02-11 05:45:36 +01:00
|
|
|
#############################
|
|
|
|
# Password quality checking #
|
|
|
|
#############################
|
|
|
|
#
|
|
|
|
# Please note that unless cracklib and libpwquality are installed, setting
|
|
|
|
# passwords will not work unless the lines for the pam_pwquality module are
|
|
|
|
# commented out and the line for the traditional no-quality-check password
|
|
|
|
# changing is uncommented.
|
|
|
|
#
|
|
|
|
# The pam_pwquality module will check the quality of a user-supplied password
|
|
|
|
# against the dictionary installed for cracklib. Other tests are (or may be)
|
|
|
|
# done as well - see: man pam_pwquality
|
|
|
|
#
|
|
|
|
# Default password quality checking with pam_pwquality. If you don't want
|
|
|
|
# password quality checking, comment out these two lines and uncomment the
|
|
|
|
# traditional password handling line below.
|
|
|
|
password requisite pam_pwquality.so minlen=6 retry=3
|
|
|
|
password sufficient pam_unix.so nullok sha512 shadow minlen=6 try_first_pass use_authtok
|
|
|
|
|
|
|
|
# Traditional password handling without pam_pwquality password checking.
|
|
|
|
# Commented out by default to use the two pam_pwquality lines above.
|
|
|
|
#password sufficient pam_unix.so nullok sha512 shadow minlen=6
|
2020-02-07 23:32:38 +01:00
|
|
|
|
2020-02-11 05:45:36 +01:00
|
|
|
# ATTENTION: always keep this line for pam_deny.so:
|
2020-02-07 23:32:38 +01:00
|
|
|
password required pam_deny.so
|
|
|
|
|
|
|
|
#########################
|
|
|
|
# Session Configuration #
|
|
|
|
#########################
|
|
|
|
#
|
|
|
|
# This applies the limits specified in /etc/security/limits.conf
|
|
|
|
#
|
|
|
|
session required pam_limits.so
|
|
|
|
session required pam_unix.so
|
|
|
|
#session required pam_lastlog.so showfailed
|
|
|
|
#session optional pam_mail.so standard
|
|
|
|
session optional pam_gnome_keyring.so auto_start
|