Samba快捷匿名访问设置

主要步骤有3:

1,开通需要开通的防火墙端口,tcp139,tcp455,udp137,udp138

vi /etc/sysconfig/iptables
增加(或确认存在)一下记录
#NetBIOS
-A INPUT -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT 
-A INPUT -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT 
#Samba
-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 445 -j ACCEPT

 

2,配置samba:

[root@lan ~]#yum -y install samba
[root@lan ~]#mkdir /home/share
[root@lan ~]#chmod 777 /home/share

[root@lan ~]#vi /etc/samba/smb.conf
# near line 58: add

unix charset = UTF-8

dos charset =GBK
# line 75: change (Windows' default)

workgroup =WORKGROUP
# line 81: uncomment and change IP address you allow

hosts allow = 127.10.0.0.
# line 102: change (no auth)

security =share
# add at the bottom

[Share]
# any name you like

   path = /home/share # shared directory
   writable = yes  # writable
   guest ok = yes # guest OK
   guest only = yes # guest only
   create mode = 0777 # fully accessed
   directory mode = 0777 # fully accessed
   share modes = yes # warn if some people access to a file

 

[root@lan ~]# /etc/rc.d/init.d/smb start
Starting SMB services:[  OK  ]
[root@lan ~]#/etc/rc.d/init.d/nmb start
Starting NMB services:[  OK  ]
[root@lan ~]#chkconfig smb on
[root@lan ~]#chkconfig nmb on

 

3, 如果是W7,W2008,还有一个地方需要单独修改:"从Vista开始,微软默认只采用NTLM v2协议的认证回应消息了,而目前的NAS系统和Samba还只支持LM或者NTLM",所以需要按照网上介绍的办法,见附图

 

参考链接:

http://396175583.blog.51cto.com/4074252/736431

http://www.server-world.info/en/note?os=CentOS_6&p=samba

http://wenku.baidu.com/view/1d2557c789eb172ded63b715.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值