To force users to use secure passwords on an Ubuntu or Debian Linux system, you can take the following steps:
libpam-pwquality
package, which provides password strength checking for PAM (Pluggable Authentication Modules):sudo apt-get install libpam-pwquality
/etc/pam.d/common-password
file and add the following line to enable password strength checking:password required pam_pwquality.so retry=3
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.
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.