What does chage command do?

The chage command in Unix/Linux is used to manage user password expiration and aging policies. Here are its main functions:

  1. Set Password Expiration: You can specify when a user's password will expire, requiring them to change it after a certain period.

  2. 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.

  3. Set Warning Period: You can set a warning period that notifies users a certain number of days before their password expires.

  4. 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!

0 Comments

no data
Be the first to share your comment!