パスワードの複雑さの問題

パスワードの複雑さの問題

RHEL6の使用

ファイルには/etc/pam.d/system-auth次の設定があります。

difok=4

しかし、私は正常にパスワードrootを変更することができましたabcd1bbcd1

新しいパスワードが元のパスワードと4桁の違いがないため、これはできないようです。

これが期待されるか。

これが予想される場合、アカウントにパスワードの複雑さ制限を設定する方法はありますかroot

ベストアンサー1

あなたが以下を使用していると仮定するとpam_pwquality(あなたの投稿では明確ではなく、difokすべてのWeb検索がさまざまなPAMモジュールで使用されているようです)、root比較する以前のパスワードがないため、このテストをスキップします。

   enforce_for_root
       The module will return error on  failed  check  even  if  the  user
       changing  the password is root. This option is off by default which
       means that just the message about the failed check is  printed  but
       root  can  change  the password anyway. Note that root is not asked
       for an old password so the checks that  compare  the  old  and  new
       password are not performed.

この参照はpam_pwquality(8)centos7システムのマニュアルページから得られます。

おすすめ記事