From aaa05fa67226c03bf2d9bd19628b80083a2bb8a2 Mon Sep 17 00:00:00 2001 From: "root@DERVISHx" Date: Tue, 10 Oct 2023 14:07:53 +0100 Subject: [PATCH] 5.6.5 Force umask sessions /etc/pam.d/system-auth --- tasks/section_5/cis_5.6.x.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasks/section_5/cis_5.6.x.yml b/tasks/section_5/cis_5.6.x.yml index e5565b4..d9c6a35 100644 --- a/tasks/section_5/cis_5.6.x.yml +++ b/tasks/section_5/cis_5.6.x.yml @@ -98,6 +98,11 @@ regexp: '^USERGROUPS_ENAB' line: USERGROUPS_ENAB no + - name: "5.6.5 | PATCH | Ensure default user umask is 027 or more restrictive | Force umask on sessions /etc/pam.d/system-auth" + ansible.builtin.lineinfile: + path: /etc/pam.d/system-auth + line: 'session\trequired\t\t\tpam_umask.so' + insertafter: EOF when: - rhel9cis_rule_5_6_5 tags: