I'm using ubuntu 18.04. To strengthen my pass-word policy I modify my
/etc/pam.d/common-password like this:
# here are the per-package modules (the "Primary" block) #password requisite pam_cracklib.so retry=3 minlen=8 difok=3 password requisite pam_cracklib.so retry=3 minlen=8 difok=3 ucredit=-1 lcredit=-1 dcredit=-1 password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass sha512 remember=15 # here's the fallback if no module succeeds password requisite pam_deny.so # prime the stack with a positive return value if there isn't one already; # this avoids us returning an error just because nothing sets a success code # since the modules above will each just jump around password required pam_permit.so # and here are more per-package modules (the "Additional" block) # end of pam-auth-update config
At first when I tried to login to root using
sudo -s there is no problem at all, but when I tried to login to root using
sudo -s and entered my password I always get Sorry, try again.