
/etc/pam.d/common-password
# here are the per-package modules (the "Primary" block)
password requisite pam_pwquality.so retry=3 minlen=10 ucredit=-1 dcredit=-1 maxrepeat=3 reject_username difok=7 enforce_for_root
password [success=1 default=ignore] pam_unix.so obscure use_authtok try_first_pass yescrypt
# here's the fallback if no module succeeds
password requisite pam_deny.so
# prime the stack with a positive return value if there isn't one already;
/etc/login.defs
#
PASS_MAX_DAYS 30
PASS_MIN_DAYS 2
PASS_WARN_AGE 7
#
저는 이 주제를 처음 접했습니다. 기본적인 이유를 설명해 주시면 감사하겠습니다.
답변1
chage
매개변수와 함께 명령을 사용하여 -m
최소 일수를 변경하고, -M
최대 일수를 변경하고 그에 맞게사용자 이름.
예를 들어:
chage -m 7 -M 30 root
루트 비밀번호 설정 변경