关掉防火墙
service iptables stop
chkconfig iptables off (永久关闭防火墙)
关闭SELinux
vi /etc/sysconfig/selinux
把 SELINUX=enforcing 修改为SELINUX= disabled退出保存,并且重启
[root@bogon lee]# yum install samba smbfs smbclient
二 创建目录
[lee@bogon ~]$ mkdir share
[lee@bogon ~]$ chmod 777 /home/lee/share/
三 修改samba配置文件
[root@bogon lee]# cp /etc/samba/smb.conf smb_backup.conf
[root@bogon lee]# vi /etc/samba/smb.conf
将下面部分加入到smb.conf 末尾
[share]
path = /shareavailable = yesbrowseable = yespublic = yeswritable = yes
四 创建samba账户
[root@bogon lee]# touch /etc/samba/smbpasswd
[root@bogon lee]# smbpasswd -a lee
如果还不能访问,尝试修改/etc/samba/smb.conf
# ----------------------- Standalone Server Options ------------------------
# Scurity can be set to user, share(deprecated) or server(deprecated)
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
security = user
==> security = share
其他细节参考:
http://www.cnblogs.com/mchina/archive/2012/12/18/2816717.html