File tree 5 files changed +17
-2
lines changed
5 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 29
29
os_filesystem_whitelist : []
30
30
os_yum_repo_file_whitelist : ['foo.repo']
31
31
os_users_without_password_ageing : ['pw_no_ageing']
32
+ os_auth_pw_warn_age : 7
32
33
os_netrc_enabled : false
33
34
os_ignore_users : ["shell_sys_acc"]
34
35
os_ignore_home_folder_users : ["user_with_777_home"]
Original file line number Diff line number Diff line change 14
14
changed_when : false
15
15
register : expiry_date
16
16
17
- - name : Check that the expiry date of pw_ageing is 30 days
17
+ - name : Check that the expiry date of pw_ageing is 60 days
18
18
ansible.builtin.assert :
19
19
# this uses the date from the expire_date variable and subtracts the current date.
20
20
# it should be bigger that the password_expire_min of the user "pw_no_ageing"
21
21
that :
22
22
- " {{ ( expiry_date.stdout | trim | to_datetime('%b %d, %Y') - ansible_date_time.date | to_datetime('%Y-%m-%d')).days }} == 60"
23
+
24
+ - name : Get Password Expiry warning days for pw_ageing
25
+ ansible.builtin.shell : chage -l pw_ageing | grep "warning before password expires" | cut -d ":" -f 2
26
+ changed_when : false
27
+ register : expiry_warndays
28
+
29
+ - name : Check that number of days of warning before password expires is 7 days
30
+ ansible.builtin.assert :
31
+ that :
32
+ - " expiry_warndays.stdout | trim == '7'"
Original file line number Diff line number Diff line change @@ -107,6 +107,9 @@ We know that this is the case on Raspberry Pi.
107
107
- ` os_auth_pw_min_age `
108
108
- Default: ` 7 `
109
109
- Description: minimum password age (before allowing any other password change).
110
+ - ` os_auth_pw_warn_age `
111
+ - Default: ` 7 `
112
+ - Description: number of days of warning before password expires.
110
113
- ` os_auth_pw_remember `
111
114
- Default: ` 5 `
112
115
- Description: how many used passwords are record.
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ os_desktop_enable: false
3
3
os_env_extra_user_paths : []
4
4
os_auth_pw_max_age : 60
5
5
os_auth_pw_min_age : 7 # Discourage password cycling
6
+ os_auth_pw_warn_age : 7
6
7
os_auth_pw_remember : 5 # Specify how many used passwords are record
7
8
os_auth_retries : 5
8
9
os_auth_lockout_time : 600 # Seconds (600 = 10min)
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ PASS_MAX_DAYS {{ os_auth_pw_max_age }}
110
110
PASS_MIN_DAYS {{ os_auth_pw_min_age }}
111
111
112
112
# Number of days warning given before a password expires.
113
- PASS_WARN_AGE 7
113
+ PASS_WARN_AGE {{ os_auth_pw_warn_age }}
114
114
115
115
# Min/max values for automatic uid selection in useradd
116
116
UID_MIN {{ os_auth_uid_min }}
You can’t perform that action at this time.
0 commit comments