smb协议只能在同一网段吗_跨网段samba访问

使用‘两级’samb实现文件访问。

Pc-----------samba----------->218.205.81.12----------samba---------->10.3.1.193(src,编译环境)

1.在编译主机(10.3.1.193)上安装samba

以root角色登入编译主机

ssh root@10.3.1.193

1)安装samb

service iptables stop // 关闭防火墙:

setenforce 0 //关闭SELINUX的强制模式

yum install samba samba-client samba-swat //安装samb

cd /etc/samba

2)配置共享路径

Cp smb.conf smb.conf.bak //备份

Vi /etc/samba/smb.conf

用shift+g定位到最后一行:

# A publicly accessible directory, but read only, except for people in

# the "staff" group

[public]

comment = Public Stuff

path = /home/samba

writable = yes

printable = no

write list = +staff

修改如下

# A publicly accessible directory, but read only, except for people in

# the "staff" group</

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值