|
发表于 2011-3-17 23:07:17
|
显示全部楼层
照我说啊,如果是想学点东西,不妨每一个参数你都在man page看看,它的用途是什么。
我把你第4帖的配置拷贝到我实验室的机器上,testparm,有如下结果: testparm
Load smb config files from /etc/samba/smb.conf
Unknown parameter encountered: "unix charest"
Ignoring unknown parameter "unix charest"
Unknown parameter encountered: "dispaly charset"
Ignoring unknown parameter "dispaly charset"
Unknown parameter encountered: "passdb backed"
Ignoring unknown parameter "passdb backed"
Unknown parameter encountered: "socket opetion"
Ignoring unknown parameter "socket opetion"
Processing section "[homes]"
Processing section "[public]"
Processing section "[resource]"
Processing section "[printers]"
Processing section "[tmp]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions 这些基本上全部是笔误,单词拼错!! 而且由于这些错误,我上面说的注释问题还没机会显现出来。
修正这些错误之后,testparm可以通过,但这并不表示你配置文件就完全可以让服务正常运行。 比如那个注释的问题,将会导致 dos charset有无效值。
另外一个testparm没有找出来的配置错误:
passdb backend = tdsam
这里又是一次打字错误。没有tdsam这个backend,应该是tdbsam.
大概给你修正了下(其中有些配置有点矛盾,但暂时不管,你自己慢慢研究).这个可以正常使用:[global]
;//allow the client too change thir languages in Chinese (GB2312)
dos charset = GB2312
unix charset = GB2312
display charset = GB2312
netbios name = SAMBA-SERVER
server string = Samba Server Version %v at %h
passdb backend = tdbsam
username map = /etc/samb/smbusers
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
create mask = 0777
force create mode = 0777
force security mode = 0777
directory mask = 0777
force directory mode = 0777
force directory security mode = 0777
hosts allow = 127. , 192.168.1.
cups options = raw
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
name resolve order = lmhosts bcast host
[homes]
comment = Home directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No
[public]
comment = the user groups work directory
path = /home/public
valid users = @users
read only = No
guest ok = yes
[resource]
comment = local resource
path = /var/samba/resource
guest ok = yes
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[tmp]
comment = Temporary fiel space
path = /tmp
read only = No
guest ok = yes
要进步,就得多花点心思,理解。 而且,Linux系统下,日志文件是个好帮手,出了什么问题,先查查日志文件。
我猜这些配置是你看书,然后自己敲下来的,结果很多单词拼错,唉……。 |
|