Getting Data In

What folder permission is need to monitor bash_history?

Feedy
New Member

I've been trying to capture bash_history logs but I am not seeing this log populate in Splunk. I am able to get top, who, netstat and several others but the only one that is missing is bash_history. I checked my inputs.conf file and it matches correctly to another instance. I've also restarted the splunkforwarder. The only thing left that I am thinking could be the issue is the folder permissions for ///root/.bash_history and ///home/.../.bash_history. If that is the issue, my question is what should the permissions be set to? Here is my stanza for bash_history.

### bash history
[monitor:///root/.bash_history]
disabled = 0
sourcetype = bash_history
index = home

[monitor:///home/.../.bash_history]
disabled = 0
sourcetype = bash_history
index = home
0 Karma

dwaddle
SplunkTrust
SplunkTrust

Might have a look at http://www.duanewaddle.com/splunking-bash-history/ for ideas. Some permissions problems and such may remain, but it's perhaps better?

0 Karma

Feedy
New Member

@somesoni2 how would I go about giving the Splunk user access to the ///home/.../.bash_history? The user:group shows as the current user that I'm logged in as. I am getting the logs from ///root/.bash_history? The user:group shows as root:root.

0 Karma

somesoni2
Revered Legend

You (the account under which Splunk service is running) needs to have read permission on the file/folder it's monitoring.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...