# workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4
# guest account = root 非常重要的一句话
workgroup = WORKGROUP
netbios name = 123
security = share
guest account = root
encrypt passwords = no
# server string is the equivalent of the NT Description field
server string = Samba Server
#客户端的IP地址
hosts allow = 192.168.1. 192.168.2.
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
load printers = yes
# this tells Samba to use a separate log file for each machine
# that connects
log file = /usr/local/samba/var/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Security mode. Most people will want user level security. See
# 非常关键的一句
security = share
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY
# interfaces = lo eth0 eth1 192.168.1.120/24 192.168.1.121/24
#smb服务器绑定的 网卡和IP地址 端口号
interfaces = lo eth0 192.168.1.120/24
# if you already have a Windows NT domain controller doing this job
domain master = yes
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
preferred master = yes
# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
domain logons = yes
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
wins support = yes
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /usr/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
[opt]
comment = Rj
path =/home/user
writable = yes
available = yes
public=yes
browseable = yes
# valid users = @users 此句话千万不能要
guest ok = yes