centos的samba共享配置

配置实例ios

案例1、公司现有一个工做组workgroup,须要添加samba服务器做为文件服务器,并发布共享目录/share,共享名为public,此共享目录容许全部员工访问。windows

 

修改samba的主配置文件以下:服务器

#=======================Global Settings =====================================并发

 

[global]           //该设置与Samba服务总体运行环境有关,它的设置项目针对全部共享资源  ide

    

#----------------------- Network Related Options-------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostnameui

 

        workgroup = WORKGROUP    //定义工做组,也就是windows中的工做组概念url

 

        server string =David Samba Server Version %v  //定义Samba服务器的简要说明spa

 

        netbios name =DavidSamba                    //定义windows中显示出来的计算机名称日志

 

#--------------------------- Logging Options-----------------------------
#
# Log File let you specify where to put logs and how to split them up.server

 

      logfile = /var/log/samba/log.%m

 

         //定义Samba用户的日志文件,%m表明客户端主机名

 

        //Samba服务器会在指定的目录中为每一个登录主机创建不一样的日志文件

 

#----------------------- Standalone Server Options------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)

 

               security = share           //共享级别,用户不须要帐号和密码便可访问

 

#============================Share Definitions ==============================

 

[public]                          //设置针对的是共享目录个别的设置,只对当前的共享资源起做用

 

        comment = PublicStuff   //对共享目录的说明文件,本身能够定义说明信息

 

        path = /share                          //用来指定共享的目录,必选项

 

        public = yes                          //全部人可查看,等效于guestok = yes

 

 

建立共享目录

Croot@samba mkdir public Croot@samba Is

 

修改工做组

workgroup = WORKGROUP server string Samba Server Version

 

修改全部用户访问不须要帐号密码

# compatibility. tdbsam requires no further configuration. securi ty share passdb backend tdbsam

 

配置不用帐号密码登录的目录

C public] comment = public stuff path / opt/publ ic browseable yes publ ic yes

相关文章
相关标签/搜索