1、服務器配置linux
安裝:yum install -y sambavim
更改要共享的path權限:chmod 777 /mnt/samba/服務器
先備份smb.conf配置文件:cp /etc/samba/smb.conf /etc/samba/smb.conf.bak網絡
更改配置:vim /etc/samba/smb.confip
security = shareci
load printers = noit
將[home]和[printer]部分註釋掉table
更改尾部的[public]以下class
[samba]test
comment= Public Stuff
path= /mnt/samba
public = yes
writable = yes
驗證設置:testparm
關閉防火牆:service iptables stop
啓動samba服務器:/etc/init.d/smb start
chkconfig smb on
SElinux部分設置:chcon -t samba_share_t /mnt/samba
2、Windows客戶端訪問
\\192.168.1.100,出現samba文件夾,可寫入刪除,映射爲網絡磁盤,OK
3、linux客戶端訪問及掛載
yum install -y samba-client
查看共享的目錄:smbclient -L 192.168.1.100
掛載使用:mount -t cifs //192.168.1.100/samba /mnt/share -o username=root