centos7快速配置samba服务器
时间:2014-11-21 15:05 来源:linux.it.net.cn 作者:IT
1
yum
install
samba samba-client samba-swat
防火墙
1
2
3
4
-A INPUT -p tcp -m state --state NEW -m tcp --dport 139 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 138 -j ACCEPT
建账号
1
2
3
4
5
6
groupadd www
useradd
–g www www
passwd
www
mkdir
-p
/ftp/www/
chown
-R www:www
/ftp/www/
chmod
770
/ftp/www/
修改samba配置文件
mv -f /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
输入以下内容:
1
2
3
4
5
6
7
8
9
10
11
12
[global]
server string = Samba Server
security = user
encrypt passwords =
yes
smb
passwd
file
=
/etc/samba/smbpasswd
unix charset = cp936
[
ftp
]
workgroup =
ftp
netbios name =
ftp
path =
/ftp/www
browseable =
yes
writeable =
yes
(责任编辑:IT)
防火墙
建账号
修改samba配置文件 mv -f /etc/samba/smb.conf /etc/samba/smb.conf.bak vi /etc/samba/smb.conf 输入以下内容:
(责任编辑:IT) |