This is my /etc/pam.d/common-password file on ubuntu 22.04
password requisite pam_pwquality.so retry=3 minlen=12password [success=2 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescryptpassword sufficient pam_sss.so use_authtokpassword requisite pam_deny.sopassword required pam_permit.sopassword optional pam_gnome_keyring.so
I have user called "student" and when I run
passwd student
and try write new password that contain only 1 symbol, the password policy works and I can not do it
but when I run
sudo passwd student
I can write only one symbol and my password will change
How to prevent sudo command to ignore password policy?