Puppet Class: cis_security_hardening::rules::passwd_sha512
- Defined in:
- manifests/rules/passwd_sha512.pp
Summary
Ensure ENCRYPT_METHOD is SHA512Overview
The operating system must encrypt all stored passwords with a FIPS 140-2 approved cryptographic hashing algorithm.
Rationale: Passwords need to be protected at all times, and encryption is the standard method for protecting passwords. If passwords are not encrypted, they can be plainly read (i.e., clear text) and easily compromised.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'manifests/rules/passwd_sha512.pp', line 21
class cis_security_hardening::rules::passwd_sha512 (
Boolean $enforce = false,
) {
if $enforce {
$path = ($facts['os']['name'] == 'SLES' and $facts['os']['release']['major'] == '12') ? {
true => '/usr/etc/login.defs',
false => '/etc/login.defs',
}
file_line { 'password sha512':
ensure => present,
path => $path,
line => 'ENCRYPT_METHOD SHA512',
match => '^#?ENCRYPT_METHOD',
}
}
}
|