The chage command in Unix/Linux is used to manage user password expiration and aging policies. Here are its main functions:
-
Set Password Expiration: You can specify when a user's password will expire, requiring them to change it after a certain period.
-
Set Minimum and Maximum Password Age: It allows you to define the minimum number of days before a user can change their password and the maximum number of days a password remains valid.
-
Set Warning Period: You can set a warning period that notifies users a certain number of days before their password expires.
-
Account Expiration: It can also be used to set an expiration date for user accounts.
Example Usage:
To set the maximum password age for a user named cyberuser to 90 days, you would use:
sudo chage -M 90 cyberuser
If you have more questions or need further details, feel free to ask!
