How to force users to use secure passwords on Ubuntu/Debian Linux

https:‮‬//www.lautturi.com
How to force users to use secure passwords on Ubuntu/Debian Linux

To force users to use secure passwords on an Ubuntu or Debian Linux system, you can take the following steps:

  1. Install the libpam-pwquality package, which provides password strength checking for PAM (Pluggable Authentication Modules):
sudo apt-get install libpam-pwquality
  1. Edit the /etc/pam.d/common-password file and add the following line to enable password strength checking:
password required pam_pwquality.so retry=3
  1. Edit the /etc/security/pwquality.conf file to customize the password strength requirements. For example, you can set the minlen option to specify a minimum password length, or the dcredit option to specify the minimum number of digits required in a password.

  2. Use the passwd command to change the password for a user. The user will be prompted to enter a new password that meets the strength requirements specified in the pwquality.conf file.

By following these steps, you can force users to use secure passwords on an Ubuntu or Debian Linux system by using the pam_pwquality module and customizing the password strength requirements in the pwquality.conf file. It's always a good idea to use strong and unique passwords to protect your system and prevent unauthorized access.

Created Time:2017-10-28 21:39:03  Author:lautturi