How to configure these settings?

To configure password aging settings like PASS_MAX_DAYS, PASS_MIN_DAYS, and PASS_WARN_AGE, you can use the chage command in Linux. Here’s how to do it:

  1. Open a terminal.

  2. Use the chage command with the appropriate options. Here’s the syntax:

    sudo chage -M <max_days> -m <min_days> -W <warn_age> <username>
    • -M <max_days>: Set the maximum days a password is valid.
    • -m <min_days>: Set the minimum days before a password can be changed.
    • -W <warn_age>: Set the number of days before expiration to warn the user.
  3. Example: To set a maximum of 90 days, a minimum of 7 days, and a warning period of 14 days for a user named john, you would run:

    sudo chage -M 90 -m 7 -W 14 john
  4. Verify the settings: You can check the current settings for a user with:

    chage -l <username>

This will display the password aging information for the specified user. If you have any further questions or need additional examples, let me know!

0 Comments

no data
Be the first to share your comment!