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.