Skip to content

Instantly share code, notes, and snippets.

@crshnbrn66
Forked from luizomf/samba-share.sh
Created July 17, 2024 21:39
Show Gist options
  • Save crshnbrn66/e1ff4e553e6b81c7e567bd86c66770a0 to your computer and use it in GitHub Desktop.
Save crshnbrn66/e1ff4e553e6b81c7e567bd86c66770a0 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