User Tools

Site Tools


wiki:step3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
wiki:step3 [2020/10/26 11:38]
admin
wiki:step3 [2020/10/26 11:39] (current)
admin old revision restored (2019/05/29 02:17)
Line 1: Line 1:
-__false__+====== 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 
 + 
 +<code vim> 
 +apt install samba samba-common-bin 
 +</code> 
 + 
 +• Add Shares by using 
 + 
 +<code vim> 
 + nano /etc/samba/smb.conf 
 +</code> 
 + 
 +• Add these AT THE BOTTOM! 
 + 
 +<code vim> 
 +## 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 
 +</code> 
 + 
 +  * Add Username 
 + 
 +<code vim> 
 +sudo adduser kodi 
 +</code> 
 + 
 +  * Add Password 
 + 
 +<code vim> 
 +sudo smbpasswd -a kodi 
 +</code> 
 + 
 +  * Create Samba Group 
 + 
 +<code vim> 
 +sudo groupadd samba 
 +</code> 
 + 
 +  * Add user to group 
 + 
 +<code vim> 
 +sudo gpasswd -a kodi samba 
 +</code> 
 + 
 +  * Then add read/write/execute permissions to the drives: 
 + 
 +<code vim> 
 +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 
 +</code> 
 + 
 +  * Restart Samba 
 + 
 +<code vim> 
 +sudo systemctl restart smbd nmbd 
 +</code> 
  
wiki/step3.txt · Last modified: 2020/10/26 11:39 by admin