Linux 비밀번호 정책 설정

2022. 6. 15. 21:19·42서울/리눅스

Your password has to expire every 30 days.

The minimum number of days allowed before the modification of a password will be set to 2.

The user has to receive a warning message 7 days before their password expires.

Your password must be at least 10 characters long.

It must contain an uppercase letter and a number.

Also, it must not contain more than 3 consecutive identical characters.

The password must not include the name of the user.

The password must have at least 7 characters that are not part of the former password.

Of course, your root password has to comply with this policy

 

암호는 30일마다 만료되어야 합니다.
암호를 수정하기 전에 허용되는 최소 일 수는 2일로 설정됩니다.
사용자는 암호가 만료되기 7일 전에 경고 메시지를 받아야 합니다.
암호는 10자 이상이어야 합니다.
대문자 및 숫자를 포함해야 합니다.
또한 연속적으로 동일한 문자를 3자 이상 사용할 수 없습니다.
암호에는 사용자 이름을 포함할 수 없습니다.
암호는 이전 암호의 일부가 아닌 7자 이상이어야 합니다.
물론 root 암호도 이 정책을 준수해야 합니다.

 

암호 정책 설정 파일

sudo vi /etc/login.defs

다음과 같이 수정

PASS_MAX_DAYS 30
PASS_MIN_DATS 2
PASS_WARN_AGE 7

암호 정책 설정을 위해 추가 설치

apt-get -y install libpam-pwquality
vi /etc/pam.d/common-password

다음과 같이 수정

retry=3 뒤로 설정들을 추가적으로 붙여야함
minlen=10 
ucredit=-1 
lcredit=-1 
dcredit=-1 
maxrepeat=3 
reject_username 
enforce_for_root 
difok=7

강제적으로 사용자의 암호를 만료시킨다

passwd -e 사용자명

 

저작자표시 비영리 변경금지 (새창열림)
'42서울/리눅스' 카테고리의 다른 글
  • monitoring.sh 설정
  • UFW, SSH 설치
  • Sudoers 설정
  • Debian 사용법 (설치부터) with Virtual Box - 2
Zi_Yoon
Zi_Yoon
머리 속에 정리하는 곳 <전자공학>
  • Zi_Yoon
    ZY_repo
    Zi_Yoon
  • 전체
    오늘
    어제
    • 분류 전체보기 (70)
      • HDLBits (25)
        • Verilog (19)
        • Circuits (4)
        • Verification (0)
      • IDEC 교육 (1)
        • Embedded C (13)
        • Verilog HDL (8)
      • Hardware (8)
        • RISC-V Project (1)
        • Computer Architecture (0)
        • AMBA (2)
        • FPGA (0)
        • 논문 읽기 (1)
        • ETC. (4)
      • 42서울 (13)
        • 리눅스 (12)
        • 네트워크 (1)
      • 생각 (1)
      • 취업 (1)
  • 블로그 메뉴

    • 홈
    • 태그
  • 링크

  • 공지사항

  • 인기 글

  • 태그

    AMBA
    fucntion
    QUARTUS
    bit-wise and
    signal trap
    verilator
    ssh
    fpga
    Keil
    verilog
    vm
    비대칭 키
    centos
    pointer
    ARM
    c
    APT
    debian
    세션 키
    research rabbit
    RISC-V
    AXI4
    lsblk
    axi
    hdlbits
    charater
    IDEC
    보안 쉘
    AppArmor
    embedded
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.1
Zi_Yoon
Linux 비밀번호 정책 설정
상단으로

티스토리툴바