1# 2# Sample configuration file for the Samba suite for Debian GNU/Linux. 3# 4# 5# This is the main Samba configuration file. You should read the 6# smb.conf(5) manual page in order to understand the options listed 7# here. Samba has a huge number of configurable options most of which 8# are not shown in this example 9# 10# Some options that are often worth tuning have been included as 11# commented-out examples in this file. 12# - When such options are commented with ";", the proposed setting 13# differs from the default Samba behaviour 14# - When commented with "#", the proposed setting is the default 15# behaviour of Samba but the option is considered important 16# enough to be mentioned here 17# 18# NOTE: Whenever you modify this file you should run the command 19# "testparm" to check that you have not made any basic syntactic 20# errors. 21 22#======================= Global Settings ======================= 23 24[global] 25 26## Browsing/Identification ### 27 28# Prevent anonymous connections. Overriden if the user sets guest ok = yes 29# on any share 30 restrict anonymous = 1 31 32# Change this to the workgroup/NT-domain name your Samba server will part of 33 workgroup = WORKGROUP 34 35#### Networking #### 36 37# The specific set of interfaces / networks to bind to 38# This can be either the interface name or an IP address/netmask; 39# interface names are normally preferred 40; interfaces = 127.0.0.0/8 eth0 41 42# Only bind to the named interfaces and/or networks; you must use the 43# 'interfaces' option above to use this. 44# It is recommended that you enable this feature if your Samba machine is 45# not protected by a firewall or is a firewall itself. However, this 46# option cannot handle dynamic or non-broadcast interfaces correctly. 47; bind interfaces only = yes 48 49 50 51#### Debugging/Accounting #### 52 53# This tells Samba to use a separate log file for each machine 54# that connects 55 log file = /var/log/samba/log.%m 56 57# Cap the size of the individual log files (in KiB). 58 max log size = 1000 59 60# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}. 61# Append syslog@1 if you want important messages to be sent to syslog too. 62 logging = file 63 64# Do something sensible when Samba crashes: mail the admin a backtrace 65 panic action = /usr/share/samba/panic-action %d 66 67 68####### Authentication ####### 69 70# Server role. Defines in which mode Samba will operate. Possible 71# values are "standalone server", "member server", "classic primary 72# domain controller", "classic backup domain controller", "active 73# directory domain controller". 74# 75# Most people will want "standalone server" or "member server". 76# Running as "active directory domain controller" will require first 77# running "samba-tool domain provision" to wipe databases and create a 78# new domain. 79 server role = standalone server 80 81 obey pam restrictions = yes 82 83# This boolean parameter controls whether Samba attempts to sync the Unix 84# password with the SMB password when the encrypted SMB password in the 85# passdb is changed. 86 unix password sync = yes 87 88# For Unix password sync to work on a Debian GNU/Linux system, the following 89# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for 90# sending the correct chat script for the passwd program in Debian Sarge). 91 passwd program = /usr/bin/passwd %u 92 passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . 93 94# This boolean controls whether PAM will be used for password changes 95# when requested by an SMB client instead of the program listed in 96# 'passwd program'. The default is 'no'. 97 pam password change = yes 98 99# This option controls how unsuccessful authentication attempts are mapped 100# to anonymous connections 101 map to guest = never 102 103########## Domains ########### 104 105# 106# The following settings only takes effect if 'server role = classic 107# primary domain controller', 'server role = classic backup domain controller' 108# or 'domain logons' is set 109# 110 111# It specifies the location of the user's 112# profile directory from the client point of view) The following 113# required a [profiles] share to be setup on the samba server (see 114# below) 115; logon path = \\%N\profiles\%U 116# Another common choice is storing the profile in the user's home directory 117# (this is Samba's default) 118# logon path = \\%N\%U\profile 119 120# The following setting only takes effect if 'domain logons' is set 121# It specifies the location of a user's home directory (from the client 122# point of view) 123; logon drive = H: 124# logon home = \\%N\%U 125 126# The following setting only takes effect if 'domain logons' is set 127# It specifies the script to run during logon. The script must be stored 128# in the [netlogon] share 129# NOTE: Must be store in 'DOS' file format convention 130; logon script = logon.cmd 131 132# This allows Unix users to be created on the domain controller via the SAMR 133# RPC pipe. The example command creates a user account with a disabled Unix 134# password; please adapt to your needs 135; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u 136 137# This allows machine accounts to be created on the domain controller via the 138# SAMR RPC pipe. 139# The following assumes a "machines" group exists on the system 140; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u 141 142# This allows Unix groups to be created on the domain controller via the SAMR 143# RPC pipe. 144; add group script = /usr/sbin/addgroup --force-badname %g 145 146############ Misc ############ 147 148# Using the following line enables you to customise your configuration 149# on a per machine basis. The %m gets replaced with the netbios name 150# of the machine that is connecting 151; include = /home/samba/etc/smb.conf.%m 152 153# Some defaults for winbind (make sure you're not using the ranges 154# for something else.) 155; idmap config * : backend = tdb 156; idmap config * : range = 3000-7999 157; idmap config YOURDOMAINHERE : backend = tdb 158; idmap config YOURDOMAINHERE : range = 100000-999999 159; template shell = /bin/bash 160 161# Setup usershare options to enable non-root users to share folders 162# with the net usershare command. 163 164# Maximum number of usershare. 0 means that usershare is disabled. 165# usershare max shares = 100 166 167# Allow users who've been granted usershare privileges to create 168# public shares, not just authenticated ones 169 usershare allow guests = yes 170 171#======================= Share Definitions ======================= 172 173[homes] 174 comment = Home Directories 175 browseable = no 176 177# By default, the home directories are exported read-only. Change the 178# next parameter to 'no' if you want to be able to write to them. 179 read only = yes 180 181# File creation mask is set to 0700 for security reasons. If you want to 182# create files with group=rw permissions, set next parameter to 0775. 183 create mask = 0700 184 185# Directory creation mask is set to 0700 for security reasons. If you want to 186# create dirs. with group=rw permissions, set next parameter to 0775. 187 directory mask = 0700 188 189# By default, \\server\username shares can be connected to by anyone 190# with access to the samba server. 191# The following parameter makes sure that only "username" can connect 192# to \\server\username 193# This might need tweaking when using external authentication schemes 194 valid users = %S 195 196# Un-comment the following and create the netlogon directory for Domain Logons 197# (you need to configure Samba to act as a domain controller too.) 198;[netlogon] 199; comment = Network Logon Service 200; path = /home/samba/netlogon 201; guest ok = yes 202; read only = yes 203 204# Un-comment the following and create the profiles directory to store 205# users profiles (see the "logon path" option above) 206# (you need to configure Samba to act as a domain controller too.) 207# The path below should be writable by all users so that their 208# profile directory may be created the first time they log on 209;[profiles] 210; comment = Users profiles 211; path = /home/samba/profiles 212; guest ok = no 213; browseable = no 214; create mask = 0600 215; directory mask = 0700 216 217[printers] 218 comment = All Printers 219 browseable = no 220 path = /var/spool/samba 221 printable = yes 222 guest ok = no 223 read only = yes 224 create mask = 0700 225 226# Windows clients look for this share name as a source of downloadable 227# printer drivers 228[print$] 229 comment = Printer Drivers 230 path = /var/lib/samba/printers 231 browseable = yes 232 read only = yes 233 guest ok = no 234# Uncomment to allow remote administration of Windows print drivers. 235# You may need to replace 'lpadmin' with the name of the group your 236# admin users are members of. 237# Please note that you also need to set appropriate Unix permissions 238# to the drivers directory for these users to have write rights in it 239; write list = root, @lpadmin 240 241