[User management] sets Password Aging.

Source: Internet
Author: User

[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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.