samba配置文件
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Samba配置的要点
Samba文件存储在/etc/samba/smb.conf文件中,smb.conf文件被分为几个段,每个段是一个共享资源的描述,并有适当的名称。有三个特殊的段,global,homes,printers
#======================= Global Settings ===================================== [global] 建立全局配置设置,详细定义在/usr/share/doc/samba/docs目录下的smb.conf手册页和Samba文档中
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = MYGROUP 工作组设置
# server string is the equivalent of the NT Description field 描述了将会出现在windows NT #网上邻居上中
server string = Samba Server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.允许192.168.1的网段和192.168.2的网段以及回#环地址127可以连接计算机
#以上描述了局域网中允许连接的计算机
# if you want to automatically load your printer list rather
# 如果你想自动载入一个打印机的清单
# than setting them up individually then you'll need this
# 这样就不必一个一个手动录入,可以使用
printcap name = /etc/printcap 覆盖printcap的路径
load printers = yes 自动载入清单
# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
; printing = cups
#关于打印机自动地从SystemV中的spool系统中取得打印机列表。
# This option tells cups that the data has already been rasterized
cups options = raw
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used 如果要启用guest用户就不要将下面的这行注释掉,并#且要将用户加入到/etc/passwd中
; guest account = pcguest
# this tells Samba to use a separate log file for each machine
# that connects
#下面这条告诉我们每台计算机都有一个不同的log文件,通过这个文件和SAMBA服务器相连。
log file = /var/log/samba/%m.log
# all log information in one file 所有的log文件都放在这里
# log file = /var/log/samba/smbd.log
# Put a capping on the size of the log files (in Kb).设置log文件长度的限制(单位Kb)。
max log size = 50
# Security mode. Most people will want user level security. See
#阅读security_level.txt for得到更多的细节
# security_level.txt for details.
security = user 指定验证密码的方式
# Use password server option only with security = server
# 认证服务器的地址(是否与域用户有关系,有待研究)
; password server =
# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.(估计是密码和用户级别的设定)
; password level = 8
; username level = 8
# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
#如果你想使用加密的密码,请阅读Samba文档中的ENCRYPTION.TXT
#============================ Share Definitions ============================== idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /bin/false
winbind use default domain = no
[homes] 共享用户的主目录和指定的目录路径和权限
comment = Home Directories
browseable = no
writable = yes
# Un-comment the following and create the netlogon directory for Domain Logons ; [netlogon]
; comment = Network Logon Service
; path = /home/netlogon
; guest ok = yes
; writable = no
; share modes = no
# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /home/profiles
; browseable = no
; guest ok = 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 = /var/spool/samba
browseable = no