1.安裝samba,若是在聯網環境下,可用yum安裝 或rpm安裝
yum install samba
chkconfig smb onlinux
2.修改配置:/etc/samba/smb.conf
[global]
workgroup = xinwei #工做組
server string = Samba Server Version %v #默認便可
netbios name = linux_141 # 對應主機名,啓動服務後可經過 \\linux_141 訪問
security = user # 使用模式,user便可
###################增長用戶模塊################
[zhaobo]
path = /home/zhaobo # 需修改
comment = zhaobo # 需修改
create mask = 0664
directory mask = 0775
writable = yes
valid users = zhaobo # 需修改
browseable = yesios
################################windows
#[shared]
# path = /home/samba
# writable = yes
# guest ok = yes
# browseable = yes
3.添加samba帳戶 smbpasswd -a zhaobo
4.啓動samba
/etc/init.d/smb start
(或重啓/etc/init.d/smb restart)
**重要**
若配置完後,windows仍提示沒有權限訪問,則須要把SELinux打開,兩種方法:
1./usr/sbin/setenforce 0
2.
vi /etc/selinux/config
SELINUX=disabled
rebootrest
這樣就能夠了。server