Wednesday, May 18, 2016

How to set an expiration date for user' password on Linux

Step 1: Open file /etc/login.defs, change option for PASS_MAX_DAYS, For example:

# Password aging controls:
#
#       PASS_MAX_DAYS   Maximum number of days a password may be used.
#       PASS_MIN_DAYS   Minimum number of days allowed between password changes.
#       PASS_MIN_LEN    Minimum acceptable password length.
#       PASS_WARN_AGE   Number of days warning given before a password expires.
#
PASS_MAX_DAYS   90

Step 2: With exist user, you can change expiration date via command:

[root@VTGDB.COM ~]# chage -M 90 username

Share this

0 Comment to "How to set an expiration date for user' password on Linux"

Post a Comment