본문 바로가기

Computer/Linux

Samba

#Installation

sudo apt-get install samba samba-common-bin

 

#setting

sudo nano /etc/samba/smb.conf

 

#restart samba server, run this after config setting

sudo systemctl restart smbd

 or

sudo systemctl restart smbd.service

 

#add user before create samba user

sudo adduser ID

sudo userdel ID

 

#add samba user which user ID,the user name should be registered in linux in advance

sudo smbpasswd -a ID

sudo systemctl restart smbd

 

#check if samba user is created

sudo pdbedit -w -L

  or

pdbedit -L -v

 

#Remove user

pdbedit -x -u username

 

# paste following text to the end of [global]

min protocol = SMB2

 


[homes]
   comment = Home Directories
   browseable = no
   read only = no
   create mask = 0775
   directory mask = 0775


[downloads] 
Comment = UbuntuShareFolder
Path =/var/lib/transmission-daemon/downloads
Browseable = yes 
Writeable = Yes 
only guest = no 
create mask = 0777 
directory mask = 0777 
Public = yes 
Guest ok = yes

 

Map network drive > “\\raspberrypi\share“

 


Raspberry Pi 

https://magpi.raspberrypi.org/articles/samba-file-server

 

sudo apt-get install samba samba-common-bin

sudo nano /etc/samba/smb.conf

 

[share]
Comment = Pi shared folder
Path = /home/share
Browseable = yes
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = yes

 

[private]
Comment = Pi shared folder
Path = /home/pi
Browseable = no
Writeable = Yes
only guest = no
create mask = 0777
directory mask = 0777
Public = yes
Guest ok = no

#sudo chmod 770 /home/pi

 

Map network drive > “\\raspberrypi\share“


Odroid

SAMBA install ( SMB2 recommended)

#Following command is for smb1, smb1 has security problem and windows 10 does not allow to access to smb1

sudo apt install samba

 

 

# ↑ Paste following into the end of the file 

[ODROID NAS] 
comment = NAS 
path = /media/nas/share
valid users = your-user-name other-name1 other-name2 @your-group-name 
writable = yes 
create mask = 0775 
directory mask = 0775 
# Tweaks 
write cache size = 524288 
getwd cache = yes 
use sendfile = yes 
min receivefile size = 16384 
socket options = TCP_NODELAY IPTOS_LOWDELAY


 

 

 

'Computer > Linux' 카테고리의 다른 글

github  (0) 2019.05.22
fdisk  (0) 2019.05.19
AUTOFS  (0) 2019.05.19
User account control  (0) 2019.05.15
Ubuntu instaillation  (0) 2019.05.12
PiVPN installation  (0) 2019.05.10
Agenti - web admin  (0) 2019.05.03
Xiaomi Mijia Hygrothermo V2 read data from Python3 샤오미 온습도계V2 파이썬으로 읽기  (0) 2019.02.07