zl程序教程

您现在的位置是:首页 >  大数据

当前栏目

简单配置SMB

配置 简单 SMB
2023-09-27 14:27:54 时间
# See smb.conf.example for a more detailed config file or

# read the smb.conf manpage.

# Run testparm to verify the config is correct after

# you modified it.

 !--more-- 

[global]

 workgroup = SAMBA

 security = user

 passdb backend = tdbsam

 printing = cups

 printcap name = cups

 load printers = yes

 cups options = raw

[homes]

 comment = Home Directories

 valid users = %S, %D%w%S

 browseable = No

 read only = No

 inherit acls = Yes

[printers]

 comment = All Printers

 path = /var/tmp

 printable = Yes

 create mask = 0600

 browseable = No

[print$]

 comment = Printer Drivers

 path = /var/lib/samba/drivers

 write list = root

 create mask = 0664

 directory mask = 0775

[bucket-z]

 comment = bucket-z

 path = /infinityfs1/hivefiles/sobeyhive/bucket-z/

 valid users = mch

 create mask = 0777

 directory mask = 0777

 public = yes

 guest ok = no

 writable = yes

 browseable = yes

 available = yes

 read raw = yes

 write raw = yes

 strict locking = no

 fake oplocks = yes

 oplocks = no

 read size = 131072

 getwd cache = yes
安装CIFS以及SMB-CLIENT
yum install -y cifs-utils

yum install -y samba-client

创建SMB账户
useradd mch -s /sbin/nologin

smbpasswd -a mch

查看是否配置成功

smbclient -L localhost -U mch #本地IP接要查看的用


五个步骤理解smb和NFS 为了解决Linux和Windows之间更好的配合我们可以用vsftpd和tftp来实现两个系统互传文件,但是毕竟之是传文件有没有什么服务可以让linux和windows之间直接共享文件直接对文件进行增删改查呢?当然有它就是Samba!
SMB小传 —— SMB网络文件系统协议介绍 SMB网络文件系统协议, 全名服务器消息块(Server Message Block),曾用名CIFS(通用互联网文件系统 Common Internet File System), 公元1983年诞生于IBM[1],幼年得到英特尔和微软的照料,最终在微软的培养下成长为当今世上网络文件系统协议两极之一的存在。