문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
linux:ubuntu:samba [2022/04/11 19:12] kwon37xi |
linux:ubuntu:samba [2022/07/21 22:49] (현재) kwon37xi [Windows 10 Share 에 접속하지 못하는 현상] |
||
---|---|---|---|
줄 58: | 줄 58: | ||
===== mouting smbfs ===== | ===== mouting smbfs ===== | ||
- | * [[http://ubuntuforums.org/ | + | * [[https://support.zadarastorage.com/ |
+ | * [[https:// | ||
- | * 기초 작업< | + | * 기초 작업 |
+ | <code sh> | ||
# 패키지 설치 | # 패키지 설치 | ||
- | sudo apt-get install | + | sudo apt-get install |
- | # 계정정보와 비밀번호를 파일로 저장한다. | ||
- | cd | + | sudo mkdir /mnt/share |
- | echo username=mywindowsusername > .smbpasswd | + | |
- | echo password=mywindowspassword >> .smbpasswd | + | |
- | chmod 600 .smbpasswd | + | |
</ | </ | ||
- | * '' | + | * credential 파일 생성및 권한 부여: |
- | # root user only write/all read | + | < |
- | // | + | username=example_username |
- | + | password=example_password | |
- | # root user and specific user write/all read | + | |
- | # uid와 gid를 명시해줘야 한다. | + | |
- | // | + | |
- | + | ||
- | # 혹은 쓰기 권한을 줄 사용자를 특정 그룹에 지정하고, | + | |
- | // | + | |
</ | </ | ||
- | | + | <code sh> |
- | # smbmount 명령 사용하기 | + | sudo chmod 400 / |
- | smbmount | + | </ |
+ | | ||
+ | <code sh> | ||
+ | sudo mount -t cifs -o rw, | ||
+ | //< | ||
+ | </ | ||
+ | * ''/ | ||
+ | <code sh> | ||
+ | //<share-pc-ip>/< | ||
- | # smbmount 명령은 uid, | + | # username/ |
- | # mount 명령으로 uid,gid 지정 및 파일/디렉토리 모드 지정가능. 아래 예제는 Ubuntu에서 admin gid만 지정하고 읽기/쓰기 모두 가능하게 지정 | + | //<share-pc-ip>/< |
- | mount -t smbfs -o credentials=/home/myhomedirectory/.smbpasswd,gid=admin,file_mode=0660, | + | |
</ | </ | ||
===== smbclient ===== | ===== smbclient ===== | ||
+ | ==== 일반접속 ==== | ||
+ | <code sh> | ||
+ | smbclient //< | ||
+ | # %" | ||
+ | </ | ||
+ | |||
==== 공유 폴더 목록보기 ==== | ==== 공유 폴더 목록보기 ==== | ||
<code sh> | <code sh> | ||
줄 98: | 줄 103: | ||
==== anonymous 접속 ==== | ==== anonymous 접속 ==== | ||
+ | * [[windows: | ||
* [[https:// | * [[https:// | ||
* ''" | * ''" | ||
<code sh> | <code sh> | ||
+ | smbclient // | ||
+ | |||
+ | # anonymous 계정이 추가가 안 된 상태에서는 ''" | ||
smbclient // | smbclient // | ||
</ | </ | ||
줄 113: | 줄 122: | ||
client max protocol = SMB3 | client max protocol = SMB3 | ||
</ | </ | ||
- | * 재시작< | + | * 재시작 |
+ | <code sh> | ||
sudo service smbd restart | sudo service smbd restart | ||
</ | </ |