Splunk Search

Splunk user last login Time through LDAP

Nawab
Communicator

I have a requirement where I want to see all users and their last login time, we are connected through Ldap so setting > users > last login time doesnot work.

 

I tried below query but it only shows lastest users not all.

| rest /services/authentication/httpauth-tokens splunk_server=* | table timeAccessed userName splunk_server

Also I want to know when a user was created on splunk as well, as users are created via LDAP

 

Labels (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Nawab ,

if an LDAP user didn't login to Splunk, you don't see it, you can see only users that logged in at least one time.

To see the logged in users and the last login timestamp, you can read a simpe search like the following:

index=_audit  action=success sourcetype=audittrail
| stats latest(_time) AS _time count BY user

It's the same thing if you try to see by GUI the list of users in [Settings > Users]: you can see only internal users and the LDAP users that logged in.

Ciao.

Giuseppe

0 Karma

Nawab
Communicator

This is the issue when you connect splunk with AD splunk will not store authentication logs locally and you will not be able to find in settings or in logs

i have different siem where i can see everything locally as users are local not through AD

0 Karma

tej57
Builder

Hello @Nawab,

You might want to raise this as a new feature on ideas.splunk.com 

Thanks,
Tejas. 

0 Karma
Get Updates on the Splunk Community!

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...