samba3 + clamav (Samba在线杀毒) 1.安装Samba 3 代码: # cd /usr/ports/net/samba3 # make install clean 安装完samba,请设置/usr/local/etc/smb.conf.并在/etc/rc.conf加入一句使Samba随系统一起启动. 代码: samba_enable="YES" 2.安装clamav 代码: # cd /usr/ports/security/clamav # make install clean 手动更新病毒库到默认路径 代码: # freshclam 在/etc/rc.conf加一句让Clamav随系统一起启动. 代码: clamav_clamd_enable="YES" clamav_freshclam_enable="YES" # 定时更新病毒库 3.安装samba-vscan 代码: # cd /usr/ports/security/samba-vscan # make install clean 在/usr/local/etc/smb.conf的[global]加入 代码: vfs object = vscan-clamav vscan-clamav: config-file = /usr/local/etc/samba-vscan/vscan-clamav.conf 附简单的smb.conf 代码: # Samba config file created using SWAT # from 127.0.0.1 (127.0.0.1) # Date: 2005/08/06 10:55:55 # Global parameters [global] dos charset = GB2312 unix charset = GB2312 display charset = GB2312 workgroup = SAMBA server string = Samba PDC running %v log level = 2 log file = /var/log/samba/log.%m max log size = 50 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192 local master = No dns proxy = No ldap ssl = no #hosts allow = 10.0., 127. vfs object = vscan-clamav vscan-clamav: config-file = /usr/local/etc/samba-vscan/vscan-clamav.conf [homes] comment = Home Directories valid users = %S write list = %S read only = No create mask = 0666 directory mask = 0777 browseable = No [profiles] path = /home/samba/profiles read only = No create mask = 0600 directory mask = 0700 browseable = No [netlogon] comment = Network Logon Service path = /home/netlogon write list = browseable = No |
|