1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

password-authとsystem-auth

Last updated at Posted at 2022-02-23

2023年11月28日更新

最近ようやくわかったことですが、passwdコマンドはsystem-authを参照にしている。

以下のブログを見て理解するほうがpasswdコマンドとpamの関係がわかると思います。

system-authを使っているまたはpassword-auth使っているかは
/etc/pam.d/以下を調べればいい

もっと詳しく知りたい方よう

結局、サービス名(sshd,passwdなど)を第一引数に渡す。そのファイルを参照する。

以下の記事も時間のある時書き直します。

対象OS
Red Hat Enterprise Linux Server release 7.7 (Maipo)

結論から

コンソールログインまたは、sshでのログイン失敗をカウントして拒否する設定は
password-auth

etc/pam.d/password-auth

設定変更箇所は2か所
3回間違いでアカウントロック

auth required pam_tally2.so deny=3 
account required pam_tally2.so

ではsystem-authはなにをカウントしているかというと
sudo等の失敗みたいです。
system-authにも以下の設定を追加

auth required pam_tally2.so deny=8
account required pam_tally2.so

そうすると、sudoのパスワード失敗をカウントします。

ややこしい。。。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?