[global]
# 控制连接数量,超过之后新连接将被拒绝
max connections = 0
workgroup = MYGROUP
server string = Samba Server Version %v
; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.
# logs split per machine
log file = /var/log/samba/log.%m
# max 50KB per log file, then rotate
max log size = 50
security = user
passdb backend = tdbsam
guest ok = no
load printers = no
cups options = raw
#用来设置服务器和客户端之间会话的Socket选项,可以优化传输速度。(实测不加这个还更快一些。。。)
; socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072
; socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
# Some other performace tuning options
# disable links and symbol links
follow symlinks = no
wide links = no
# enable some read/write tuning
use sendfile = yes
read raw = yes
write raw = yes
aio read size = 16384
aio write size = 16384
write cache size = 262144
max xmit = 65536
large readwrite = yes
getwd cache = yes
# disable locking, because only 2 share can be written.
strict locking = no
fake oplocks = yes
oplocks = no
[homes]
comment = Home Directories
path = /home/dev
# 是否显示目录
browseable = no
writable = yes
; read only = yes
create mode = 0664
directory mode = 0775
guest ok = no
; valid users = %S
; valid users = MYDOMAIN\%S
[www]
comment = HTTP
path = /home/wwwroot
hosts allow = 127.
guest ok = no
browseable = no
read only = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
; [netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no
; [Profiles]
; path = /var/lib/samba/profiles
; browseable = no
; guest ok = yes
; [public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = +staff
|