# - bof - # :a # - - # # - Create & configure folders to share - # mkdir -p /home/Data/Documents/ToShare-FullAccess; mkdir -p /home/Data/Documents/ToShare-JustRead; sudo chown -R is_derayo:is_derayo /home/Data/Documents/ToShare-FullAccess; sudo chown -R is_derayo:is_derayo /home/Data/Documents/ToShare-JustRead; chmod 777 /home/Data/Documents/ToShare-FullAccess; chmod 777 /home/Data/Documents/ToShare-JustRead; :b # - - # # - Update & install samba - # update sudo pacman -S samba --noconfirm; sudo pacman -S nautilus-share gvfs-smb --noconfirm; :c # - - # # - Create/edit smb.conf file - # sudo vim /etc/samba/smb.conf; [global] workgroup = L_IS wins support = yes security = user server string = Samba Server server role = standalone server log file = /var/log/samba/log.%m max log size = 50 guest account = nobody map to guest = Bad Password [ToShare-FullAccess] comment = ToShare-FullAccess to everybody in the net path = /home/Data/Documents/ToShare-FullAccess writeable = yes browseable = yes guest ok = no create mask = 0777 valid users = is_derayo, smbguest [ToShare-JustRead] comment = ToShare-JustRead to everybody in the net path = /home/Data/Documents/ToShare-JustRead writeable = no browseable = yes guest ok = no create mask = 0755 valid users = is_derayo, smbguest Esc :wq :d # - - # # - Check smb file ok - # sudo testparm /etc/samba/smb.conf; :e # - - # # - Enable samba service - # sudo systemctl enable --now smb nmb; :f # - - # # - Create & configure sambashare group & samba users - # :f.1 # - - # # - Create sambashare group - # sudo groupadd -r sambashare; :f.2 # - - # # - Create & configure samba users - # sudo useradd -r -s /usr/bin/nologin smbguest; sudo passwd smbguest; sudo usermod -aG sambashare smbguest; sudo usermod -aG sambashare is_derayo; sudo gpasswd sambashare -a smbguest; sudo gpasswd sambashare -a is_derayo; sudo pdbedit -a -u smbguest; sudo pdbedit -a -u is_derayo; :g # - - # # - Enable & start samba service - # sudo systemctl enable --now smb nmb; sudo systemctl start smb.service nmb.service sudo systemctl stop smb.service nmb.service sudo systemctl start smb.service nmb.service sudo systemctl status smb.service nmb.service # - eof - #