Skip to content

Instantly share code, notes, and snippets.

@ssdean
Last active August 14, 2020 05:21
Show Gist options
  • Save ssdean/1df4379ef618d390dbf1c2deec6d3b2c to your computer and use it in GitHub Desktop.
Save ssdean/1df4379ef618d390dbf1c2deec6d3b2c to your computer and use it in GitHub Desktop.

Create Samba Directory

mkdir -p /path/to/share/dir

Configure

# /etc/samba/smb.conf

# Global settings apply to the whole server
[global]
workgroup = domain name of your choice
server string = Samba Server %v
netbios name = the server hostname
security = user
map to guest = bad user
dns proxy = no

# User defined sections
[section name]
path = /path/to/share/dir
valid users = @groupname
browsable =yes
writable = yes
guest ok = no
read only = no

Create Authorised Group

groupadd groupname

usermod -a -G groupname username

Create Samba Password

smbpasswd -a username

File Permissions

chmod -R 0770 /path/to/share/dir

chown -R username:groupname /path/to/share/dir

Start Service

systemctl enable --now smb.service

systemctl enable --now nmb.service

Check For Errors

testparm

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