[User management] Set Password Aging method 1 www.2cto.com [plain] [root @ Rocky ~] # Cat/etc/login. defs # 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 99999 -- set it to 9999. In fact, PASS_MIN_DAYS 0 PASS_MIN_LEN 5 PA is disabled. SS_WARN_AGE 7 ② Method 2: The following configuration is valid for new users [plain] [root @ Rocky ~] # Cat/etc/default/useradd # useradd defaults file GROUP = 100 HOME =/home INACTIVE =-1 // the password has expired and has not been modified, the user account will be set to unavailable and will be locked EXPIRE = // the expiration date of the new user's password will be indicated directly, the format is YYYY-MM-DD SHELL =/bin/bash SKEL =/etc/skel CREATE_MAIL_SPOOL = yes method 3: The following configuration can be applied to old user usage: chage [Option] user name option:-d, -- lastday: Set the last password to "Latest Date"-E, -- expiredate: Set the Account expiration time to "Expiration Date"-h, -- help displays the help information and exits-I, -- inactive invalid password sets the password that expires to "invalid password"-l, -- list display account Household age information-m, -- mindays minimum number of days the minimum number of days between two password changes is set to "minimum number of days"-M, -- maxdays: set the maximum number of days between two password changes to "Maximum number of days"-W, -- warndays: [root @ Rocky ~] # Chage-M 60 robbin