pam_unixでuse_authtokとtry_first_passまたはuse_first_passの違いは何ですか?

pam_unixでuse_authtokとtry_first_passまたはuse_first_passの違いは何ですか?

これ文書十分合理的だと聞こえますtry_first_passuse_first_pass

       try_first_pass
           Before prompting the user for their password, the module
           first tries the previous stacked module's password in case
           that satisfies this module as well.

       use_first_pass
           The argument use_first_pass forces the module to use a
           previous stacked modules password and will never prompt the
           user - if no password is available or the password is not
           appropriate, the user will be denied access.

try_first_passパスワードがある場合は、以前に入力したパスワードを使用してください。それ以外の場合は、プロンプトが表示されます。use_first_passパスワードがある場合は、以前に入力したパスワードが使用され、それ以外の場合は失敗します。しかし、別のオプションがありますuse_authtok

       use_authtok
           When password changing enforce the module to set the new
           password to the one provided by a previously stacked password
           module (this is used in the example of the stacking of the
           pam_cracklib module documented below).

それは何use_authtokのためですか。とはまったく同じですかtry_first_pass、それとも同じですかuse_first_pass、それとも全く違うのですか?

ベストアンサー1

おかげで分かりました。アンドリューのコメントThomas Mrazの説明、確認ソースコード:

  • 文書の内容に関係try_first_passなくpam_unix.so

  • use_authtokuse_first_pass適用するときと同じことを行いますpam_unix.so。つまり、以前に入力したパスワードがあり、そのパスワードが古いモジュールのパスワード品質要件を満たしている場合は、そのパスワードを使用します。それ以外の場合は絶対に失敗します。

  • use_first_passまたは、norがuse_authtok適用されない場合は、以前にpam_unix.soパスワードを入力したかどうかによって動作が異なります。以前にパスワードを入力しなかった場合は、pam_unix.so慎重にパスワードを入力するように求められます。存在する場合は、次のpam_unix.soように動作またはuse_first_pass設定use_authtokされます。

これは皆のためですpam_unix.sotry_first_pass、、、use_first_passおよびは他のuse_authtokPAMモジュールとは異なる動作をします。

おすすめ記事