What does `chage` do?

The chage command in Linux is used to change user password expiry information. It allows administrators to set various password aging policies for user accounts, such as:

  • Maximum number of days a password is valid before it must be changed.
  • Minimum number of days that must pass before a user can change their password again.
  • Number of days of warning before a password expires.
  • Setting an account expiration date.

For example, you can use chage to set the maximum password age for a user account like this:

sudo chage -M 90 username

This command sets the maximum password age to 90 days for the specified user.

0 Comments

no data
Be the first to share your comment!