1安装服务
#yum -y install samba samba-client samba-common
查看
#rpm –qa | grep samba
修改配置文件
先备份
#cp smb.conf smb back,conf
#vi /etc/samba/smb.conf
** [global]
workgroup = MYGROUP
server string = Samba Server Version %v
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
[homes]
comment = Home Directories
browseable = no
writable = yes
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
guest ok = no
writable = no
printable = yes
[myshare]
comment = myshare
path = /
writable = yes
添加用户
添加samba用户,samba用户必须为linux用户
#useradd li
#cat /etc/passwd
设置密码确认
重启服务
#systemctl restart nmb
#systemctl restart smb
记住关闭两端防火墙
查看即可