As a Linux System Administrator one of the basic task is User Management. Setting proper rules and policies for maintaining users is a critical job and today’s post is related to it. Users often need to change their password as the Admin sets rule for changing password after a number of days. But what if user again set the same password again. That’s not encouraging from the security point of view. So we’ll prevent them from setting the same password again.

The task is quite simple guys. Follow the following steps-

  • Just open the file /etc/pam.d/system-auth on your system.
  • Now you will see a line contains -password sufficient.
  • Append this at the end of the line

md5 shadow remember=10

  • Now save that file and quit. Now your system will remember the last 10 password set and won’t let the user set the same password. If he’ll do so he will get an Error Message. Quite simple.

 

Enhanced by Zemanta
Advertisements