All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Linux Audit <linux-audit@redhat.com>
Subject: Re: last restart of auditd - in EPOCH time
Date: Wed, 04 Aug 2021 16:02:51 -0400	[thread overview]
Message-ID: <2791176.e9J7NaK4W3@x2> (raw)
In-Reply-To: <CAJdJdQnN6YBE6Qos5ctHKKNX2n7LWgWJQxM4zgvMCKUoCSmZFQ@mail.gmail.com>

Hello,

On Wednesday, August 4, 2021 3:25:40 PM EDT warron.french wrote:
> Is there a hidden switch option to auditctl that would tell me the last
> time auditd was restart specifically in epoch (down to the second)?

Not auditctl, but maybe ausearch:
ausearch --start boot -m daemon_start -i

Or...
systemctl status auditd.service | grep Active

And if you need this in the epoch:
date --date="$(systemctl status auditd.service|grep Active|awk '{printf "%s 
%s", $6, $7}')" +"%s"

> If my rules are changed to non-immutable ( -e 1 ) rebooted, and then
> changed back to immutable ( -e 2 ), then I discover this weeks later, then
> I will not know for sure which was most recently updated/restarted.

That might be one issue with using ausearch...it might have scrolled away. 
Maybe this could be collected at start and printed as part of the auditd 
state report? I could see this being useful information for various reasons.

> That is the reason for the question.  I am doing this for a hardening
> script that will tell me based on known recent changes (as of script
> execution), but I cannot properly/successfully assess for dates outside of
> a day or so.  :-/

systemctl should be able to get you the info you need. I might add this info 
to the state report, though.

-Steve


--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit


  reply	other threads:[~2021-08-04 20:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 19:25 last restart of auditd - in EPOCH time warron.french
2021-08-04 20:02 ` Steve Grubb [this message]
2021-08-05 13:03   ` warron.french

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=2791176.e9J7NaK4W3@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.