728x90
NAS 를 이해하기 위해 실습.
- samba 접속용 계정, 비밀번호 생성
useradd –M –s /sbin/nologin smbuser
smbpasswd –a smbuser
- 계정 로그인 없이 접속
# vi /etc/samba/smb.conf
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[share]
comment = test-samba
path = /share
public = no
writable = yes
printable = no
write list = user1
create mask = 0777
directory mask = 0777
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
- Selinux 해제
# vi /etc/selinux/config
…
SELINUX=disabled
…
- 방화벽 예외 조건 등록
firewall-cmd –permanent –zone=public –add-service=samba
firewall-cmd --reload
- 서비스 등록, 재부팅
systemctl enable smb
systemctl start smb
reboot
728x90
'Dev > Linux' 카테고리의 다른 글
[Ansible] Module (0) | 2022.08.10 |
---|---|
[Linux] SSL 인증서 (0) | 2022.08.08 |
[Linux] sudo (0) | 2022.08.06 |
[Linux] Disk Mount (0) | 2022.08.05 |
[Linux] Network Bonding (0) | 2022.08.04 |
댓글