문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 다음 판 양쪽 다음 판 | ||
linux:ubuntu:samba [2022/04/13 15:34] kwon37xi [anonymous 접속] |
linux:ubuntu:samba [2022/04/13 16:04] kwon37xi [mouting smbfs] |
||
---|---|---|---|
줄 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 | + | < |
- | //servername/ | + | username=example_username |
- | + | password=example_password | |
- | # root user and specific user write/all read | + | </code> |
- | # uid와 gid를 | + | <code sh> |
- | // | + | sudo chmod 400 /path/to/.smbcredential |
- | + | </code> | |
- | # 혹은 쓰기 권한을 줄 사용자를 특정 그룹에 지정하고, | + | |
- | //servername/sharename | + | <code sh> |
+ | sudo mount -t cifs -o rw,vers=3.0,credentials=</path/to/.smbcredential> | ||
+ | //< | ||
</ | </ | ||
- | * 명령어로 실행<code sh> | + | * ''/ |
- | # smbmount 명령 사용하기 | + | <code sh> |
- | smbmount | + | //< |
- | # 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, | + | |
</ | </ | ||