0

I'm trying to implement a password security policy on my Linux Mint machine. I configured the /etc/pam.d/common-password file with the following lines.

password requisite pam_pwquality.so retry=3 minlen=10 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=-2 
password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass sha512 shadow 

Whenever I create (adduser test) a new user, I just get a warning (password too short, 1 digit missing etc.). If I retype the password, the users gets created.

How can I configure to force the password to meet the requirements?

2 Answers 2

0

The easiest way I see - just execute password --expire user once, that user is created. In this case, you (as root) do not care about password complexity. But the user would have to set a new password the next time he try to login - and that password change will obey the rules in common-password.

1
  • Thank you, it worked!
    – Jammel
    Commented Apr 30, 2022 at 21:56
-1

I configured the file /etc/security/pwquality.conf . Now everything works perfectly!

1
  • It would be good to know how you configured that file. Expand your answer to include more details about the cause of the issue and how you resolved it. This would benefit others with the same or similar problems. See also unix.stackexchange.com/help/how-to-answer
    – Kusalananda
    Commented May 1, 2022 at 8:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .