User Tools

Site Tools


wiki:step3

Add Samba

These commands are set for MY usage,

PLEASE EDIT THEM IN A TEXT EDITOR FIRST BEFORE PASTING THEM INTO A CLI!

  • Use this command
apt install samba samba-common-bin

• Add Shares by using

 nano /etc/samba/smb.conf

• Add these AT THE BOTTOM!

## Misc Share
 
[Misc]
 
comment = needs username and password to access
path = /media/library/misc
browseable = yes
guest ok = no
writable = yes
valid users = @samba
 
## Movies Share
 
[Movies]
 
comment = needs username and password to access
path = /media/library2/movies
browseable = yes
guest ok = no
writable = yes
valid users = @samba
 
## TV Recordings Share
 
[TV Recordings]
 
comment = needs username and password to access
path = /media/library/recordings
browseable = yes
guest ok = no
writable = yes
valid users = @samba
 
## TV Share
 
[Television]
 
comment = needs username and password to access
path = /media/library/tv
browseable = yes
guest ok = no
writable = yes
valid users = @samba
 
## Music Share
 
[Music]
 
comment = needs username and password to access
path = /media/library2/music
browseable = yes
guest ok = no
writable = yes
valid users = @samba
 
## Backup Share
 
[Backup-V1]
 
comment = needs username and password to access
path = /media/backup/backup
browseable = yes
guest ok = no
writable = yes
valid users = @samba
## Backup Share
 
[Backup-V2]
 
comment = needs username and password to access
path = /media/backup2/backup
browseable = yes
guest ok = no
writable = yes
valid users = @samba
  • Add Username
sudo adduser kodi
  • Add Password
sudo smbpasswd -a kodi
  • Create Samba Group
sudo groupadd samba
  • Add user to group
sudo gpasswd -a kodi samba
  • Then add read/write/execute permissions to the drives:
sudo setfacl -R -m "g:samba:rwx" /media/library/misc
sudo setfacl -R -m "g:samba:rwx" /media/library2/movies
sudo setfacl -R -m "g:samba:rwx" /media/library2/music
sudo setfacl -R -m "g:samba:rwx" /media/library/tv
sudo setfacl -R -m "g:samba:rwx" /media/library/recording
sudo setfacl -R -m "g:samba:rwx" /media/backup/backup
sudo setfacl -R -m "g:samba:rwx" /media/backup2/backup
  • Restart Samba
sudo systemctl restart smbd nmbd
wiki/step3.txt · Last modified: 2023/05/17 22:52 by 127.0.0.1