centos7上配置Samba服務器完成與windows的文件共享
阿新 • • 發佈:2018-09-11
code user color -o 裏的 修改配置 分享 col roc 1:安裝samba服務
命令如下:
2:修改samba的配置文件一般在/etc/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 然後設置密碼:
重啟服務:
systemctl restart nmb
systemctl restart smb
ps -ef | grep nmb
5:關閉防火墻:
systemctl stop firewalld
systemctl status firewalld
setenforce 0
6:測試啟動
賬號密碼設置可用
具有讀寫權限
命令如下:
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
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的文件共享