From 7e8fc327e550a2fe101a9702830bd6ad14d11d84 Mon Sep 17 00:00:00 2001 From: slash3b Date: Sun, 3 Dec 2017 11:18:22 +0200 Subject: [PATCH 1/3] 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 0000000000..dab03ea155 --- /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` + From 6453e7e98a7bebfc08c924d2d934c2abdb2ea571 Mon Sep 17 00:00:00 2001 From: slash3b Date: Mon, 4 Dec 2017 20:29:18 +0200 Subject: [PATCH 2/3] fixes --- pages/linux/chage.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/linux/chage.md b/pages/linux/chage.md index dab03ea155..f361715f0a 100644 --- a/pages/linux/chage.md +++ b/pages/linux/chage.md @@ -6,9 +6,9 @@ `chage -l {{user_name}}` -- Enable password expiration: +- Enable password expiration in 10 days: -`sudo chage -M {{days_before_password_change}} {{user_name}}` +`sudo chage -M {{10}} {{user_name}}` - Disable password expiration: @@ -18,7 +18,6 @@ `sudo chage -E {{YYYY-MM-DD}}` -- Force user to chage password on next log in: +- Force user to change password on next log in: `sudo chage -d 0` - From f5ce198158e22b7e7afc5fe00eb1ccb8d56afc39 Mon Sep 17 00:00:00 2001 From: Ilya Tribusean Date: Tue, 5 Dec 2017 09:26:18 +0200 Subject: [PATCH 3/3] tiny improvement --- pages/linux/chage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/linux/chage.md b/pages/linux/chage.md index f361715f0a..a05f725acd 100644 --- a/pages/linux/chage.md +++ b/pages/linux/chage.md @@ -12,7 +12,7 @@ - Disable password expiration: -`sudo chage -M 99999 {{user_name}}` +`sudo chage -M -1 {{user_name}}` - Set account expiration date: