centos7上配置Samba服务器完成与windows的文件共享
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:測試啟動
賬號密碼設置可用
具有讀寫權限
轉載于:https://blog.51cto.com/13956204/2173798
總結
以上是生活随笔為你收集整理的centos7上配置Samba服务器完成与windows的文件共享的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS3 有哪些新特性?
- 下一篇: JS的构造正则表达式怎么使用