Ubuntu 20.04にユーザアカウントの有効期限を設定する方法
書式
chage [options] LOGIN
オプション説明
-E, –expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
使用例
1.有効期限を設定
# chage -E 2023-12-31 testuser01
2.有効期限を確認
# chage -l test01
Last password change : 3月 25, 2021 Password expires : never Password inactive : never Account expires : 12月 31, 2023 Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7# chage -l test01 Last password change : 3月 26, 2021 Password expires : never Password inactive : never Account expires : 12月 31, 2023 Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7