{"id":374,"date":"2019-01-24T14:35:06","date_gmt":"2019-01-24T13:35:06","guid":{"rendered":"http:\/\/blog.r00x.at\/?page_id=374"},"modified":"2019-01-24T14:39:56","modified_gmt":"2019-01-24T13:39:56","slug":"smb-conf","status":"publish","type":"page","link":"https:\/\/blog.r00x.at\/?page_id=374","title":{"rendered":"smb.conf"},"content":{"rendered":"\n<pre class=\"prettyprint\">#\n# Sample configuration file for the Samba suite for Debian GNU\/Linux.\n#\n#\n# This is the main Samba configuration file. You should read the\n# smb.conf(5) manual page in order to understand the options listed\n# here. Samba has a huge number of configurable options most of which\n# are not shown in this example\n#\n# Some options that are often worth tuning have been included as\n# commented-out examples in this file.\n#  - When such options are commented with \";\", the proposed setting\n#    differs from the default Samba behaviour\n#  - When commented with \"#\", the proposed setting is the default\n#    behaviour of Samba but the option is considered important\n#    enough to be mentioned here\n#\n# NOTE: Whenever you modify this file you should run the command\n# \"testparm\" to check that you have not made any basic syntactic\n# errors.\n\n#======================= Global Settings =======================\n\n[global]\n\n## Browsing\/Identification ###\n\n# Change this to the workgroup\/NT-domain name your Samba server will part of\n   workgroup = WORKGROUP\n\n# Windows Internet Name Serving Support Section:\n# WINS Support - Tells the NMBD component of Samba to enable its WINS Server\n#   wins support = no\n\n# WINS Server - Tells the NMBD components of Samba to be a WINS Client\n# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both\n;   wins server = w.x.y.z\n\n# This will prevent nmbd to search for NetBIOS names through DNS.\n   dns proxy = no\n\n#### Networking ####\n\n# The specific set of interfaces \/ networks to bind to\n# This can be either the interface name or an IP address\/netmask;\n# interface names are normally preferred\n;   interfaces = 127.0.0.0\/8 eth0\n\n# Only bind to the named interfaces and\/or networks; you must use the\n# 'interfaces' option above to use this.\n# It is recommended that you enable this feature if your Samba machine is\n# not protected by a firewall or is a firewall itself.  However, this\n# option cannot handle dynamic or non-broadcast interfaces correctly.\n;   bind interfaces only = yes\n\n\n\n#### Debugging\/Accounting ####\n\n# This tells Samba to use a separate log file for each machine\n# that connects\n   log file = \/var\/log\/samba\/log.%m\n\n# Cap the size of the individual log files (in KiB).\n   max log size = 1000\n\n# If you want Samba to only log through syslog then set the following\n# parameter to 'yes'.\n#   syslog only = no\n\n# We want Samba to log a minimum amount of information to syslog. Everything\n# should go to \/var\/log\/samba\/log.{smbd,nmbd} instead. If you want to log\n# through syslog you should set the following parameter to something higher.\n   syslog = 0\n\n# Do something sensible when Samba crashes: mail the admin a backtrace\n   panic action = \/usr\/share\/samba\/panic-action %d\n\n\n####### Authentication #######\n\n# Server role. Defines in which mode Samba will operate. Possible\n# values are \"standalone server\", \"member server\", \"classic primary\n# domain controller\", \"classic backup domain controller\", \"active\n# directory domain controller\".\n#\n# Most people will want \"standalone sever\" or \"member server\".\n# Running as \"active directory domain controller\" will require first\n# running \"samba-tool domain provision\" to wipe databases and create a\n# new domain.\n   server role = standalone server\n\n# If you are using encrypted passwords, Samba will need to know what\n# password database type you are using.\n   passdb backend = tdbsam\n\n   obey pam restrictions = yes\n\n# This boolean parameter controls whether Samba attempts to sync the Unix\n# password with the SMB password when the encrypted SMB password in the\n# passdb is changed.\n   unix password sync = yes\n\n# For Unix password sync to work on a Debian GNU\/Linux system, the following\n# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for\n# sending the correct chat script for the passwd program in Debian Sarge).\n   passwd program = \/usr\/bin\/passwd %u\n   passwd chat = *Enter\\snew\\s*\\spassword:* %n\\n *Retype\\snew\\s*\\spassword:* %n\\n *password\\supdated\\ssuccessfully* .\n\n# This boolean controls whether PAM will be used for password changes\n# when requested by an SMB client instead of the program listed in\n# 'passwd program'. The default is 'no'.\n   pam password change = yes\n\n# This option controls how unsuccessful authentication attempts are mapped\n# to anonymous connections\n   map to guest = bad user\n\n########## Domains ###########\n\n#\n# The following settings only takes effect if 'server role = primary\n# classic domain controller', 'server role = backup domain controller'\n# or 'domain logons' is set\n#\n\n# It specifies the location of the user's\n# profile directory from the client point of view) The following\n# required a [profiles] share to be setup on the samba server (see\n# below)\n;   logon path = \\\\%N\\profiles\\%U\n# Another common choice is storing the profile in the user's home directory\n# (this is Samba's default)\n#   logon path = \\\\%N\\%U\\profile\n\n# The following setting only takes effect if 'domain logons' is set\n# It specifies the location of a user's home directory (from the client\n# point of view)\n;   logon drive = H:\n#   logon home = \\\\%N\\%U\n\n# The following setting only takes effect if 'domain logons' is set\n# It specifies the script to run during logon. The script must be stored\n# in the [netlogon] share\n# NOTE: Must be store in 'DOS' file format convention\n;   logon script = logon.cmd\n\n# This allows Unix users to be created on the domain controller via the SAMR\n# RPC pipe.  The example command creates a user account with a disabled Unix\n# password; please adapt to your needs\n; add user script = \/usr\/sbin\/adduser --quiet --disabled-password --gecos \"\" %u\n\n# This allows machine accounts to be created on the domain controller via the\n# SAMR RPC pipe.\n# The following assumes a \"machines\" group exists on the system\n; add machine script  = \/usr\/sbin\/useradd -g machines -c \"%u machine account\" -d \/var\/lib\/samba -s \/bin\/false %u\n\n# This allows Unix groups to be created on the domain controller via the SAMR\n# RPC pipe.\n; add group script = \/usr\/sbin\/addgroup --force-badname %g\n\n############ Misc ############\n\n# Using the following line enables you to customise your configuration\n# on a per machine basis. The %m gets replaced with the netbios name\n# of the machine that is connecting\n;   include = \/home\/samba\/etc\/smb.conf.%m\n\n# Some defaults for winbind (make sure you're not using the ranges\n# for something else.)\n;   idmap uid = 10000-20000\n;   idmap gid = 10000-20000\n;   template shell = \/bin\/bash\n\n# Setup usershare options to enable non-root users to share folders\n# with the net usershare command.\n\n# Maximum number of usershare. 0 (default) means that usershare is disabled.\n;   usershare max shares = 100\n\n# Allow users who've been granted usershare privileges to create\n# public shares, not just authenticated ones\n   usershare allow guests = yes\n\n#======================= Share Definitions =======================\n\n[homes]\n   comment = Home Directories\n   browseable = no\n\n# By default, the home directories are exported read-only. Change the\n# next parameter to 'no' if you want to be able to write to them.\n   read only = yes\n\n# File creation mask is set to 0700 for security reasons. If you want to\n# create files with group=rw permissions, set next parameter to 0775.\n   create mask = 0700\n\n# Directory creation mask is set to 0700 for security reasons. If you want to\n# create dirs. with group=rw permissions, set next parameter to 0775.\n   directory mask = 0700\n\n# By default, \\\\server\\username shares can be connected to by anyone\n# with access to the samba server.\n# The following parameter makes sure that only \"username\" can connect\n# to \\\\server\\username\n# This might need tweaking when using external authentication schemes\n   valid users = %S\n\n# Un-comment the following and create the netlogon directory for Domain Logons\n# (you need to configure Samba to act as a domain controller too.)\n;[netlogon]\n;   comment = Network Logon Service\n;   path = \/home\/samba\/netlogon\n;   guest ok = yes\n;   read only = yes\n\n# Un-comment the following and create the profiles directory to store\n# users profiles (see the \"logon path\" option above)\n# (you need to configure Samba to act as a domain controller too.)\n# The path below should be writable by all users so that their\n# profile directory may be created the first time they log on\n;[profiles]\n;   comment = Users profiles\n;   path = \/home\/samba\/profiles\n;   guest ok = no\n;   browseable = no\n;   create mask = 0600\n;   directory mask = 0700\n\n[printers]\n   comment = All Printers\n   browseable = no\n   path = \/var\/spool\/samba\n   printable = yes\n   guest ok = no\n   read only = yes\n   create mask = 0700\n\n# Windows clients look for this share name as a source of downloadable\n# printer drivers\n[print$]\n   comment = Printer Drivers\n   path = \/var\/lib\/samba\/printers\n   browseable = yes\n   read only = yes\n   guest ok = no\n# Uncomment to allow remote administration of Windows print drivers.\n# You may need to replace 'lpadmin' with the name of the group your\n# admin users are members of.\n# Please note that you also need to set appropriate Unix permissions\n# to the drivers directory for these users to have write rights in it\n;   write list = root, @lpadmin\n\n[RPi-NAS]\n# Freizugebender Ordner\n    path = \/media\/hdd\n# Kein User+Passwort erforderlich\n    guest ok = yes\n# Benutzerkreis einschr\u00ef\u00bf\u00bdnken\n;    valid users = pi\n# Schreibzugriff erlauben\n    writeable = yes\n# Share nicht im Netzwerk zeigen\n    browseable = yes\n# wird zus\u00ef\u00bf\u00bdtzlich zur Freigabe angezeig\n    comment = NAS\n    create mask =0777\n    directory mask=0777\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p># # Sample configuration file for the Samba suite for Debian GNU\/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":368,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-374","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/pages\/374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.r00x.at\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=374"}],"version-history":[{"count":1,"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/pages\/374\/revisions"}],"predecessor-version":[{"id":375,"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/pages\/374\/revisions\/375"}],"up":[{"embeddable":true,"href":"https:\/\/blog.r00x.at\/index.php?rest_route=\/wp\/v2\/pages\/368"}],"wp:attachment":[{"href":"https:\/\/blog.r00x.at\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}