File tree 1 file changed +22
-0
lines changed
1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 282
282
end
283
283
end
284
284
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
You can’t perform that action at this time.
0 commit comments