Cent OS 비밀번호 규칙이 작동하지 않습니다.

Cent OS 비밀번호 규칙이 작동하지 않습니다.

최소 및 최대 길이, 1자리 등 모든 사용자에 대한 비밀번호 규칙을 설정하고 싶습니다. 그래서 /etc/pam.d/system-auth를 다음과 같이 수정했습니다.

password    required     pam_cracklib.so try_first_pass retry=3 minlen=8 ucredit=-1 dcredit=-1 ocredit=-1 lcredit=-1 difok=4

하지만 작동하지 않았으므로 시도해 보기 위해 /etc/pam.d/cs-auth를 다음과 같이 수정했습니다.

password    required     pam_cracklib.so try_first_pass retry=3 minlen=8 ucredit=-1 dcredit=-1 ocredit=-1 lcredit=-1 difok=4

그리고

비밀번호 확인은

password    requisite     pam_cracklib.so  try_first_pass retry=3 minlen=8 ucredit=-1 dcredit=-1 ocredit=-1 lcredit=-1 difok=4

그러나 그들 중 누구도 작동하지 않는 것 같습니다. 해당 pam.d 파일의 스냅샷을 첨부했습니다. 여기에 이미지 설명을 입력하세요.

여기에 이미지 설명을 입력하세요.

/etc/pam.d/passwd 내용

#%PAM-1.0
auth       include      cs-auth
account    include      cs-auth
password   substack     cs-auth
-password   optional    pam_gnome_keyring.so

답변1

CentOS 7을 사용하는 경우,racklib를 대체하는 /etc/security/pwquality.conf를 수정해야 합니다. 사용하려는 줄의 주석 처리를 제거하세요.

전체 정보를 보려면 다음을 참조하세요.man pwquality.conf

관련 정보