Admin Manual

 


Authentication

Users and Splunks

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.

Users and Splunks

Manage user accounts

Web interface

To create a user go to the Admin section, select the Users tab, and click New User. Fill in each of the fields with the appropriate value.


Splunk usernames are only available if you have a Splunk Professional license. Users have three different roles: User, Power and Admin.



Command line interface

# splunk add user -username John -full-name "John Doe" -password 123456 -role user -auth admin:changeme

# splunk remove user -username John -auth admin:changeme

# splunk export userdata -dir /tmp/userdata -auth admin:changeme

# splunk import userdata -dir /tmp/userdata/ -auth admin:changeme

Export / Import

To migrate user accounts across servers, you must also copy the file splunk.secret that contains authentication and authorization information. Depending on the version of Splunk Server, this file is located in one of these two files:


You must copy splunk.secret to the target servers as well as importing the user data.


The example below would transfer 2.0 user accounts from a server installed in /opt/splunk-2.0.15 to a 2.1 server installed in /opt/splunk-2.1:


# /opt/splunk-2.0.15/bin/splunk export userdata -dir /tmp/userdata -auth admin:changeme

# cp /opt/splunk-2.0.15/etc/splunk.secret /opt/splunk-2.1/etc/auth/splunk.secret

# /opt/splunk-2.1/bin/splunk import userdata -dir /tmp/userdata/ -auth admin:changeme

This process will be simplified in a future release.


Config files

User accounts are stored in a SQLite database. There's no easy way to import and export them via configuration files.


Manage Saved Splunks

Web interface

In the search box enter the desired search term(s) and have Splunk return results. Once you are satisifed with the results that returned:



Command line interface

# splunk add savedsplunk -name everything -terms "meta::all" -shared true -auth admin:changeme

# splunk edit savedsplunk -name everything -shared false -auth admin:changeme

# splunk remove savedsplunk -name everything -auth admin:changeme

Config files

$SPLUNK_HOME/etc/bundles/local/savedsplunks.conf

Saved Splunks are configured in the same format as data inputs and properties. Below is an example Saved Splunk called find-everything.


[find-everything]
	id = 10
	isglobal = 1
	query = <query><keys><key>meta::all</key></keys></query>
	name = find-everything
	userid = 1

This file can be copied to another bundles directory on another Splunk instances. However, if the Splunk was created by a user other than admin, that user account and corresponding user id need to exist on the target Splunk instance. Import the user data using the splunk import command documented above. Alternatively, you can change all of the user ids to 1, the userid of the admin account.

This documentation applies to the following versions of Splunk: 2.1 , 2.2 , 2.2.1 , 2.2.3 , 2.2.6 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.