From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12C31C77B7D for ; Wed, 10 May 2023 13:52:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683726726; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UP2fqPSSIeFdWsUmu9KwyYR283zXLAluEanlXWiuJT8=; b=F5t34AAB/wpkpbMD0O7PcGlSXJ31dpyAcacFpKGAWf9kLGNJiMc8Du6qAmnXtR2P8Ul+Uc b7Ya8xyv5XwqIbZ+0kp0RCiH4k747uIrkD7NHJBEJdkX7HpJvWAc4+Qg+6DaYzNPZvnDKH wqNbuoFTeF1F2aHyh8SNSkkvkQKsrG8= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-472-1Xi6yoFcO2yj6cjs38azlQ-1; Wed, 10 May 2023 09:52:02 -0400 X-MC-Unique: 1Xi6yoFcO2yj6cjs38azlQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6F0EF87082F; Wed, 10 May 2023 13:51:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E9451121315; Wed, 10 May 2023 13:51:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F408A19452C6; Wed, 10 May 2023 13:51:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0C16F1946A45 for ; Wed, 10 May 2023 13:51:55 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E176A18EC1; Wed, 10 May 2023 13:51:54 +0000 (UTC) Received: from x2.localnet (unknown [10.22.17.96]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9E59647CD0; Wed, 10 May 2023 13:51:54 +0000 (UTC) From: Steve Grubb To: linux-audit@redhat.com Subject: Re: sending audit logs only to audit.log via rsyslog Date: Wed, 10 May 2023 09:51:53 -0400 Message-ID: <4838148.31r3eYUQgx@x2> Organization: Red Hat In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Wednesday, May 10, 2023 9:43:04 AM EDT kathy lyons wrote: > Good morning. I am trying to get the audit logs to be written only to > audit.log. Currently they are written to audit.log as well as syslog. > Here is my rsyslog.conf file - what am I doing wrong? > > module(load="imfile") > module(load="imklog") > module(load="imjournal") > > global(net.enableDNS="off" workDirectory=/var/spool/rsyslog" > maxMessageSize="128k") > > $IncludeConfig /etc/rsyslog.d/*.conf > $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat > > ##################### rules > audit.* ~/var/log/audit/audit.log > auth.warning;authpriv.info ~/var/log/auth.log > *.*;auth,authpriv.none ~/var/log/syslog > cron.info ~/var/log/cron.log > daemon.info ~/var/log/daemon.log > kern.* ~/var/log/kern.log > user.info ~/var/log/user.log The thing that is writing them to rsyslog is systemd-journald. You can stop this by running: systemctl mask systemd-journald-audit.socket systemctl stop systemd-journald-audit.socket Then you will only have logs written to the audit log. -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit