Forrest logo
tool overview
On this page you find all important commands for the CLI tool chage. If the command you are looking for is missing please ask our AI.

chage

The command line tool "chage" in Unix-like operating systems is used to manage password aging and expiration policies for user accounts.

  1. "chage" stands for Change Age. It is typically used by system administrators to enforce security policies.
  2. Password aging is the concept of setting expiration dates for user passwords to enhance security.
  3. The tool allows administrators to set various aspects of password aging, such as minimum and maximum password age.
  4. By setting a minimum password age, administrators can prevent users from changing their passwords too frequently.
  5. With the "chage" command, administrators can set a maximum password age, forcing users to change their passwords periodically.
  6. Administrators can also set a warning period using chage, notifying users in advance that their password is about to expire.
  7. The "chage" command can be used to disable password aging, allowing users to have passwords that never expire.
  8. "chage" also provides an option to lock user accounts after a certain number of days since the password expiration date.
  9. Another feature includes setting the number of days before a password can be changed again once it has been changed.
  10. In addition to managing password aging, "chage" can display the current password expiration information for a specific user.

List of commands for chage:

  • chage:tldr:7de32 chage: Set account expiration date.
    $ sudo chage --expiredate ${YYYY-MM-DD} ${username}
    try on your machine
    explain this command
  • chage:tldr:96652 chage: Enable password expiration in 10 days.
    $ sudo chage --maxdays ${10} ${username}
    try on your machine
    explain this command
  • chage:tldr:f2485 chage: Force user to change password on next log in.
    $ sudo chage --lastday ${0} ${username}
    try on your machine
    explain this command
  • chage:tldr:f9107 chage: List password information for the user.
    $ chage --list ${username}
    try on your machine
    explain this command
tool overview