From 7e8fc327e550a2fe101a9702830bd6ad14d11d84 Mon Sep 17 00:00:00 2001 From: slash3b Date: Sun, 3 Dec 2017 11:18:22 +0200 Subject: [PATCH] chage: add page --- pages/linux/chage.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 pages/linux/chage.md diff --git a/pages/linux/chage.md b/pages/linux/chage.md new file mode 100644 index 000000000..dab03ea15 --- /dev/null +++ b/pages/linux/chage.md @@ -0,0 +1,24 @@ +# chage + +> Change user account and password expiry information. + +- List password information for the user: + +`chage -l {{user_name}}` + +- Enable password expiration: + +`sudo chage -M {{days_before_password_change}} {{user_name}}` + +- Disable password expiration: + +`sudo chage -M 99999 {{user_name}}` + +- Set account expiration date: + +`sudo chage -E {{YYYY-MM-DD}}` + +- Force user to chage password on next log in: + +`sudo chage -d 0` +