From cc9f4444821b5e4479c35279e8f434d6b2d4f0d8 Mon Sep 17 00:00:00 2001 From: Ibrahim Mkusa Date: Sat, 10 Aug 2024 10:52:42 -0400 Subject: [PATCH] samba and folder setup on debian family --- samba/setup.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 samba/setup.sh diff --git a/samba/setup.sh b/samba/setup.sh new file mode 100644 index 0000000..0dce3ae --- /dev/null +++ b/samba/setup.sh @@ -0,0 +1,42 @@ +#!/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 <