1

I notice there are settings in /etc/pam.d/common-password to define minimum password strength. For example:

...

password    requisite      pam_pwquality.so retry=3 maxrepeat=0 minlen=19 ucredit=-1 lcredit=-1 dcredit=-1 ocredit=-1 reject_username enforce_for_root dictcheck=0

password    required       pam_pwhistory.so remember=10 use_authtok enforce_for_root
...

These checks are run when passwd is run. I want to check if a given string will pass these checks but I don't want it to actually modify the user's password if it succeeds. Essentially I am looking for something like passwd --dry-run.

How can I achieve this

2
  • Don't test on a live account Commented Oct 18, 2024 at 12:23
  • 1
    create a temporary account with /bin/false as a shell, and delete after test ? Commented Oct 18, 2024 at 12:45

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.