Skip to content

Instantly share code, notes, and snippets.

@Mausy5043
Created March 30, 2019 07:53
Show Gist options
  • Save Mausy5043/1232f2747650af2ef685e8d93808c6dd to your computer and use it in GitHub Desktop.
Save Mausy5043/1232f2747650af2ef685e8d93808c6dd to your computer and use it in GitHub Desktop.
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
# MHE 201903__: Unused examples are removed from this file.
# Ref to these sources for up-to-date information and examples:
# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
# https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html
# https://wiki.archlinux.org/index.php/Samba
# http://www.samba.org/samba/docs/Samba-Guide.pdf
#======================= Global Settings =====================================
[global]
# workgroup is the NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
# MHE 20190327: using the Windows standard by default
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
# MHE 20190327:
server string = %h SMB (%v)
# Server role defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
server role = standalone server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network.
# MHE: 3 networks defined: LAN, Docker machines and loopback
hosts allow = 192.168.1. 172.17. 127.
# MHE20190327: Logging goes to the systemd journal
logging = systemd
log level = 1
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
passdb backend = tdbsam
security = user
encrypt passwords = yes
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
# MHE: 20190330 - nobody needs WINS
wins support = no
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
dns proxy = no
#MHE: 20190330 - close stale connections after 15 minutes
deadtime = 15
oplocks = yes
#============================ Global Printing Definitions =====================
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
path = /srv/smb/homes/%S
writable = yes
veto files = /._*/.DS_Store/.AppleDouble/.TemporaryItems/.AppleDesktop/Network Trash Folder/
delete veto files = yes
[video]
path = /srv/smb/video
browseable = yes
writable = yes
veto files = /._*/.DS_Store/.AppleDouble/.TemporaryItems/.AppleDesktop/Network Trash Folder/
delete veto files = yes
[music]
path = /srv/smb/music
browseable = yes
writable = yes
veto files = /._*/.DS_Store/.AppleDouble/.TemporaryItems/.AppleDesktop/Network Trash Folder/
delete veto files = yes
[public]
path = /srv/smb/public
browseable = yes
writable = yes
veto files = /._*/.DS_Store/.AppleDouble/.TemporaryItems/.AppleDesktop/Network Trash Folder/
delete veto files = yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment