Code Monkey home page Code Monkey logo

Comments (3)

jamescassell avatar jamescassell commented on September 2, 2024

Look at similar changes made to the RHEL6-STIG role a few months ago.

from rhel7-stig.

mikerenfro avatar mikerenfro commented on September 2, 2024

Haven't put this into testing yet, but this is shorter than what I had before, and resembles the RHEL6-STIG changes:

- block:
      - name: |
              "MEDIUM | RHEL-07-010320 | PATCH | Accounts subject to three unsuccessful login attempts within 15 minutes must be locked for the maximum configurable period (add modules)."
              "MEDIUM | RHEL-07-010330 | PATCH | If three unsuccessful logon attempts within 15 minutes occur the associated account must be locked (add modules)."
        pamd:
            name: "{{ item.name }}"
            state: "{{ item.state }}"
            type: "{{ item.type }}"
            control: "{{ item.control }}"
            module_path: pam_unix.so
            new_type: "{{ item.type }}"
            new_control: "{{ item.new_control }}"
            new_module_path: pam_faillock.so
            module_arguments: "{{ item.args }}"
        with_items:
            - { name: "system-auth", state: "before", type: "auth", control: "sufficient", new_control: "required", args: "preauth silent {{ faillock_args }}" }
            - { name: "password-auth", state: "before", type: "auth", control: "sufficient", new_control: "required", args: "preauth silent {{ faillock_args }}" }
            - { name: "system-auth", state: "after", type: "auth", control: "sufficient", new_control: "[default=die]", args: "authfail {{ faillock_args }}" }
            - { name: "password-auth", state: "after", type: "auth", control: "sufficient", new_control: "[default=die]", args: "authfail {{ faillock_args }}" }
            - { name: "system-auth", state: "before", type: "account", control: "required", new_control: "required", args: ""}
            - { name: "password-auth", state: "before", type: "account", control: "required", new_control: "required", args: ""}

      - name: |
              "MEDIUM | RHEL-07-010320 | PATCH | Accounts subject to three unsuccessful login attempts within 15 minutes must be locked for the maximum configurable period (update modules)."
              "MEDIUM | RHEL-07-010330 | PATCH | If three unsuccessful logon attempts within 15 minutes occur the associated account must be locked (update modules)."
        pamd:
            name: "{{ item.name }}"
            state: updated
            type: auth
            control: "{{ item.control }}"
            module_path: pam_faillock.so
            module_arguments: "{{ item.args }}"
        with_items:
            - { name: "system-auth", control: "required", args: "preauth silent {{ faillock_args }}" }
            - { name: "password-auth", control: "required", args: "preauth silent {{ faillock_args }}" }
            - { name: "system-auth", control: "[default=die]", args: "authfail {{ faillock_args }}" }
            - { name: "password-auth", control: "[default=die]", args: "authfail {{ faillock_args }}" }

        vars:
            faillock_args: "audit deny={{ rhel7stig_pam_faillock.attempts }}{{ (rhel7stig_pam_faillock.fail_for_root) | ternary(' even_deny_root ',' ') }}fail_interval={{ rhel7stig_pam_faillock.interval }} unlock_time={{ rhel7stig_pam_faillock.unlock_time }}"
            
  when: rhel_07_010320 or rhel_07_010330
  tags:
      - RHEL-07-010320
      - RHEL-07-010330
      - pamd

from rhel7-stig.

shepdelacreme avatar shepdelacreme commented on September 2, 2024

This should be fixed in #180 - TLDR of the convo in that PR is that the pamd module is broken.

from rhel7-stig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.