Skip to content

Commit

Permalink
accounts_password_set_max_life_existing: Fix ansible to avoid system
Browse files Browse the repository at this point in the history
accounts
  • Loading branch information
dodys committed Dec 15, 2022
1 parent 01f2f77 commit e34e2a7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- name: Collect users with not correct maximum time period between password changes
ansible.builtin.command:
cmd: awk -F':' '$5 > {{ var_accounts_maximum_age_login_defs }} || $5 == "" {print $1}' /etc/shadow
cmd: awk -F':' '(/^[^:]+:[^!*]/ && ($5 > {{ var_accounts_maximum_age_login_defs }} || $5 == "")) {print $1}' /etc/shadow
register: user_names

- name: Change the maximum time period between password changes
Expand Down

0 comments on commit e34e2a7

Please sign in to comment.