1. samba配置项
通过当前所使用系统查看samba的global全部配置项(" testparm -v ",部分项有简单说明)如下:--------------------------------------------------------------------------------------------------------------------------------
[global]
dos charset = CP850
unix charset = UTF-8
display charset = LOCALE
workgroup = WORKGROUP #设置工作组名称
realm =
netbios name = UBUNTU
netbios aliases =
netbios scope =
server string = %h server (Samba, Ubuntu) #设置SAMBA服务器名称
interfaces =
bind interfaces only = No
security = USER #用于登陆域,或用户验证登陆
auth methods =
encrypt passwords = Yes #设置用户密码加密
client schannel = Auto
server schannel = Auto
allow trusted domains = Yes
map to guest = Bad User
null passwords = No #是否允许空密码
obey pam restrictions = Yes
password server = *
smb passwd file = /etc/samba/smbpasswd #设置口令文件的路径
private dir = /etc/samba
passdb backend = tdbsam
algorithmic rid base = 1000
root directory =
guest account = nobody
enable privileges = Yes
pam password change = Yes #是否为samba打开pam改变密码控制机制的支持
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd chat debug = No
passwd chat timeout = 2
check password script =
username map =
password level = 0 #在win9x下密码最多出现大写字母的个数,因为9x是使用平文传送密码的
username level = 0
unix password sync = Yes
restrict anonymous = 0
lanman auth = No
ntlm auth = Yes
client NTLMv2 auth = Yes
client lanman auth = No
client plaintext auth = No
client use spnego principal = No
send spnego principal = No
preload modules =
dedicated keytab file =
kerberos method = default
map untrusted to domain = No
log level = 2 #日志级别 0 表示没有,3 一般比较合理
syslog = 0 #syslog的日志级(0,err)(1,warning)
syslog only = No #是否只使用系统日志而关闭samba日志
log file = /var/log/samba/log.%m #日志文件
max log size = 1000 #日志文件的大小
debug timestamp = Yes
debug prefix timestamp = No
debug hires timestamp = Yes
debug pid = No
debug uid = No
debug class = No
enable core files = Yes
smb ports = 445 139
large readwrite = Yes #使能一次读写128K,否则64K
max protocol = NT1
min protocol = CORE
min receivefile size = 0
read raw = Yes
write raw = Yes
disable netbios = No
reset on zero vc = No
log writeable files on exit = No
acl compatibility = auto
defer sharing violations = Yes
nt pipe support = Yes
nt status support = Yes
announce version = 4.9
announce as = NT
max mux = 50
max xmit = 16644
name resolve order = lmhosts wins host bcast
max ttl = 259200
max wins ttl = 518400
min wins ttl = 21600
time server = No
unix exte