관련글)
관련글 후속으로 진행한다.
❚ Samba를 패키지로 설치한다.
service ipfw stop
pkg update
pkg search samba
pkg install samba413 또는 pkg install samba416
sysrc samba_server_enable=YES
sysrc samba_server_enable
❚ 공유 그룹, 공유 디렉터리 만들기
pw groupadd -n share
mkdir /data/share
chown :share /data/share
chmod 770 /data/share
❚ Samba 설정 및 시작
ee /usr/local/etc/smb4.conf
[global]
workgroup = WORKGROUP
netbios name = fileServer
server string = Samba %v
server min protocol = SMB2
client min protocol = SMB2
security = user
encrypt passwords = Yes
passdb backend = smbpasswd
guest ok = No
socket options = TCP_NODELAY IPTOS_LOWDELAY IPTOS_THROUGHPUT SO_KEEPALIVE SO_RCVBUF=65536 SO_SNDBUF=65536
aio read size = 16384
aio write size = 16384
strict locking = No
strict sync = No
log level = 3
log file = /var/log/samba4/log.%m
max log size = 0
unix charset = UTF-8
dos charset = CP949
hide files = /Thumbs.db/._*/.DS_Store/:2eDS_Store/desktop.ini/DESKTOP.INI/*.tmp/:2eTemporaryItems/.TemporaryItems/Temporary Items/Network Trash Folder/TheFindByContentFolder/TheVolumeSettingsFolder/.VolumeIcon.icns/Icon?/.FBCIndex/.FBCLockFolder/.AppleDB/.AppleDesktop/.AppleDouble/
hide dot files = Yes
veto files = /lost+found/
delete veto files = Yes
local master = No
dns proxy = No
wins support = Yes
idmap config * : backend = tdb
map archive = No
unix extensions = No
store dos attributes = Yes
map acl inherit = Yes
nt acl support = Yes
inherit acls = No
inherit owner = No
directory mask = 0770
create mask = 0660
posix locking = Yes
load printers = No
disable spoolss = Yes
show add printer wizard = No
vfs objects = full_audit
full_audit:prefix = %u|%I
full_audit:success = unlinkat
[share]
comment = share
path = /data/share
read list = @share
write list = @share
read only = No
testparm
service samba_server start
❚ 시스템 계정(사용자) 추가
adduser
❚ Samba 계정 추가
pdbedit
❚ 방화벽 설정
ee /etc/ipfw.rules
add allow tcp from any to any 139,445 setup keep-state
add allow udp from any to any 137,138 keep-state
add allow tcp from any to me 36922 setup keep-state
add deny all from any to any
위에 두 줄을 추가하고 저장한다.
service ipfw start
반응형
'구축' 카테고리의 다른 글
NFS 설정 - FreeBSD (0) | 2023.07.28 |
---|---|
FTPs 설치 - Windows, IIS (0) | 2023.07.27 |
RTMP NGINX 라이브 스트리밍 서버 - FreeBSD (0) | 2023.07.20 |
WebDAV 설치 (0) | 2023.06.07 |
네트워크 공유 폴더 만들기 (0) | 2023.06.02 |