pacman -Sy samba
cp /etc/samba/smb.conf.default /etc/samba/smb.conf
vim /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
map to guest = Bad User
lanman auth = yes
ntlm auth = yes
[ksdir]
comment = k's Service
path = /data/k
valid users = k
public = no
writable = yes
printable = no
[public]
path = /data/public
public = yes
only guest = yes
writable = yes
printable = no
# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
[myshare]
comment = M's and K's stuff
path = /data/shared
valid users = k m
public = no
writable = yes
printable = no
create mask = 0765
开启服务
systemctl start smbd nmbd
systemctl enable smbd nmbd
用户增加
# 系统用户k 添加samba密码
smbpasswd -a k
# 创建个samba用户m
groupadd sambashare
useradd –g sambashare –s /sbin/nologin m
smbpasswd -a m
shorewall
vim /etc/shorewall/rules
#ACTION SOURCE DEST PROTO DPORT SPORT
SMB(ACCEPT) $FW loc
SMB(ACCEPT) loc $FW