2. Set the samba server
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install samba samba-common-bin
Prepare the shared directory/folder bisa juga hdd external
/media/pi/hddmu
Access configuration
The next step is to modify the file smb.conf to let samba knows where the folder to share is and how to handle the access.
sudo nano /etc/samba/smb.conf
tambahkan pada akhir file
Untuk setup file yang di share (untuk 2 buah drive yang di share)
[Data]
path = /media/pi/DATA
writeable = yes
browseable = yes
public = no
[Image]
path = /media/pi/IMAGE
writeable = yes
browseable = yes
public = no
kalau spasi ya ditulis spase
Set a user for the samba share
To control the access to this folder, I add a user and a password.
With this command we can set the password, the user will be pi
sudo smbpasswd -a (username)
misal
sudo smbpasswd -a debian
Restart the server.
sudo systemctl restart smbd
If we need to get the hostname, we can obtain it with hostname -I
https://pimylifeup.com/raspberry-pi-samba/