Splunk Search

How to generate a search to find when a user is created and deleted in a period of time?

wvalente
Explorer

Hi,

I want to run a search that alert me when a user is created and deleted in a period of time between 72 hours and 4 hours.

Could anyone help me?

Tks.

0 Karma

DalJeanis
Legend

Are you talking about a splunk user, an Active Directory user, a local user on a windows machine, or something else?

for splunk users , search index=_audit object=<username>

this code from this page https://answers.splunk.com/answers/368373/when-was-the-user-account-created.html

 index=_audit action=edit_user operation=create
 |rename object as user
 |eval timestamp=strptime(timestamp, "%m-%d-%Y %H:%M:%S.%3N") 
 |convert timeformat="%d/%b/%Y" ctime(timestamp)
 |table user timestamp

You should be able to find any deletes the same way.

For windows users, see https://answers.splunk.com/answers/144190/account-creation-and-deletion-within-a-given-time.html

0 Karma

wvalente
Explorer

Hi DlJeanis,

I'm talking about linux user.

I can use the 'windows user' query.

Tks for your support.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...