How to Create Rules to Create Strong Passwords for Users
Last updated
Last updated
Cracklib is a library to check whether a password is easy to crack or not. It checks that the password is not based on a simple character pattern or dictionary word. The main goal of this package is to stop users from choosing passwords that are easy to guess/hack. It tries to generate words from the username and gecos fields (entries in the /etc/passwd file) and checks the password. Note that cracklib is not a replacement for a password program, and must be used in conjunction with an existing password program. Install it if you want to ensure that passwords are at least minimally secure.
Command to find out information on the expiration date of a password
nano /etc/pam.d/system-auth
Then we will configure the libpam-cracklib software so that when changing the password the user cannot use an easy password. This of course will improve the quality of our security so that it is not easily known by other people.
nano /etc/pam.d/common-password
Then we check whether the configuration was successful or not. You can check by changing the user password with an easy password. If when we change the password we use a password that is easily rejected, that means the configuration has been successful. So what we have to do is change the password by using a more complicated password.