server = 192.168.8.1 #......................................................# # WINS代理-告知Samba回应那些没有WINS能力的客户的名字解析的请求, # 这个情况只有在网络中至少有一台WINS服务器时才有效。 # 缺省是不。 ; wins proxy = yes #......................................................# # DNS代理-告知Samba是否解析NetBIOS名字 # 版本1.9.17 内建的缺省是“是”, 从版本1.9.18 变成了“否” # 这里我们可以告知SAMBA名字解析使用DNS或者不。 # dns proxy = yes # dns proxy = no (name resolution will be made by using the file lmhosts ) #......................................................# # 如果登陆的驱动盘没有被指定,Z:单元会自动登陆的。 logon drive = P: #......................................................# # 当一个登陆出现时,这个脚本被执行: /etc/samba/netlogon/SAMBA.BAT # 并且使用"netuse"来登陆磁盘单元 logon script = SAMBA.BAT
#====================== Share Definitions ========================#
# 每个用户的私人目录 # 单位 P:
[homes] comment = Home Directories browseable = no writable = yes readonly = no force create mode = 0700 create mode = 0700 force directory mode = 0700 directory mode = 700
#------------------------------------------------------# # 临时文件目录 # 单位 T:
[tmp] comment = Tempora Files path = /tmp readonly = no public = yes writable = yes force create mode = 0777 create mode = 0777 force directory mode = 0777 directory mode = 0777
#------------------------------------------------------# # 服务器的CD-ROM # 单位 L:
[cdrom] comment = CD-ROM path = /mnt/cdrom public = yes writable = no
#------------------------------------------------------# # 组,根据/home/grp.name_group来的 # /home/user/group 是 /home/grp.name_group一个链接 # grp.name_group 使用权限770 # 单位 G:
[group] comment = Directory of Group path = /home/%u/group writable = yes readonly = no force create mode = 0770 create mode = 0770 force directory mode = 0770 directory mode = 0770
#------------------------------------------------------# # 这个单元存放应用软件,安装软件,专用软件等。 # /net 和 /net/install的权限是 755, 比如这里, root是它的拥有者 # 单位 N:
[net] comment = Directory Net path = /net writable = yes readonly = no force create mode = 0750 create mode = 0750 force directory mode = 0750 directory mode = 0750
#------------------------------------------------------# [netlogon] comment = Logon Services in the Network path = /etc/samba/netlogon guest ok = yes writable = no locking = no public = no browseable = yes share modes = no
#------------------------------------------------------# #============================================================#
最后的考虑 SAMBA包和其他的一些在Linux上使用的工具在不断的发展中,因此 有可能这里讲的一些细节会失去效用。实际上在SAMBA的发展中一些参 数名字在配置文件中变化很小,并且保持了更优化的结构。
如果你在SAMBA配置中发现一些未知参数的错误信息,你可能有2个 简单的办法解决它:
阅读缺省的smb.conf文件,里面相同的行一般会有注释,可以提供 一些“可能产生问题的参数”的信息。 阅读SAMBA文档, 从描述最近一次的版本变化的文件开始。
参考:书目和软件工具 SAMBA,官方网址: http://www.samba.org Webmin,官方网址: http://www.webmin.com a remote administration tool for computers running UNIX systems. GNU 项目 和自由软件基金会:http://www.gnu.org 一个有意思的网址,那里可以得到RPM包: href=http://www.rpmfind.net LinNeighborhood 网址: href=http://www.bnro.de/~schmidjo, 一个有意思的Linux工具,使用它可以通过“SAMBA网络”共享资源。
来源:Linuxfocus
上一页 [1] [2] |