Skip to content

Commit 109d01a

Browse files
committed
Check Configuration of password remember
and set default to 60 see Telekom 2021.07-01 SoC 3.01 Req 25 and SoC 3.65 Req46 Signed-off-by: Maik Stuebner <Maik.Stuebner@t-systems.com>
1 parent 2735730 commit 109d01a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

controls/os_spec.rb

+22
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,25 @@
282282
end
283283
end
284284
end
285+
286+
control 'os-14' do
287+
impact 1.0
288+
title 'Check pam config - RedHat specific'
289+
desc 'Check config of files in /etc/pam.d.'
290+
291+
pam_files = ['/etc/pam.d/system-auth', '/etc/pam.d/password-auth']
292+
293+
pam_files.each do |pam_file|
294+
describe file(pam_file) do
295+
it { should exist }
296+
it { should be_owned_by 'root' }
297+
its('group') { should eq 'root' }
298+
its(:content) { should match /^password requisite pam_pwhistory.so remember=60 use_authtok$/ }
299+
its(:content) { should match /^password requisite pam_pwquality.so try_first_pass retry=3 authtok_type=$/ }
300+
its(:content) { should match /^auth required pam_faillock.so preauth silent audit even_deny_root deny=5 unlock_time=15$/ }
301+
its(:content) { should match /^auth required pam_faillock.so authfail audit even_deny_root deny=5 unlock_time=15$/ }
302+
its(:content) { should match /^account required pam_faillock.so$/ }
303+
end
304+
end
305+
only_if { os.redhat? }
306+
end

0 commit comments

Comments
 (0)