Global Linux Knowledge Base…
Restricting users from using the same old password in Linux
|
For Authentication, Account Management and Authorization, PAM is the core module and pam_unix provides mentioned functionality. Same module can be used to maintain a list of old passwords for every user. This is useful if you want to disallow use of old passwords. You can find out old password list from /etc/security/opasswd file.
|
|
Open /etc/pam.d/system-auth file of Fedora Core or Red Hat or Cent OS Linux system.
|
|
# vim /etc/pam.d/system-auth
|
|
Now, append following line: |
|
password sufficient pam_unix.so use_authtok md5 shadow remember=5 |
|
Save and exit the file.
|
|
Now, Linux will remember last 5 passwords. If user tries to use any one of the last 5 old passwords, they will get an error: |
|
Password has been already used. Choose another. |
| Print article | This entry was posted by Dhaval Soni on October 6, 2010 at 7:22 PM, and is filed under All, CentOS, Fedora, Linux, Linux OS, Monitoring, Red Hat, Utilities. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |