I don't understand why on my Ubuntu install there is such a small password character restriction. I think it's about 13 characters. Is there a way to modify Ubuntu so that I can have much longer passwords?
1 Answer
Password complexity in Ubuntu is controlled by PAM.
man pam_unix
pam_unix - Module for traditional password authentication
This is the standard Unix authentication module. It uses standard calls
from the system's libraries to retrieve and set account information as
well as authentication. Usually this is obtained from the /etc/passwd
and the /etc/shadow file as well if shadow is enabled.
Open the file that controls password complexity:
sudo gedit /etc/pam.d/common-password
There is a line:
password [success=1 default=ignore] pam_unix.so obscure sha512
Which defines the basic rules for password complexity. You can add a minimum length override by changing it to:
password [success=1 default=ignore] pam_unix.so obscure sha512 minlen=20
Replace 20
with min numb of characters you want to use for your password save and exit.
-
Thanks. Are you sure it is the minimum value you have to change? I wanted to just increase the maximum amount of characters allowed to be greater than the defaults. Jul 3, 2015 at 12:02
-
-
/etc/pam.d/common-password
file and modify the line containingpam_unix.so
by adding the wordsmax=20
betweenobscure
andsha512
(or similar). Please report if it worked and I will convert this to an answer.