Skip to content

Commit 3d9eb72

Browse files
committed
DLPX-86530 CIS: delphix user lockout after failed login attempts
PR URL: https://www.github.com/delphix/delphix-platform/pull/504
1 parent 8aa7466 commit 3d9eb72

File tree

1 file changed

+30
-0
lines changed
  • files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks

1 file changed

+30
-0
lines changed

files/common/var/lib/delphix-platform/ansible/10-delphix-platform/roles/delphix-platform/tasks/main.yml

+30
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,36 @@
336336
regexp: '^#?[\s]*(auth[\s]+required[\s]+pam_wheel\.so.*)$'
337337
replace: '\1'
338338

339+
#
340+
# Lock out the user after an unsuccessful consecutive login attempts.
341+
#
342+
- lineinfile:
343+
path: /etc/pam.d/common-auth
344+
line: "{{ item }}"
345+
insertbefore: '^auth\s+\[success=1\s+default=ignore\]\s+pam_unix\.so\s+nullok\s+try_first_pass'
346+
with_items:
347+
- 'auth required pam_tally2.so audit silent deny=5 unlock_time=900'
348+
349+
#
350+
# Configuration to enforce account lockout policies.
351+
#
352+
- lineinfile:
353+
path: /etc/pam.d/common-account
354+
line: "{{ item }}"
355+
insertafter: EOF
356+
with_items:
357+
- 'account required pam_tally2.so'
358+
359+
#
360+
# Configuration to remember user password history.
361+
#
362+
- lineinfile:
363+
path: /etc/pam.d/common-password
364+
line: "{{ item }}"
365+
insertbefore: '^password\s+\[success=1 default=ignore\]\s+pam_unix\.so\s+obscure\s+sha512'
366+
with_items:
367+
- 'password required pam_pwhistory.so remember=5'
368+
339369
#
340370
# Enable SNMP client tools to load MIBs by default.
341371
#

0 commit comments

Comments
 (0)