(Optional) Setting the Password Validity Period

  1. Check the password validity period.

    vi /etc/login.defs

    The value of parameter PASS_MAX_DAYS is the password validity period.

  2. Change the value of parameter PASS_MAX_DAYS.

    chage -M 99999 user_name

    99999 is the password validity period, and user_name is a system user.

    Configure the password validity period as needed and change it on a regular basis.

  3. Run vi /etc/login.defs to verify that the configuration has taken effect.

    image1