Getting Data In

Can one enable the universal forwarder under solaris 10 to read /var/log/authlog as user "splunk"?

cmonig
Explorer

Hi,

we want to deploy universal forwarders to solaris 10 machines.
For security reasons, we want to keep the number of applications running with root priviledges as low as possible, and would prefer to run the forwarder as the user "splunk".

We need to index the contents of the file "/var/log/authlog", which is only readable for "root":

-rw------- 1 root sys 34M Sep 14 08:42 authlog

We tried to add splunk to the group "sys", and make the file readable to the group, but this is not working as the process writing "authlog" resets the permission each time authlog is written to.

Is there a way to work around this, or is the only solution to run splunk with root priviledges?

Thanks,

Christoph

1 Solution

dwaddle
SplunkTrust
SplunkTrust

This really isn't a "Splunk" question so much as it is a Unix file systems permission one. Splunk is just any other process, required to follow the permission model as defined by the operation system. You have some options:

  1. Run Splunk as root (you've already said this is undesirable)
  2. Hack up a scripted input that can run setuid (also undesirable IMHO)
  3. See if Solaris will let you apply a POSIX ACL to the /var/log/authlog file, explicitly granting read privs to user splunk. The big trick here is whether it will be maintained over rotations and so on.

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

This really isn't a "Splunk" question so much as it is a Unix file systems permission one. Splunk is just any other process, required to follow the permission model as defined by the operation system. You have some options:

  1. Run Splunk as root (you've already said this is undesirable)
  2. Hack up a scripted input that can run setuid (also undesirable IMHO)
  3. See if Solaris will let you apply a POSIX ACL to the /var/log/authlog file, explicitly granting read privs to user splunk. The big trick here is whether it will be maintained over rotations and so on.
Get Updates on the Splunk Community!

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...