All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: "Linux-audit@redhat.com" <Linux-audit@redhat.com>
Subject: Re: useradd question
Date: Fri, 17 May 2019 08:44:04 -0400	[thread overview]
Message-ID: <1666978.mmmlVrCjaM@x2> (raw)
In-Reply-To: <d3d7fc57-c368-9d01-aae5-cb5469cd2334@magitekltd.com>

On Thursday, May 16, 2019 7:00:38 PM EDT Lenny Bruzenak wrote:
> If I add a new user with the "useradd" utility, it submits a ADD_USER
> event, but the event itself has no interpretation for the new UID.

What exactly was typed in at the command line? This is caused by this line of 
code:

https://github.com/linux-audit/audit-userspace/blob/master/lib/
audit_logging.c#L480

The idea is that we want to rely on the number rather than the name. However, 
the log event is supposed to be created after passwd and shadow have been 
updated. So, the audit daemon should be able to resolve the event. 

Maybe useradd needs to be straced to see if it does everything in one shot or 
if it sends multiple events as it builds the user.
 
> IOW, the "id" field is numeric and the translated data at the end of the
> raw record has "ID=unknown(number)".
> 
> I'm guessing it is because until the user data has been successfully
> entered, there is no translation. Perhaps the event submission should
> wait until that happens?

I'd say strace useradd will have the answer.

> I may be able to dig out the name from other related generated events,
> but that is kind of a pain.

Right. Let's see what the root cause is and then what we can do about it.

-Steve

  reply	other threads:[~2019-05-17 12:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 23:00 useradd question Lenny Bruzenak
2019-05-17 12:44 ` Steve Grubb [this message]
2019-05-20 15:39   ` Lenny Bruzenak
2019-05-20 19:59     ` Steve Grubb
2019-05-20 20:05       ` Lenny Bruzenak
2019-05-20 20:12         ` Steve Grubb
2019-05-22 17:34         ` Steve Grubb
2019-05-22 18:23           ` Lenny Bruzenak

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=1666978.mmmlVrCjaM@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.