0
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?

Linuxユーザパスワードポリシーメモ

Posted at

/etc/security/pwquality.confファイルでパスワードポリシーを定義するには、以下のように設定します。これにより、パスワードの長さや複雑さ、その他の要件を細かく制御できます。

パスワードポリシー設定例

minlen = 8        # パスワードの最小文字数
dcredit = -1      # 数字を少なくとも1つ要求
ucredit = -1      # 大文字を少なくとも1つ要求
lcredit = -1      # 小文字を少なくとも1つ要求
ocredit = -1      # 記号を少なくとも1つ要求
maxrepeat = 3     # 同じ文字を連続で使用できる回数
retry = 3         # パスワード入力失敗時の再試行回数

各設定の説明

  • minlen: パスワードの最小文字数を設定します。例では8文字以上を要求しています。
  • dcredit: パスワードに含まなければならない数字の最低数を設定します。-1は少なくとも1つの数字を必要とします。
  • ucredit: 大文字の要求数を設定します。-1は少なくとも1つの大文字が必要です。
  • lcredit: 小文字の要求数を設定します。-1は少なくとも1つの小文字が必要です。
  • ocredit: 記号(特殊文字)の最低数を設定します。-1は少なくとも1つの記号を必要とします。
  • maxrepeat: 同じ文字を連続で使用できる回数を制限します。例では、同じ文字を3回まで連続して使用できます。
  • retry: ユーザーがパスワード設定に失敗した際に再試行できる回数を指定します。

これらの設定を使用して、システムに要求されるパスワードポリシーを強化できます。

0
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
0
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?