InstallSamba - albertmon/smarthome GitHub Wiki
Samba install in 2 steps
- Download and install Samba (with some necessary tools)
Execute the next commands in your shell:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install samba samba-common-bin samba-vfs-modules winbind bind9 bind9utils ldb-tools ntp smbldap-tools libnss-winbind libpam-winbind
- Share your directory (with everbody!!)
We assume that the directory you want to share is/home/pi/Public
(if the directory does not exist first execute:mkdir /home/pi/Public
)
To avoid inadvertently removing the directory add the sticky bit, and to grant access for the directory to Read/Write/Execute for all execute:
chmod 1777 /home/pi/Public
To share the directory, add the next lines at the end of the file /etc/samba/smb.conf:
[share]
comment = Public shared folder
path = /home/pi/Public
browseable = yes
writable = yes
create mask = 0777
directory mask = 0777
public = yes
Connect to your share
On your PC open the file explorer and Map your network drive.
You must enter the name of your raspberry and the share: \\<IP of your PI>\share
The name of your share is share
, the name you used to define your share in /etc/samba/smb.conf ([share])
You will see the directory Public