Security

CLI command to login: Is there a way to add the -auth parameter or does login not have that feature?

ben_leung
Builder

Tried to run

./splunk login -auth admin:password

Cannot seem to execute a one liner command to authenticate local user session.

Is there a way to add the -auth parameter or does login not have that feature?

Tags (3)
1 Solution

musskopf
Builder

I don't think you could send user and pass for the login command. As alternative you could use a search to login and create the session:

./splunk search 'index=_internal | fields _time | head 1 ' -auth 'admin:password'

After that you have your session and don't have to send user/pass anymore.

Cheers

View solution in original post

musskopf
Builder

I don't think you could send user and pass for the login command. As alternative you could use a search to login and create the session:

./splunk search 'index=_internal | fields _time | head 1 ' -auth 'admin:password'

After that you have your session and don't have to send user/pass anymore.

Cheers

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...