Инструменты пользователя

Инструменты сайта


linux:samba:audit
Warning: Undefined array key -1 in /home/virtwww/w_linko22-ru_c0d3353b/http/inc/html.php on line 1458

Различия

Показаны различия между двумя версиями страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
linux:samba:audit [2012/02/17 11:32]
linko22@gmail.com
linux:samba:audit [2012/02/17 11:34] (текущий)
linko22@gmail.com
Строка 82: Строка 82:
 Add these lines: Add these lines:
  
 +<code>
 filter f_local5 {facility(local5);}; filter f_local5 {facility(local5);};
 destination m_samba_audit { file("/var/log/samba/audit.log"); }; destination m_samba_audit { file("/var/log/samba/audit.log"); };
 log { source(src); filter(f_local5);destination(m_samba_audit); flags(final); }; log { source(src); filter(f_local5);destination(m_samba_audit); flags(final); };
 +</code>
 BEFORE line BEFORE line
  
 +<code>
 log { source(src); destination(messages); }; log { source(src); destination(messages); };
- +</code> 
-This will tell syslog-ng to filter only LOCAL5 message and write them to +This will tell syslog-ng to filter only LOCAL5 message and write them to **/var/log/samba/audit.log** and skip this audit records from being recorded in **/var/log/messages**
- +
-/var/log/samba/audit.log +
-and skip this audit records from being recorded in /var/log/messages+
  
 Configuring  syslogd Configuring  syslogd
Строка 98: Строка 98:
 In standard configuration of syslogd there is a line in file syslog.conf : In standard configuration of syslogd there is a line in file syslog.conf :
  
 +<code>
 *.*;auth,authpriv.none           -/var/log/syslog *.*;auth,authpriv.none           -/var/log/syslog
 +</code>
 To filter audit messages away from main syslog file, change this line to: To filter audit messages away from main syslog file, change this line to:
  
 +<code>
 *.*;local5,auth,authpriv.none           -/var/log/syslog *.*;local5,auth,authpriv.none           -/var/log/syslog
-Add following line after+</code>
  
 +Add following line after 
 +<code>
 local5.notice /var/log/samba/audit.log local5.notice /var/log/samba/audit.log
 +</code>
  
 Restaring Restaring
Строка 110: Строка 116:
 Restart samba Restart samba
  
-# /etc/init.d/samba restart+  # /etc/init.d/samba restart
 and syslog, ususally this is done via this command and syslog, ususally this is done via this command
  
-# /etc/init.d/syslogd restart+  # /etc/init.d/syslogd restart
 However in your distro may be different way. However in your distro may be different way.
  
Строка 125: Строка 131:
 Create new file /etc/logrotate.d/samba.audit Create new file /etc/logrotate.d/samba.audit
  
 +<code>
 /var/log/samba/audit.log { /var/log/samba/audit.log {
    weekly    weekly
Строка 135: Строка 142:
    notifempty    notifempty
 } }
 +</code>
 References References
  
-http://www.opennet.ru/base/net/samba_full_audit.txt.html +[[http://www.opennet.ru/base/net/samba_full_audit.txt.html]] 
-The syslog-ng 3.0 Administrator Guide+ 
 +[[http://www.balabit.com/dl/html/syslog-ng-v3.0-guide-admin-en.html/bk01-toc.html|The syslog-ng 3.0 Administrator Guide]]
linux/samba/audit.1329463965.txt.gz · Последнее изменение: 2012/02/17 11:32 — linko22@gmail.com