Skip to content

Commit

Permalink
Merge pull request #12921 from teacup-on-rockingchair/sle15_cis_patches
Browse files Browse the repository at this point in the history
Some small patches for SLE15 CIS related remediations
  • Loading branch information
Mab879 authored Jan 29, 2025
2 parents 95eed20 + bfcec76 commit 1bd83d3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_slmicro
# platform = multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro
# reboot = false
# strategy = configure
# complexity = low
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# disruption = low
{{{ ansible_instantiate_variables("var_password_pam_tally2") }}}

{{{ ansible_remove_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'onerr=fail') }}}
{{{ ansible_ensure_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'deny', "{{ var_password_pam_tally2 }}", '') }}}
{{{ ansible_ensure_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'even_deny_root', '', '') }}}
{{{ ansible_ensure_pam_module_option('/etc/pam.d/common-account', 'account', 'required', 'pam_tally2.so', '', '', '') }}}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# disruption = low
{{{ bash_instantiate_variables("var_password_pam_tally2") }}}

{{{ bash_remove_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'onerr=fail') }}}
{{{ bash_ensure_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'deny', "${var_password_pam_tally2}", '') }}}
{{{ bash_ensure_pam_module_option('/etc/pam.d/login', 'auth', 'required', 'pam_tally2.so', 'even_deny_root', '', '') }}}
{{{ bash_ensure_pam_module_option('/etc/pam.d/common-account', 'account', 'required', 'pam_tally2.so', '', '', '') }}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# platform = multi_platform_all
# reboot = false
# complexity = low
# strategy = restrict
# disruption = medium

- name: Ensure interactive local users are the owners of their respective initialization files
ansible.builtin.lineinfile:
dest: /etc/group
backrefs: yes
regexp: '(^shadow:[^:]*:[^:]*:)([^:]+$)'
line: '\1'

0 comments on commit 1bd83d3

Please sign in to comment.