PAM モジュールの設定、Debian での ssh の失敗

PAM モジュールの設定、Debian での ssh の失敗

パスワードに必要な minlen や特殊文字など、Debian VM 上のユーザーに対してパスワード ポリシーを設定したいと考えています。

Debian VM でエラーが発生し、SSH 経由でそのマシンに再度ログインできません。

OSバージョン:デビアンブルズアイ11

カーネルバージョン:Linux 5.10.0-9-amd64 x86_64

変更中設定ファイル /etc/pam.d/common-password の次の行から始まります:

# here are the per-package modules (the "Primary" block)
password        [success=1 default=ignore]      pam_unix.so obscure yescrypt

そして挿入する(に示すようなもの)https://www.networkworld.com/article/2726217/how-to-enforce-password-complexity-on-linux.html):

minlen=8 dcredit=1 ucredit=1 lcredit=1 ocredit=1

そのファイルを変更しなくても、問題なくマシンに入ることができます。たとえば、公開キーが正しくアップロードされ、SSH ポートが開いており、SSH および SSHD サービスがアクティブになっています。

再度、SSH 経由でリモート接続しようとすると:

ssh -v USER@IP

最後の行にこのエラーが表示されます:

debug1: Next authentication method: password
USER@IP's password:

debug1: Authentications that can continue: publickey,password

Permission denied, please try again.

関連情報