How to enable Centos password cycle settings

Source: Internet
Author: User
Some servers were reinforced according to company requirements some time ago. one of the reinforcement content was to set the user password cycle time. Facts have proved that this wood is useful for tasks. The following is a small test in the virtual machine environment: first, log on to the server and check/etc/login. def and then check/etc/shadow to find that the two passwords are completely correct. Then, we modified the first line of/etc/login. def. some servers were reinforced according to the company's requirements some time ago. one of the reinforcement contents was to set the user password cycle time. Facts have proved that this wood is useful for tasks. The following is a small drop test in the virtual machine environment:
First, log on to the server and check/etc/login. def.
Then, check/etc/shadow.
It is found that the two password policies are completely correct.
Then, we modify/etc/login. def.
In the first line, the password can be used for a maximum of 90 days, and a reminder will be given after 90 days.
In the second line, the minimum password time is 10 days. you cannot change the password within 10 days.
Line 3: password complexity, minimum 8 bits
Row 4: After the password expires, the system will remind you five days later. if you haven't changed the password five days later, the account will be frozen and become invalid.

After the modification, check/etc/shadow again and find that there is no change. Then we add an account in useradd test and find that the newly added account is suitable for the modified password cycle settings.

After repeated tests, we found that no matter whether you are adding a common account or an administrator account, or modifying PASS_MIN_DAYS, PASS_MIN_LEN, or PASS_WARN_AGE, these options are only applicable to the later added accounts, there is no impact on an existing account.

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.