An example Analysis of the problem of password cycle setting in linux
This article is to share with you the content of an example analysis of password cycle setting in linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Some time ago, some servers were reinforced according to the requirements of the company, and one of the reinforcement contents is to set the user password cycle time. Facts have proved that this is of no use to the task. Here is a small test in a virtual machine environment:
First, log in to the server and check / etc/login.def
Then check / etc/shadow again
It is found that the two password strategies are exactly the right one.
Then, we modify / etc/login.def
On the first line, the password can be used for up to 90 days, and there will be a reminder after 90 days.
On the second line, the password can be used for a minimum of 10 days, and the password cannot be changed within 10 days.
Third line, password complexity, at least 8 bits
On the fourth line, the password will be reminded for 5 days after it expires. If the password has not been changed after 5 days, the account will be frozen and invalid.
After the modification, check / etc/shadow and find that there is no change. Then we add an account to useradd test and find that the newly added account adapts to the modified password cycle setting.
After repeated tests, it is found that whether it is to add an ordinary account or an administrator account, or to modify the options of PASS_MIN_DAYS, PASS_MIN_LEN and PASS_WARN_AGE, it is only applicable to the accounts that are added later, and there is no impact on the accounts that already exist.
Thank you for reading! This is the end of the article on "example Analysis of password cycle setting in linux". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!