私の Ubuntu インストールでは、なぜパスワードの文字数制限がこんなに短いのか理解できません。 13 文字くらいだと思います。もっと長いパスワードを設定できるように Ubuntu を変更する方法はありますか?
答え1
Ubuntu のパスワードの複雑さは 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.
パスワードの複雑さを制御するファイルを開きます。
sudo gedit /etc/pam.d/common-password
次の行があります:
password [success=1 default=ignore] pam_unix.so obscure sha512
これはパスワードの複雑さに関する基本的なルールを定義します。次のように変更することで、最小長のオーバーライドを追加できます。
password [success=1 default=ignore] pam_unix.so obscure sha512 minlen=20
20
パスワードに使用する最小文字数に置き換えて保存し、終了します。