Skip to content

Commit 05a8421

Browse files
author
Sebastian Gumprich
committed
Revert "test more fixes"
This reverts commit f12c93b.
1 parent f12c93b commit 05a8421

File tree

1 file changed

+24
-1
lines changed
  • molecule/os_hardening/verify_tasks

1 file changed

+24
-1
lines changed

molecule/os_hardening/verify_tasks/pam.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@
1515

1616
- name: set password for test
1717
set_fact:
18-
test_pw: "myTest§pw"
18+
test_pw: "myTest!pw"
19+
20+
- name: set locale for test
21+
set_fact:
22+
locale: "en_US.UTF-8"
23+
when:
24+
- ansible_facts.os_family == 'RedHat'
25+
- ansible_facts.distribution_major_version < '8'
1926

2027
- name: create testuser
2128
user:
@@ -25,15 +32,27 @@
2532
- name: check successful login with correct password
2633
shell:
2734
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }}"
35+
environment:
36+
TMPDIR: /var/tmp
37+
LC_ALL: "{{ locale | default('C.UTF-8') }}"
38+
LANG: "{{ locale | default('C.UTF-8') }}"
2839

2940
- name: check unsuccessful login with incorrect password
3041
shell:
3142
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }}fail --expectfail"
43+
environment:
44+
TMPDIR: /var/tmp
45+
LC_ALL: "{{ locale | default('C.UTF-8') }}"
46+
LANG: "{{ locale | default('C.UTF-8') }}"
3247
with_sequence: count=6
3348

3449
- name: check unsuccessful login, with correct password (lockout)
3550
shell:
3651
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }} --expectfail"
52+
environment:
53+
TMPDIR: /var/tmp
54+
LC_ALL: "{{ locale | default('C.UTF-8') }}"
55+
LANG: "{{ locale | default('C.UTF-8') }}"
3756

3857
- name: wait for account to unlock
3958
pause:
@@ -42,3 +61,7 @@
4261
- name: check successful login
4362
shell:
4463
cmd: "/usr/local/bin/pam-tester --user testuser --password {{ test_pw }}"
64+
environment:
65+
TMPDIR: /var/tmp
66+
LC_ALL: "{{ locale | default('C.UTF-8') }}"
67+
LANG: "{{ locale | default('C.UTF-8') }}"

0 commit comments

Comments
 (0)