Linux 服务器之smb的配置

# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
#设置工作组的名称,该名称会出现在windows的网上邻居和linux的网络服务器
 workgroup = office-115

# server string is the equivalent of the NT Description field
#服务器名称说明
 server string = factory

# 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
#(限制可以访问samba服务器的IP范围,默认的是允许所有的ip访问,如果设置那么设置好之后去掉全面的";"如果项目超过一个就必须用空格和逗号隔开)
;   hosts allow = 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
 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, cups
#打印机类型
 printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  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

# Put a capping on the size of the log files (in Kb).
#定义李log文件的大小,默认的是不对日志文件大小限制对
 max log size = 0
 
 
#======================= 安全级别设置 =====================================
# Security mode. Most people will want user level security. See
# security_level.txt for details.

# Use password server option only with security = server
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
;   password server = <NT-Server-Name>
#密码验证服务器,当用户从windows通过samba使用Linux,会制动传送登陆windows时的用户名和密码给samba,然后samba向password server验证这两项信息是否正确,windowsNT和windows2000都是这样的,windows98只要求输入密码,因此建议windows98用户能用和linux账号相同的名称来登陆,若security=server,则需要指定密码服务器,若security=share,则需要删除关于密码服务器的那一行

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wypsjw.html