From 325bf584cee6d32a4b15246be12a80c9e8751334 Mon Sep 17 00:00:00 2001 From: ikerexxe Date: Tue, 2 Feb 2021 10:24:32 +0100 Subject: [PATCH] man: chage clarification man/chage.1.xml: Indicate that -d option with a value of 0 forces the user to change his password. Besides, set an example on how to use -E option. Finally, add a general note to clarify that chage only takes charge of local users and another note to indicate that it doesn't check inconsistencies between shadow and passwd files. --- man/chage.1.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/man/chage.1.xml b/man/chage.1.xml index 1e4cc539..afc9ed7a 100644 --- a/man/chage.1.xml +++ b/man/chage.1.xml @@ -102,6 +102,9 @@ 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. @@ -118,6 +121,13 @@ contact the system administrator before being able to use the system again. + + For example the following can be used to set an account to expire + in 180 days: + + + chage -E $(date -d +180days +%Y-%m-%d) + Passing the number -1 as the EXPIRE_DATE will remove an account @@ -239,6 +249,18 @@ The chage program requires a shadow password file to be available. + + The chage program will report only the information from the shadow + password file. This implies that configuration from other sources + (e.g. LDAP or empty password hash field from the passwd file) that + affect the user's login will not be shown in the chage output. + + + The chage program will also not report any + inconsistency between the shadow and passwd files (e.g. missing x in + the passwd file). The pwck can be used to check + for this kind of inconsistencies. + The chage command is restricted to the root user, except for the option, which may be used by an unprivileged user to determine when their password or account is due