Raspberry NAS
AJA • March 29, 2020
raspberrySamba is a implementation of the SMB/CIFS networking protocol that is used by Windows devices to provide shared access to files, printers, and serial ports etc.
Install samba
sudo apt install samba samba-common-bin smbclient cifs-utils
Modify smb.conf to use WINS settings from DHCP ? N
Create the public shared folder
sudo mkdir /home/shares
sudo mkdir /home/shares/public
Change owner, group and permission
sudo chown -R root:users /home/shares/public
sudo chmod -R ug=rwx,o=rx /home/shares/public
Edit the /etc/samba/smb.conf
sudo nano /etc/samba/smb.conf
Add security = users just after ##### Authentification #####.
Change workgroup = WORKGROUP with yours.
After [homes] change read only to no.
Add the following at the end of the file.
[public]
comment = Public
path = /home/shares/public
valid users = @users
force group = users
create mask = 0600
directory mask = 0771
read only = no
Restart the samba service
sudo /etc/init.d/smbd restart
Add pi as smb user
sudo smbpasswd -a pi