Reloading the auth system via CLI
| Topics: | CLI, dev, hacks, pcl, remote, tech |
|---|---|
| Tags: | admin, auth, CLI, pcl, splunk |
| Share: |
Note: Tina pointed out that this does not apply to the authorize.conf file. This will be fixed in an upcoming version of splunk.
This comes up every once in a while on the support channel (EFnet/#splunk), so I guess that means I should do a blog post on it.
If you’re making changes to the authentication.conf file and want to reload Splunk’s auth system without going through the web UI, you can use one of our internal functions to do it at the command line:
$ splunk _internal rpc-auth ‘<call name=”syncAuth”><params/></call>’
This fires off the same call that the UI would use to reload the auth system, so it functions identically. Note that this is an authenticated call, so you’ll need to use one of the standard authentication methods (-auth, splunk login, or the SPLUNK_USERNAME/SPLUNK_PASSWORD env vars…).

December 2nd, 2008 at 8:31 pm
well done, this rocks!
March 17th, 2009 at 10:54 am
workxs with -uri for remote reload hupping!
prompt$ splunk _internal rpc-auth ‘’ -uri https://remotesplunk:8089 -auth admin
(amrit had to spoonfeed this part, buuuhhh.)
June 10th, 2009 at 6:44 am
$ sudo ./splunk _internal rpc-auth ” -uri https://localhost:8089 -auth admin:changeme
$
What is the correct usage for this command?
Thanks,
Chris
June 11th, 2009 at 3:56 pm
Chris, it looks like the example Josh pasted in his comment failed to preserve xml. Your command should look more like that in the original post, along with the -uri parameter. Let me try here:
splunk _internal rpc-auth ‘<call name=”syncAuth”><params/></call>’ -uri https://localhost:8089 -auth admin:changeme
Again, the -uri is only necessary if you explicitly want to target a Splunk instance different from what your configs specify.
June 12th, 2009 at 3:46 am
Thank you for clarifying. This time it worked.
Chris
June 23rd, 2009 at 1:25 pm
Did anyone every experience that reloading the LDAP authentication using the CLI method has mixed results? Sometimes it returns all users for a distribution list, while other times it only returns one or two users…
June 23rd, 2009 at 1:59 pm
The call you’re making at the CLI is the exact same call that the UI makes when you hit Reload Authentication, so if you’re getting weird results, I’d point towards either some sort of configuration issue, or a backend bug.
August 6th, 2009 at 9:28 am
How can I do this in 4.0?
August 6th, 2009 at 9:31 am
it’s a little diff - look for a post coming up later today
August 20th, 2009 at 11:54 am
[...] will be a very brief post, to fulfill my obligations. I’ll share something a little more informative, perhaps even more interesting, in an [...]