13 Security Lab

[SETUP] Linux Server SMB SETUP example 본문

Computer Science/linux - wiki

[SETUP] Linux Server SMB SETUP example

Maj0r Tom 2016. 4. 4. 22:05

[ Add Acount to Linux for SMB ]

>> adduser smbUser


[ Add Account to SMB ]

>> smbpasswd -a smbUser


[ SMB Config. ]

>> vi /etc/samba/smb.conf

#==========================

# smbshared

[smbshared] ; Directory Name used in shared path

comment = smbshared

path = /home/sbmUser/smbshared ; directory path to share

read only = no

browsable = yes

public = yes

writable = yes ; Enable Write Authority

validuser = smbUser ; Access available accounts

create mask = 0777 ; Authority : ALL

directory mask = 0777

#==========================


[ Set SMB Service & Restart ]

>> systemctl enable smb

>> systemctl enable nmb

>> systemctl restart smb

>> systemctl restart nmb


[ Firewall configuration (Allow SMB) ]

>> firewall-cmd --permanent --zone=public --add-service=samba

>> firewall-cmd --reload

>> systemctl restart firewalld


[ Verification Config. ]

>> vi /etc/selinux/config

# SELINUX set disable

SELINUX = disabled

Comments