pam_tally2 및 6개의 SSH 비밀번호 프롬프트가 포함된 비밀번호 정책

pam_tally2 및 6개의 SSH 비밀번호 프롬프트가 포함된 비밀번호 정책

임베디드 Linux 배포판에서 비밀번호 정책을 구성하려고 합니다.

3번의 로그인 시도 실패 후 30초의 쿨다운을 원합니다.

그래서 common-auth 파일에 마지막 줄을 추가했습니다.

auth       required     pam_tally2.so deny=3 unlock_time=30 even_deny_root

그것을 실행하기 위해

#
# /etc/pam.d/common-auth - authentication settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authentication modules that define
# the central authentication scheme for use on the system
# (e.g., /etc/shadow, LDAP, Kerberos, etc.).  The default is to use the
# traditional Unix authentication mechanisms.

# here are the per-package modules (the "Primary" block)
auth    [success=1 default=ignore]      pam_unix.so nullok_secure
# here's the fallback if no module succeeds
auth    requisite                       pam_deny.so
# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
auth    required                        pam_permit.so
# and here are more per-package modules (the "Additional" block)
auth       required     pam_tally2.so deny=3 unlock_time=30 even_deny_root

그러나 ssh를 실행하려고 시도하고 로그인에 실패하면 비밀번호 정책의 이 부분이 시행되지 않습니다. 실제로 로그인을 시도하면 (3개가 아닌) 6개의 로그인 프롬프트가 표시되므로 common-auth 파일을 방해하는 로그인과 관련된 다른 모듈이 있는 것으로 생각됩니다.

관련 정보