Skip to content

Instantly share code, notes, and snippets.

@luizomf
Created May 14, 2021 12:32
Show Gist options
  • Save luizomf/4398ea3409dc852595704358819b3679 to your computer and use it in GitHub Desktop.
Save luizomf/4398ea3409dc852595704358819b3679 to your computer and use it in GitHub Desktop.
Create a samba share on Ubuntu
# Create a samba share Ubuntu
# Install samba
sudo apt install samba samba-common-bin
# Add a user to samba
sudo smbpasswd -a username
# Add configs to /etc/samba/smb.conf
sudo nano /etc/samba/smb.conf
# Example
[SHARE_NAME]
comment = needs username and password to access
path = /path/to/folder
browseable = yes
guest ok = no
writable = yes
read only = no
valid users = user1, user2, etc
# valid users = @samba # this is for groups
[PUBLIC_SHARE]
comment = public share
path = /path/to/public/
browseable = yes
writable = yes
guest ok = yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment