Skip to content

Instantly share code, notes, and snippets.

@pulketo
Created January 18, 2020 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pulketo/80d00b2923494124269b02899f80589c to your computer and use it in GitHub Desktop.
Save pulketo/80d00b2923494124269b02899f80589c to your computer and use it in GitHub Desktop.
pam.d
Políticas de contraseñas:
cracklib, para que las contraseñas sean seguras:
prioridades para chequeo de contraseñas:
1. /etc/security/pwquality.conf
2. módulo pam.d
Ver las variables en: https://linux.die.net/man/8/pam_cracklib
cat /etc/security/pwquality.conf | grep -v '^#'
minlen = 12
dcredit = -1
ucredit = -1
lcredit = -1
ocredit = 1
minclass = 4
maxrepeat = 2
maxclassrepeat = 3
difok = 5
maxsequence = 2
#sesiones
reject_username = 1
gecoscheck = 1
enforce_for_root = 1
echo "password required pam_cracklib.so dcredit=-1 ucredit=-1 ocredit=-1 lcredit=0 minlen=12" >>/etc/pam.d/system.auth
echo "password required pam_cracklib.so dcredit=-1 ucredit=-1 ocredit=-1 lcredit=0 minlen=12" >>/etc/pam.d/passwd.auth
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment