FreeBSD配置samba(转)

FreeBSD配置samba(转)[@more@]

  虽然缺省情况已经适合大部分用户访问自己在服务器上的个人目录的要求,但是为了充分发挥samba提供的功能,与这些复杂多样的Windows网络相适应,就必须更改smb.conf的设置。以提供更多的共享设置、服务器设置,以及用于支持包括比较简单的共享方式和复杂的域认证方式在内的认证方式。

  smb.conf中的语法非常简单,整个配置文件分为多个不同的部分,每个部分具有一个标题。使用方括号将标题引起来,标题下包括一些相关设置,每一行都用于一个相关设置。设置文件中的每个部分或者定义了一个共享资源的名字,或者设置了一组参数。以下以缺省smb.conf为例,介绍smb.conf中的相关设置。

[global]设置 # 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 many any basic syntactic errors.

#

#======================= Global Settings =====================================

[global]

  [global]部分定义了服务器本身使用的配置参数,以及其他共享资源部分使用的缺省配置参数,因此相当重要。

# workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4

  workgroup = MYGROUP

  工作组设置本地网络使用工作组名字(或者是NT域名字),这对于将正确进行浏览数据中非常重要。否则,Windows客户就不能从其网络邻居中发现这个Samba服务器。

# server string is the equivalent of the NT Description field

  server string = Samba Server

  server string是对于本地服务器的简单描述,这些信息将作为这台服务器的属性,返回给Browser,显示在Windows客户中作为对这个服务器的描述。

# 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.

  hosts allow参数用于限制可以访问这台samba服务器的客户机的IP地址范围,通过指定一系列网络地址,使得只有这些网络中的计算机才能访问这台服务器提供的资源,以提供安全限制。缺省情况下,这行配置被注释了,使得所有的客户都可以访问这台计算机,这样就存在一定的安全问题。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10748419/viewspace-944639/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10748419/viewspace-944639/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值