์ƒˆ์†Œ์‹

์ธ๊ธฐ ๊ฒ€์ƒ‰์–ด

๐Ÿ’ป Linux

CentOS7 Samba Ubuntu Window

  • -
๋ฐ˜์‘ํ˜•
# Ubuntu ๊ณต์œ  ํด๋” : lsamba ํ•˜๋“œ๋””์Šคํฌ ์ถ”๊ฐ€ /dev/sdb1 /data/lsamba
# window ๊ณต์œ  ํด๋” : wsamba1

# window ๊ณต์œ  ํด๋” ์„ค์ •
D ๋“œ๋ผ์ด๋ธŒ > wsamba1 ํด๋” ์ƒ์„ฑ > wsamba1 ์†์„ฑ : ๊ณต์œ  > ๊ณต์œ  > everyone์ถ”๊ฐ€ , ์‚ฌ์šฉ ๊ถŒํ•œ ์ฝ๊ธฐ์“ฐ๊ธฐ
net user root 1234 /add # ์ด๊ฑฐ๋Š” ๋ช…๋ น์–ด ์ƒ๋žต ๊ฐ€๋Šฅ , ๊ธฐ์กด์— ์žˆ๋˜ ์œ ์ € ์‚ฌ์šฉ
\\\\192.168.0.40 # window์—์„œ ๊ณต์œ  ํด๋” ํ™•์ธ

# Ubuntu ๊ณต์œ  ํด๋” ์„ค์ •
apt-get install update
apt-get install samba-client
apt-get install samba
apt-get install cifs-utils
service smbd restart
ufw allow samba

vim /etc/samba/smb.conf
	> guest ok = yes # ๊ฒŒ์ŠคํŠธ ์ ‘๊ทผ yes๋กœ ๋ณ€๊ฒฝ

smbclient -L 192.168.0.40 # window Ip๋กœ ๊ณต์œ ํด๋” ํ™•์ธ

sudo fdisk -l # ํ•˜๋“œ ๋””์Šคํฌ ๋งˆ์šดํŠธ ํ™•์ธ
sudo fdisk /dev/sdb # ํŒŒํ‹ฐ์…˜ ์ƒ์„ฑ
mkfs.ext4 /dev/sdb1 # ํฌ๋งทํŒ…
mkdir data
cd /data
mkdir lsamba # ๋งˆ์šดํŠธ ํ•  /data/lsamba ํด๋” ์ƒ์„ฑ
mount /dev/sdb1 /data/lsamba # sdb1 ํŒŒ์ผ์„ lsamba ํŒŒ์ผ์— ๋งˆ์šดํŠธ
df -h # ๋งˆ์šดํŠธ ํ™•์ธ
mount -t cifs //192.168.0.40/wsamba1 /data/lsamba # ์œˆ๋„์šฐ์— ๋งˆ์šดํŠธ
๋ฐ˜์‘ํ˜•
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.