Dmitry Teselkin | bf79ba4 | 2018-09-27 13:56:38 +0300 | [diff] [blame] | 1 | # CIS 5.4.1.4 Ensure inactive password lock is 30 days or less (Scored) |
| 2 | # |
| 3 | # Description |
| 4 | # =========== |
| 5 | # User accounts that have been inactive for over a given period of time can be |
| 6 | # automatically disabled. It is recommended that accounts that are inactive |
| 7 | # for 30 days after password expiration be disabled. |
| 8 | # |
| 9 | # Rationale |
| 10 | # ========= |
| 11 | # Inactive accounts pose a threat to system security since the users are not |
| 12 | # logging in to notice failed login attempts or other anomalies. |
| 13 | # |
| 14 | # Audit |
| 15 | # ===== |
| 16 | # Run the following command and verify INACTIVE is 30 or less: |
| 17 | # |
| 18 | # # useradd -D | grep INACTIVE |
| 19 | # INACTIVE=30 |
| 20 | # |
| 21 | # Verify all users with a password have Password inactive no more than 30 days |
| 22 | # after password expires: |
| 23 | # |
| 24 | # # egrep ^[^:]+:[^\!*] /etc/shadow | cut -d: -f1 |
| 25 | # <list of users> |
| 26 | # # chage --list <user> |
| 27 | # Password inactive: <date> |
| 28 | # |
| 29 | # Remediation |
| 30 | # =========== |
| 31 | # Run the following command to set the default password inactivity period to |
| 32 | # 30 days: |
| 33 | # |
| 34 | # # useradd -D -f 30 |
| 35 | # |
| 36 | # Modify user parameters for all users with a password set to match: |
| 37 | # |
| 38 | # # chage --inactive 30 <user> |
| 39 | # |
| 40 | # Notes |
| 41 | # ===== |
| 42 | # You can also check this setting in /etc/shadow directly. The 7th field |
| 43 | # should be 30 or less for all users with a password. |
| 44 | # |
| 45 | parameters: |
| 46 | linux: |
| 47 | system: |
| 48 | login_defs: |
| 49 | INACTIVE: |
| 50 | value: 30 |
| 51 | |