Getting Data In

how to reset the password using REST API

splunk47
New Member

kindly suggest how to reset the password of splunk user using REST API

Tags (3)
0 Karma
1 Solution

MuS
SplunkTrust
SplunkTrust

MuS
SplunkTrust
SplunkTrust

Hi splunk47,

take a look at the docs http://docs.splunk.com/Documentation/Splunk/6.2.1/RESTREF/RESTaccess#POST_authentication.2Fusers.2F.... how to use REST api to do this.

cheers, MuS

splunk47
New Member

if i want to change only admin password by supplying old and new password ... how this can be achieved through rest api

0 Karma

yannK
Splunk Employee
Splunk Employee

An admin can change anyone else password, with just the new password.

curl -k -u admin:adminpassword https://localhost:8089/services/authentication/users/testuser -d password=Passwordnew

but an user need to pass it's old and new password to do it :

curl -k -u testuser:Passwordold https://localhost:8089/services/authentication/users/testuser -d password=Passwordnew -d oldpassword=Passwordold

0 Karma

MuS
SplunkTrust
SplunkTrust

It's all in the docs http://docs.splunk.com/Documentation/Splunk/6.2.1/RESTREF/RESTaccessExamples#authentication.2Fusers.... read it, try it with a test user - succeed 😉

0 Karma

srinathd
Contributor

In the search head i tried to change the password of a user using below command, i got the success xml response but with the new password i am not able to login.

curl -k -u admin:temp https://localhost:8089/servicesNS/nobody/search/storage/passwords/user1 -d password=pwd_temp

0 Karma

MuS
SplunkTrust
SplunkTrust

Just did that:

curl -k -u admin:changeme https://localhost:8089/services/authentication/users/admin -d password=changeme123

and it worked like a charm check the URL you used, looks different to mine...

splunk47
New Member

ok thanks .. i think storage password section will me more appropriate for changing password

0 Karma
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 ...