Samba服务器配置
1、通过Yum安装Samba
2、在Service中设置为自启动
3、在firewall中放开Samba需要的端口,编辑 /etc/sysconfig/iptables,在里面加入:
-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 -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
4、将seLinux关闭,修改/etc/selinux/config,将SELINUX= setenforce 改为 SELINUX = disabled
5、配置/etc/samba/smb.conf
workgroup = Workgroup server string = Samba Server Version %v netbios name = LCSambaSrv ; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24 hosts allow = 10. security = user passdb backend = tdbsam [km] browseable = no comment = private for km path = /data/ftp/km valid users = km public = no writable = yes printable = no guest ok = no create mask = 0775 directory mask = 0775
6、创建用户
useradd km -d /data/ftp/km -s /bin/false smbpasswd -a km
7、重新启动samba
/etc/init.d/smb restart
如何启动匿名账户:
(1)修改smb.conf
security = user map to guest = bad user #这个是添加的 #共享目录设置 [shareDoc] browseable = yes comment = share docs path = /data/shareDocs public = yes writable = yes write list = guest printable = no guest ok = yes create mask = 0755 directory mask = 0755
相关推荐
sapliang 2019-12-16
其实我是一演员 2007-05-15
maozishuai 2011-08-24
sapliang 2020-07-29
yshlovelx 2020-07-19
饮马天涯 2020-05-20
vanturman 2020-05-08
baishuwei 2020-02-25
ROES 2020-02-14
zhongzhiwei 2020-02-01
xcznb 2020-01-17
tianyayi 2020-01-09
kevinli 2019-12-15
wq0 2019-12-08
thlm0 2019-12-02
悠悠风信子 2013-08-23
kernelstudy 2014-03-07
秋风瑟瑟 2019-11-12
85096220 2008-06-04