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
You can use bash or python (amongst others) to create a script that incorporates the API or CLI examples provided.
@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
You can use bash or python (amongst others) to create a script that incorporates the API or CLI examples provided.
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>