使い方: chage [オプション] LOGIN オプション: -d, --lastday LAST_DAY パスワードの最終変更日を LAST_DAY にする -E, --expiredate EXPIRE_DATE アカウント期限切れの日を EXPIRE_DATE にする -h, --help このヘルプを表示して終了する -I, --inactive INACTIVE パスワードを期限切れ後に無効化する日数を INACTIVEにする -l, --list アカウントの経時情報を表示する -m, --mindays MIN_DAYS パスワードが変更できるまでの最短日数を MIN_DAYS に変更する -M, --maxdays MAX_DAYS パスワードが変更できる期間の最長日数を MAX_DAYS に変更する -R, --root CHROOT_DIR chroot するディレクトリ -W, --warndays WARN_DAYS 期限切れ警告の日数を WARN_DAYS にする
Usage: chage [options] LOGIN Options: -d, --lastday LAST_DAY set date of last password change to LAST_DAY -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -h, --help display this help message and exit -I, --inactive INACTIVE set password inactive after expiration to INACTIVE -l, --list show account aging information -m, --mindays MIN_DAYS set minimum number of days before password change to MIN_DAYS -M, --maxdays MAX_DAYS set maximim number of days before password change to MAX_DAYS -R, --root CHROOT_DIR directory to chroot into -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS
CHAGE(1) CHAGE(1)
名前
chage - ユーザパスワードの有効期限情報を変更する。
書式
chage [-m mindays] [-M maxdays] [-d lastday] [-I inactive]
[-E expiredate] [-W warndays] user
chage -l user
説明
chage は、パスワードを最後に更新してから、次に変更しなければならない期
日までの日数を変更する。システムはこの情報を用いて、ユーザがいつパス ワ
ー ド を変更しなければならないかを決定する。 chage コマンドを使えるのは
root ユーザのみに限られている。ただし一般ユーザも -l オプションを指定す
れ ばこのコマンドを利用でき、自分のパスワードまたはアカウントがいつ切れ
るかを知ることができる。
-m オプションを指定した場合、 mindays の値はパスワード変更の間隔の最 短
日 数になる。このフィールドをゼロとした時は、ユーザはいつでもパスワード
を変更できる。
-M オプションを指定すると、 maxdays の値はパスワードが有効な最長日数 と
な る。 maxdays と lastday を足した値が現在の日付より小さい場合、ユーザ
はアカウントを使用する前にパスワードを変更しなければならない。 -W オ プ
シ ョンを使えばこの期日がいつ来るかが分かるようにできる。この場合はユー
ザに事前に警告が与えられる。
-d オプションを用いると、パスワードの最終更新日を設定できる 。 lastday
の 値は 1970 年 1 月 1 日からパスワード最終更新日までの日数である。日付
は YYYY-MM-DD という書式 (もしくはあなたの地域でもっとよく用いられて い
る書式) で指定する事もできる。
-E オプションは、それ以降ユーザがアカウントにアクセスできなくなる日付を
設定するのに用いられる。 expiredate は 1970 年 1 月 1 日からアカウン ト
が ロックされる日までの日数である。日付は YYYY-MM-DD という書式 (もしく
はあなたの地域でもっとよく用いられているもの) で指定することもできる 。
ア カウントをロックされたユーザが再びそのシステムを使うには、システム管
理者と連絡を取る必要がある。
-I オプションは、パスワードの期限が切れてからアカウントがロックされるま
で の放置日数を設定するために用いる。アカウントをロックされたユーザが再
びそのシステムを使うためには、システム管理者に連絡しなければならない 。
inactive は使用不能期間の日数である。 0 にすればこの機能を無効にできる
。
-W オプションは、パスワードの変更が必要となる前に警告を行う期間の日数を
設 定するために用いる。 warndays は、パスワードの期限切れに先だって、ユ
ーザに期限が切れかかっていることを警告する日数である。
いずれのオプションも指定されないと chage は対話的に動作する。全てのフィ
ー ルドに対して各々現在の設定値を表示し、新しい値の入力を促す。新しい値
を設定する場合はそれを入力し、現在の値を使うなら空行のままリターンキ ー
を押せばよい。現在の値は [ ] の間に表示される。
注意
chage プログラムを用いるには shadow パスワードファイルが必要である。こ
の機能は、passwd ファイルにパスワードが保存されているときには利用できな
い。
ファイル
/etc/passwd - ユーザアカウント情報
/etc/shadow - shadow 化されたユーザアカウント情報
関連項目
passwd(5), shadow(5)
著者
Julianne Frances Haugh
CHAGE(1) User Commands CHAGE(1) NAME chage - change user password expiry information SYNOPSIS chage [options] LOGIN DESCRIPTION The chage command changes the number of days between password changes and the date of the last password change. This information is used by the system to determine when a user must change his/her password. OPTIONS The options which apply to the chage command are: -d, --lastday LAST_DAY Set the number of days since January 1st, 1970 when the password was last changed. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). If the LAST_DAY is set to 0 the user is forced to change his password on the next log on. -E, --expiredate EXPIRE_DATE Set the date or number of days since January 1, 1970 on which the user´s account will no longer be accessible. The date may also be expressed in the format YYYY-MM-DD (or the format more commonly used in your area). A user whose account is locked must contact the system administrator before being able to use the system again. Passing the number -1 as the EXPIRE_DATE will remove an account expiration date. -h, --help Display help message and exit. -I, --inactive INACTIVE Set the number of days of inactivity after a password has expired before the account is locked. The INACTIVE option is the number of days of inactivity. A user whose account is locked must contact the system administrator before being able to use the system again. Passing the number -1 as the INACTIVE will remove an account´s inactivity. -l, --list Show account aging information. -m, --mindays MIN_DAYS Set the minimum number of days between password changes to MIN_DAYS. A value of zero for this field indicates that the user may change his/her password at any time. -M, --maxdays MAX_DAYS Set the maximum number of days during which a password is valid. When MAX_DAYS plus LAST_DAY is less than the current day, the user will be required to change his/her password before being able to use his/her account. This occurrence can be planned for in advance by use of the -W option, which provides the user with advance warning. Passing the number -1 as MAX_DAYS will remove checking a password´s validity. -R, --root CHROOT_DIR Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. -W, --warndays WARN_DAYS Set the number of days of warning before a password change is required. The WARN_DAYS option is the number of days prior to the password expiring that a user will be warned his/her password is about to expire. If none of the options are selected, chage operates in an interactive fashion, prompting the user with the current values for all of the fields. Enter the new value to change the field, or leave the line blank to use the current value. The current value is displayed between a pair of [ ] marks. NOTE The chage program requires a shadow password file to be available. The chage command is restricted to the root user, except for the -l option, which may be used by an unprivileged user to determine when his/her password or account is due to expire. CONFIGURATION The following configuration variables in /etc/login.defs change the behavior of this tool: FILES /etc/passwd User account information. /etc/shadow Secure user account information. EXIT VALUES The chage command exits with the following values: 0 success 1 permission denied 2 invalid command syntax 15 can´t find the shadow password file SEE ALSO passwd(5), shadow(5). shadow-utils 4.1.5.1 05/10/2016 CHAGE(1)
コロナウイルスの日ごとの感染者数・死者数をグラフ化してみました。どの国が増加傾向にあり、どの国が終息に向かっているかを視覚化しています。
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa