public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
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	[thread overview]
Message-ID: <4838148.31r3eYUQgx@x2> (raw)
In-Reply-To: <CAN-5jM-V+J5aZTnu86NzgKw3LGSZ76LyTusrF-MF+V_LjV3u7A@mail.gmail.com>

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


  reply	other threads:[~2023-05-10 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 13:43 sending audit logs only to audit.log via rsyslog kathy lyons
2023-05-10 13:51 ` Steve Grubb [this message]
2023-05-10 15:51   ` kathy lyons
2023-05-10 16:11     ` Steve Grubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4838148.31r3eYUQgx@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox