Skip to content

Instantly share code, notes, and snippets.

@abrahamfast
Created August 3, 2021 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrahamfast/35da2eb69eff4b2af6685c002d7b8944 to your computer and use it in GitHub Desktop.
Save abrahamfast/35da2eb69eff4b2af6685c002d7b8944 to your computer and use it in GitHub Desktop.
easy setup samba

apt-get update apt install samba ufw allow 'Samba'

vim /etc/samba/smb.conf [public] comment = no need username and password path = /samba/public browsable = yes guest ok = yes writable = yes read only = no mkdir -p /samba/public chmod -R 777 /samba/public systemctl restart smbd.service nmbd.service

[Private] comment = needs username and password to access path = /samba/private/ browseable = yes guest ok = no writable = yes valid users = @samba

useradd net1 sudo smbpasswd -a username sudo groupadd samba sudo gpasswd -a username samba

mkdir -p /samba/private chmod -R 777 /samba/private systemctl restart smbd.service nmbd.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment