Deployment Architecture

Removing users from a Search Head

sgarvin55
Splunk Employee
Splunk Employee

I was looking for the proper way to remove a user(s) from a Search Head. I know that just deleting the directory is not sufficient and may cause errors when you restart Splunk. Especially, if the user had saved or scheduled searches.

Here's a typical error being reported after a user was moved to user.OLD.

ERROR: pid 6750542 terminated with signal 6
Validating databases (splunkd validatedb) failed with code '-1'.

When the user.old was moved back to "user", the error disappeared.

Tags (1)
0 Karma

rafamss
Contributor

Hi sgarvin55,

I did the follow and this solved my problem.

./splunk remove user [nameuser] -auth user:pass

For improve this, I put a little trick, inserting a "|" after each command. With this, I can delete all users that needs upon a time.

./splunk remove user [user1] |
./splunk remove user [user2] |

All this commands was executed in CLI.

sgarvin55
Splunk Employee
Splunk Employee

By using the ./splunk remove user username command as you suggested will only remove the user account to login to the GUI. If you go to $SPLUNK_HOME/etc/users the accounts directory still exists.
What I found out is that LDAP is part of the equation and why it was getting a database error. The user will have to be removed from Active Directory first. Then move the users directory to .BAK. Splunk is trying to authenticate the user against LDAP and the directory didn't exist.

rroberts
Splunk Employee
Splunk Employee

Why not just use the CLI:

splunk remove user

See:

splunk help remove
Also check out:

http://docs.splunk.com/Documentation/Splunk/4.2.5/Admin/Setupbuilt-inauthentication

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...