samba服务器配置
yum install -y samba samba-client samba-swat
security = share
passdb backend = tdbsam
global设为share不用用户名就可以登陆了
下面的设置共享目录是哪里
[public]
comment = Public Stuff
path = /web/www
public = yes
writable = yes
printable = no
write list = +staff
windows 下面cmd \\192.168.1.115 (我的服务器ip )就出现了
service smb restart
yum
a. 修改samba的主配置文件如下:
#======================= Global Settings ===================================== [global] //该设置与Samba服务整体运行环境有关,它的设置项目针对所有共享资源 # ----------------------- 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 hostname workgroup = WORKGROUP //定义工作组,也就是windows中的工作组概念 server string = David Samba Server Version %v //定义Samba服务器的简要说明 netbios name = DavidSamba //定义windows中显示出来的计算机名称 # --------------------------- Logging Options ----------------------------- # # Log File let you specify where to put logs and how to split them up. log file = /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 = Public Stuff //对共享目录的说明文件,自己可以定义说明信息 path = /share //用来指定共享的目录,必选项 public = yes //所有人可查看,等效于guest ok = yes