{{tag>[cli shadow-utils user password aging security]}}
====== chage ======
''/etc/shadow''에 저장된 password aging과 계정 만료 정보를 조회·변경한다.
===== Installation =====
* Debian / Ubuntu: ''sudo apt install passwd''
* RHEL / Fedora: ''sudo dnf install shadow-utils''
* macOS와 Windows는 다른 계정 정책 도구를 사용한다.
chage --help
===== Usage =====
* ''**chage** [OPTIONS] LOGIN''
* ''**-l**, **--list**'': 현재 aging 정보 표시
* ''**-d**, **--lastday** DATE'': 마지막 password 변경일
* ''**-m**, **--mindays** DAYS'': 최소 변경 간격
* ''**-M**, **--maxdays** DAYS'': 최대 유효 기간
* ''**-W**, **--warndays** DAYS'': 만료 전 경고 기간
* ''**-I**, **--inactive** DAYS'': 만료 후 비활성 기간
* ''**-E**, **--expiredate** DATE'': 계정 만료일
===== Examples =====
sudo chage -l alice
sudo chage -M 90 -W 14 alice
sudo chage -d 0 alice
sudo chage -E 2026-12-31 contractor
===== Notes =====
* 날짜에는 보통 ''YYYY-MM-DD'' 또는 구현이 지원하는 일수 값을 쓴다.
* ''-d 0''은 다음 로그인 때 password 변경을 요구하는 일반적인 방법이다.
===== Help =====
+++ chage --help |
chage --help
+++
===== See Also =====
* [[passwd:ko]]
* [[etc:shadow:ko|/etc/shadow]]
* [[https://man7.org/linux/man-pages/man1/chage.1.html|chage(1) manual]]
===== History =====
* codex:: 2026-08-10 Added password-aging and account-expiration documentation.
{{indexmenu>.#1|js}}