From 99047ec3b4b8b42f3d5b04eee446a0b074b6ce58 Mon Sep 17 00:00:00 2001 From: shellheim <116480892+shellheim@users.noreply.github.com> Date: Wed, 27 Sep 2023 13:24:36 +0000 Subject: [PATCH] lchage: add page (#10754) Co-authored-by: K.B.Dharun Krishna Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> --- pages/linux/lchage.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pages/linux/lchage.md diff --git a/pages/linux/lchage.md b/pages/linux/lchage.md new file mode 100644 index 000000000..ab42f986d --- /dev/null +++ b/pages/linux/lchage.md @@ -0,0 +1,20 @@ +# lchage + +> Display or change user password policy. +> More information: . + +- Disable password expiration for the user: + +`sudo lchage --date -1 {{username}}` + +- Display the password policy for the user: + +`sudo lchage --list {{username}}` + +- Require password change for the user a certain number of days after the last password change: + +`sudo lchage --maxdays {{number_of_days}} {{username}}` + +- Start warning the user a certain number of days before the password expires: + +`sudo lchage --warndays {{number_of_days}} {{username}}`