#!/usr/bin/env bash # description: setup samba for logged in user and creat shared folder "shared" # update package indexes sudo apt update -y # install samba sudo apt install samba -y # create a folder on local directory to share mkdir -p /home/$USER/shared && chmod 777 /home/$USER/shared # back up samba conf sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak # edit smb.conf to add new folder to its shared list cat >> /etc/samba/smb.conf <