홈서버/debian
[07]홈서버 윈도우와 파일공유 SAMBA 설치
oksoosoo
2020. 8. 1. 01:42
SAMBA는 공유폴더이다.
윈도우에 파일공유를 하면 나오는 공유폴더 서버를 리눅스에 설치할 수 있다.
같은 네트워크상의 윈도우와 네트워크상으로 파일공유가 가능하다.
사전준비
apt로 프로그램을 설치할때
update
upgrade
를 해주는게 좋다.
sudo apt-get update
sudo apt-get upgrade
samba 설치
sudo apt-get install samba
로컬 시스템 관리자에게 일반적인 지침을 받았으리라 믿습니다.
보통 세가지로 요약합니다:
#1) 타인의 사생활을 존중하십시오.
#2) 입력하기 전에 한 번 더 생각하십시오.
#3) 막강한 힘에는 상당한 책임이 뒤따릅니다.
[sudo] user의 암호:
DHCP서버에서 자동으로 정보를 가져온다고 하는데 필요 없을 거 같긴 한데 괜히 오류 나오면 스트레스니 설치해봤다.
삼바에서 사용할 유저를 추가해 준다.
sudo smbpasswd -a 사용자이름
[sudo] 사용자이름의 암호:
New SMB password:
Retype new SMB password:
삼바 설정파일을 수정해 준다.
sudo vi /etc/samba/smb.conf
:set nu 를 사용하면 앞에 줄 번호를 나타나게 할 수 있다.
1 #
2 # Sample configuration file for the Samba suite for Debian GNU/Linux.
3 #
4 #
5 # This is the main Samba configuration file. You should read the
6 # smb.conf(5) manual page in order to understand the options listed
7 # here. Samba has a huge number of configurable options most of which
8 # are not shown in this example
9 #
10 # Some options that are often worth tuning have been included as
11 # commented-out examples in this file.
12 # - When such options are commented with ";", the proposed setting
13 # differs from the default Samba behaviour
14 # - When commented with "#", the proposed setting is the default
15 # behaviour of Samba but the option is considered important
16 # enough to be mentioned here
17 #
18 # NOTE: Whenever you modify this file you should run the command
19 # "testparm" to check that you have not made any basic syntactic
20 # errors.
21
22 #======================= Global Settings =======================
23
#======================= Global Settings =======================
아래 부분이 설정부분 이다.
해당 블로그(https://m.blog.naver.com/PostView.nhn?blogId=colt357&logNo=221050724239&proxyReferer=https:%2F%2Fwww.google.com%2F) 에 자세하게 나와있다.
나는 내가 셋팅한 부분만 적었다.
[global]
workgroup 작업그룹이다.
윈도우의 작업그룹과 동일하게 맞춰줬다.
server string 컴퓨터 설명란이다.
debian-server라고 해줬다.
[home]
read only = no
create mask = 0664
directory mask = 0755
윈도우에서 접속을 시도하였다.
접속 성공
나는 사용자 이름을 user로 해서 user로 접속이 되었다.