logrotate: Rotate wtmp files monthly, and keep them for a year

Message ID 20230914171501.566632-1-peter.mueller@ipfire.org
State Staged
Commit b8769ed95b800c5cde8b1c61bbfff935e6cef6c7
Headers
Series logrotate: Rotate wtmp files monthly, and keep them for a year |

Commit Message

Peter Müller Sept. 14, 2023, 5:15 p.m. UTC
  This prevents "last" being rendered unusable, and allows
for better and faster auditing of previous logins.

Fixes: #13322
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
---
 config/etc/logrotate.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/config/etc/logrotate.conf b/config/etc/logrotate.conf
index 0b6b48573..c5f9883c7 100644
--- a/config/etc/logrotate.conf
+++ b/config/etc/logrotate.conf
@@ -15,9 +15,9 @@  include /etc/logrotate.d
 
 # wtmp
 /var/log/wtmp {
-    weekly
+    monthly
     create 0664 root utmp
-    rotate 1
+    rotate 12
 }
 
 /var/log/httpd/access_log /var/log/httpd/error_log /var/log/httpd/ssl_request_log /var/log/httpd/ssl_engine_log {