June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Categories

June 2025
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  

How to Prevent the reuse of old passwords

For RHEL/Fedora distribution 

To remember the last 5 passwords, add the line below to the file /etc/pam.d/system-auth file:

password sufficient /lib/security/pam_unix.so use_authtok md5 shadow remember=5

For Debian/ubuntu distribution

To remember the last 5 passwords, add the line below to the file /etc/pam.d/common-password file:

password sufficient /lib/security/pam_unix.so use_authtok md5 shadow remember=5

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>