Skip to content
Snippets Groups Projects
Commit cb038662 authored by Jonathan Lent's avatar Jonathan Lent
Browse files

changing btmp perms to 600 on RHEL systems

parent 37536fdb
No related branches found
No related tags found
No related merge requests found
unreleased (??) unreleased (??)
[newsyslog] Change permissions of /var/log/btmp to '600' in RHEL
systems so that sshd stops complaining (jlent)
[dns] Make dns_cache a class-level parameter, so that it can be set in [dns] Make dns_cache a class-level parameter, so that it can be set in
Hiera (as base::dns::dns_cache) (akkornel) Hiera (as base::dns::dns_cache) (akkornel)
......
...@@ -48,6 +48,14 @@ class base::newsyslog { ...@@ -48,6 +48,14 @@ class base::newsyslog {
purge => true, purge => true,
} }
# btmp permissions must be 600 in RHEL systems
# sshd on RHEL systems will complain otherwise, since bad ssh attempts
# often are the result of entering a password as a username
$btmp_perms = $osfamily ? {
'RedHat' => '600',
default => '660',
}
# Rotate btmp and wtmp monthly and save one year's worth of those files. # Rotate btmp and wtmp monthly and save one year's worth of those files.
# This requires two separate log configurations because there isn't a way to # This requires two separate log configurations because there isn't a way to
# represent different permissions for different files in # represent different permissions for different files in
...@@ -56,7 +64,7 @@ class base::newsyslog { ...@@ -56,7 +64,7 @@ class base::newsyslog {
frequency => 'monthly', frequency => 'monthly',
log_owner => 'root', log_owner => 'root',
log_group => 'utmp', log_group => 'utmp',
log_mode => '660', log_mode => $btmp_perms,
logs => [ 'btmp' ], logs => [ 'btmp' ],
save_num => '12', save_num => '12',
} }
...@@ -75,7 +83,7 @@ class base::newsyslog { ...@@ -75,7 +83,7 @@ class base::newsyslog {
ensure => file, ensure => file,
owner => 'root', owner => 'root',
group => 'utmp', group => 'utmp',
mode => '0660', mode => $btmp_perms,
} }
# Remove an old misspelled configuration file. # Remove an old misspelled configuration file.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment