Security

Can I set force_change_pass on a user from the command line?

NaraSplunk
Explorer

I can use the API to set this:
curl -k -u admin:changeme https://localhost:8089/services/authentication/users/test_user -d force-change-pass=true

etc/passwd:
:test_user:$6$7d9TeVeVS./Z0ojt$jAlgxrZaaAAaAaAqY11Nr1uP0q4/utf1VXsL5sIrtj7CSPRAoikExiyL.SGAy/8bfsPK7/:::user:::force_change_pass

but on the command line there is no luck:
*splunk edit user test_user -force_change_pass true -auth admin:changeme *

In handler 'users': Argument "force_change_pass" is not supported by this handler.

bwooden
Splunk Employee
Splunk Employee

You can use Splunk's command line to do this by invoking an _internal call ...

$SPLUNK_HOME/bin/splunk _interncal call /authentication/users/test_user -post:force-change-pass "true"
0 Karma

somesoni2
SplunkTrust
SplunkTrust

Do like this

splunk edit user test_user -force-change-pass true -auth admin:changeme
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 ...