Linux account password security policy

foreword

For server security, the server account password is a very important thing

We can choose to cancel the account and password login and only use the public key to log in, but sometimes it may not be convenient

Here we tell you how to manage account passwords more securely

1. The maximum number of days for the account and password to be used

Modify PASS_MAX_DAYS 1095 in /etc/login.defs

The same password can only be used for a maximum of 1095 days

2. The minimum number of days between password changes

Modify PASS_MIN_DAYS 7 in /etc/login.defs

The password must be changed at least 7 days

3. The maximum number of days of account inactivity

useradd -D -f 1095

Account will be cancelled if there is no activity within 1095 days

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325851484&siteId=291194637