Use the chage command in linux to modify the validity period of the account and password
This article will explain in detail the validity period for using the chage command in linux to modify your account and password. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The chage command is used to change the expiration date of an account and password; this information is used by the system to determine when a user must change his or her password.
Syntax format: chage [parameters]
Common parameters:
The maximum number of days that the-M password remains valid-the number of days before the W user's password expires that the warning message is received in advance-the date on which the E account expires, this account-d the date of the last change-l instantiates the current setting. It is up to unprivileged users to determine when their passwords or accounts expire.
Reference example
Use the-l parameter to list the settings where the user's password expires:
[root@linuxcool ~] # chage-l root
Use the-M parameter to set the password for redis users with a maximum validity period of 100 days:
[root@linuxcool] # chage-M 100 redis this is the end of the validity period for modifying your account and password using the chage command in linux. I hope the above content can be helpful to you and you can learn more. If you think the article is good, you can share it for more people to see.