1. 程式人生 > >centos7上配置Samba服務器完成與windows的文件共享

centos7上配置Samba服務器完成與windows的文件共享

code user color -o 裏的 修改配置 分享 col roc

1:安裝samba服務
命令如下:yum -y install samba samba-client samba-common
技術分享圖片
2:修改samba的配置文件一般在/etc/samba/
cd /etc/samba/
備份一下配置文件 cp smb.conf smb_back,conf(必須在samba目錄下)
技術分享圖片
3:修改配置文件:
[root@localhost samba]#vi 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

技術分享圖片
4:創建共享目錄文件:
這裏的文件名是wufei

然後設置密碼:
重啟服務:
systemctl restart nmb
systemctl restart smb
ps -ef | grep nmb
技術分享圖片
5:關閉防火墻:
systemctl stop firewalld
systemctl status firewalld
setenforce 0
6:測試啟動
賬號密碼設置可用
技術分享圖片
具有讀寫權限
技術分享圖片

centos7上配置Samba服務器完成與windows的文件共享