yum list|grep samba
如果不能运行的话, 看下网络是否开启,
service network status
还有其他的原因的话, 百度下 什么原因
需要安装 samba samba-client
yum -y install samba samba-client
自己爱好 是否设为开机启动
chkconfig smb on
需要开放几个端口
打开 /etc/sysconfig/iptables 加上下列 代码
-A INPUT -m state --state NEW -m tcp -p tcp --dport 137 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 138 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 901 -j ACCEPT
service iptables restart
selinux 的设置
setsebool -Psamba_enable_home_dirs on
setsebool -Psamba_export_all_rw on
getsebool -a | grep samba
以上是samba的外围设置
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
samba 的无账户登录
vim /etc/samba/smb.conf
security = user 改为 security = share |
|
samba 单个账户登录
useradd test001
smbpasswd -a test001
编辑 /etc/samba/smb.conf
security = user |
#命名文件路径
[pathName]
path= absolutePath
comment = comment
public = yes
writeable = yes
browseable = yes
vaild users = test001
service smb restart