Security

Script for Splunk admin password change

inayath_khanin1
Explorer

Hi Folks, 

 

Can anyone please help me with a script that help to change splunk admin password across 100 servers? It should prompt what password to change with.

 

Thanks in advance 

Labels (1)
0 Karma
1 Solution

codebuilder
Influencer

You can use bash or python (amongst others) to create a script that incorporates the API or CLI examples  provided.

----
An upvote would be appreciated and Accept Solution if it helps!

View solution in original post

inayath_khanin1
Explorer

@codebuilder We are actually looking for a script that can be run one one server to change the password of rest servers. can u pls help us with this

0 Karma

codebuilder
Influencer

You can use bash or python (amongst others) to create a script that incorporates the API or CLI examples  provided.

----
An upvote would be appreciated and Accept Solution if it helps!

codebuilder
Influencer

If you want the user to be prompted you can do this via the CLI (obviously change your user name and admin password):

splunk edit user test_user -force-change-pass true -auth admin:changeme

Or via the API:

curl -k -u admin:changeme https://localhost:8089/services/authentication/users/test_user -d force-change-pass=true

Or if you want to set the new password outright:

splunk edit user <username> -auth admin:<admin_password> -password <password>

----
An upvote would be appreciated and Accept Solution if it helps!
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...