98c9 Separate Samba Log from Syslog - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Server & Networking > Web & Network Services

Web & Network Services Discussion related to network/web services such as apache, bind, sendmail, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old August 9th, 2012, 13:36
dkovacevic dkovacevic is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 8
Thanked 0 Times in 0 Posts
Default Separate Samba Log from Syslog

I have a samba share configured to allow logging of file access:

Code:
[home]
   comment = Home Directory
   path=/home/%u
   vfs objects = full_audit
   full_audit:prefix = %u|%I|%m|%s
   full_audit:success = open opendir read pwrite unlink rmdir pread write sendfile ftruncate
   full_audit:failure = connect disconnect open close read pread write prwite sendfile ftruncate lock readlink
   full_audit:facility = LOCAL7
   full_audit:priority = ALERT

...
I added this line to /etc/newsyslog.conf:

Code:
/var/log/samba/audit.log                640  50    100  *     JC
Lastly, I added this line to /etc/syslog.conf:

Code:
local7.*                                        /var/log/samba/audit.log
Samba has this line in the global section:

Code:
syslog = 0
My problem is that the log data that I am expecting to see in the samba log file is also being sent to syslog. I would very much prefer to keep these separate, as the samba log fills up swiftly and other relevant messages in the syslog won't be as noticeable.

How can these be separated?
Reply With Quote
  #2  
Old August 9th, 2012, 18:37
dkovacevic dkovacevic is offline
Junior Member
 
Join Date: Dec 2010
Posts: 23
Thanks: 8
Thanked 0 Times in 0 Posts
Default

Figured this out:

In /etc/syslog.conf, found this line:

Code:
*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err    /var/log/messages
and added:

Code:
*.notice;LOCAL7,authpriv.none;kern.debug;lpr.info;mail.crit;news.err    /var/log/messages
Also changed the

Code:
local7.*                                        /var/log/samba/audit.log
to

Code:
LOCAL7.ALERT                                    /var/log/samba/audit.log
so that /var/log/messages is no longer being spammed by samba file log material.

Don't know whether CAPS is relevant or not.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running wine on separate X server hedgehog X.Org 3 October 2nd, 2012 21:48
separate drive, UFS2 vs ZFS grigorovl Storage 3 December 14th, 2011 20:30
Do you still use separate /, /tmp, /var partitions on FreeBSD 9 overmind Installing & Upgrading 2 November 23rd, 2011 13:03
How to install GRUB to separate slice? palladin Installing & Upgrading 1 September 23rd, 2010 16:25
Install FreeBSD 7.2 into a separate location KernelPanic Installing & Upgrading 2 January 5th, 2010 18:38


All times are GMT +1. The time now is 12:20.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0