2 # Sample configuration file for the Samba suite for Debian GNU/Linux.
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
10 # Any line which starts with a ; (semi-colon) or a # (hash)
11 # is a comment and is ignored. In this example we will use a #
12 # for commentary and a ; for parts of the config file that you
15 # NOTE: Whenever you modify this file you should run the command
16 # "testparm" to check that you have not made any basic syntactic
20 #======================= Global Settings =======================
24 ## Browsing/Identification ###
26 # Change this to the workgroup/NT-domain name your Samba server will part of
29 # server string is the equivalent of the NT Description field
30 server string = %h server
32 # Windows Internet Name Serving Support Section:
33 # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
36 # WINS Server - Tells the NMBD components of Samba to be a WINS Client
37 # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
38 ; wins server = w.x.y.z
40 # This will prevent nmbd to search for NetBIOS names through DNS.
43 # What naming service and in what order should we use to resolve host names
45 ; name resolve order = lmhosts host wins bcast
49 # The specific set of interfaces / networks to bind to
50 # This can be either the interface name or an IP address/netmask;
51 # interface names are normally preferred
52 ; interfaces = 127.0.0.0/8 eth0
54 # Only bind to the named interfaces and/or networks; you must use the
55 # 'interfaces' option above to use this.
56 # It is recommended that you enable this feature if your Samba machine is
57 # not protected by a firewall or is a firewall itself. However, this
58 # option cannot handle dynamic or non-broadcast interfaces correctly.
59 ; bind interfaces only = true
63 #### Debugging/Accounting ####
65 # This tells Samba to use a separate log file for each machine
67 log file = /var/log/samba/log.%m
69 # Put a capping on the size of the log files (in Kb).
72 # If you want Samba to only log through syslog then set the following
76 # We want Samba to log a minimum amount of information to syslog. Everything
77 # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
78 # through syslog you should set the following parameter to something higher.
81 # Do something sensible when Samba crashes: mail the admin a backtrace
82 panic action = /usr/share/samba/panic-action %d
85 ####### Authentication #######
87 # "security = user" is always a good idea. This will require a Unix account
88 # in this server for every user accessing the server. See
89 # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
90 # in the samba-doc package for details.
93 # You may wish to use password encryption. See the section on
94 # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
95 encrypt passwords = true
97 # If you are using encrypted passwords, Samba will need to know what
98 # password database type you are using.
99 passdb backend = tdbsam
101 obey pam restrictions = yes
103 ; guest account = nobody
106 # This boolean parameter controls whether Samba attempts to sync the Unix
107 # password with the SMB password when the encrypted SMB password in the
109 ; unix password sync = no
111 # For Unix password sync to work on a Debian GNU/Linux system, the following
112 # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
113 # sending the correct chat script for the passwd program in Debian Sarge).
114 passwd program = /usr/bin/passwd %u
115 passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
117 # This boolean controls whether PAM will be used for password changes
118 # when requested by an SMB client instead of the program listed in
119 # 'passwd program'. The default is 'no'.
120 ; pam password change = no
122 ########## Domains ###########
124 # Is this machine able to authenticate users. Both PDC and BDC
125 # must have this setting enabled. If you are the BDC you must
126 # change the 'domain master' setting to no
128 ; domain logons = yes
130 # The following setting only takes effect if 'domain logons' is set
131 # It specifies the location of the user's profile directory
132 # from the client point of view)
133 # The following required a [profiles] share to be setup on the
134 # samba server (see below)
135 ; logon path = \\%N\profiles\%U
136 # Another common choice is storing the profile in the user's home directory
137 ; logon path = \\%N\%U\profile
139 # The following setting only takes effect if 'domain logons' is set
140 # It specifies the location of a user's home directory (from the client
143 ; logon home = \\%N\%U
145 # The following setting only takes effect if 'domain logons' is set
146 # It specifies the script to run during logon. The script must be stored
147 # in the [netlogon] share
148 # NOTE: Must be store in 'DOS' file format convention
149 ; logon script = logon.cmd
151 # This allows Unix users to be created on the domain controller via the SAMR
152 # RPC pipe. The example command creates a user account with a disabled Unix
153 # password; please adapt to your needs
154 ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
156 ########## Printing ##########
158 # If you want to automatically load your printer list rather
159 # than setting them up individually then you'll need this
160 ; load printers = yes
162 # lpr(ng) printing. You may wish to override the location of the
165 ; printcap name = /etc/printcap
167 # CUPS printing. See also the cupsaddsmb(8) manpage in the
168 # cupsys-client package.
170 ; printcap name = cups
172 # When using [print$], root is implicitly a 'printer admin', but you can
173 # also give this right to other users to add drivers and set printer
175 ; printer admin = @ntadmin
178 ############ Misc ############
180 # Using the following line enables you to customise your configuration
181 # on a per machine basis. The %m gets replaced with the netbios name
182 # of the machine that is connecting
183 ; include = /home/samba/etc/smb.conf.%m
185 # Most people will find that this option gives better performance.
186 # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
188 # You may want to add the following on a Linux system:
189 # SO_RCVBUF=8192 SO_SNDBUF=8192
190 socket options = TCP_NODELAY
192 # The following parameter is useful only if you have the linpopup package
193 # installed. The samba maintainer and the linpopup maintainer are
194 # working to ease installation and configuration of linpopup and samba.
195 ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
197 # Domain Master specifies Samba to be the Domain Master Browser. If this
198 # machine will be configured as a BDC (a secondary logon server), you
199 # must set this to 'no'; otherwise, the default behavior is recommended.
200 ; domain master = auto
202 # Some defaults for winbind (make sure you're not using the ranges
203 # for something else.)
204 ; idmap uid = 10000-20000
205 ; idmap gid = 10000-20000
206 ; template shell = /bin/bash
208 ; The following was the default behaviour in sarge
209 ; but samba upstream reverted the default because it might induce
210 ; performance issues in large organizations
211 ; See #368251 for some of the consequences of *not* having
212 ; this setting and smb.conf(5) for all details
214 ; winbind enum groups = yes
215 ; winbind enum users = yes
217 #======================= Share Definitions =======================
220 comment = Home Directories
223 # By default, the home directories are exported read-only. Change next
224 # parameter to 'yes' if you want to be able to write to them.
227 # File creation mask is set to 0700 for security reasons. If you want to
228 # create files with group=rw permissions, set next parameter to 0775.
231 # Directory creation mask is set to 0700 for security reasons. If you want to
232 # create dirs. with group=rw permissions, set next parameter to 0775.
233 directory mask = 0700
235 # Restrict access to home directories
236 # to the one of the authenticated user
237 # This might need tweaking when using external authentication schemes
240 # Un-comment the following and create the netlogon directory for Domain Logons
241 # (you need to configure Samba to act as a domain controller too.)
243 ; comment = Network Logon Service
244 ; path = /home/samba/netlogon
249 # Un-comment the following and create the profiles directory to store
250 # users profiles (see the "logon path" option above)
251 # (you need to configure Samba to act as a domain controller too.)
252 # The path below should be writable by all users so that their
253 # profile directory may be created the first time they log on
255 ; comment = Users profiles
256 ; path = /home/samba/profiles
260 ; directory mask = 0700
263 comment = All Printers
265 path = /var/spool/samba
271 # Windows clients look for this share name as a source of downloadable
274 comment = Printer Drivers
275 path = /var/lib/samba/printers
279 # Uncomment to allow remote administration of Windows print drivers.
280 # Replace 'ntadmin' with the name of the group your admin users are
282 ; write list = root, @ntadmin
284 # A sample share for sharing your CD-ROM with others.
286 ; comment = Samba server's CD-ROM
292 # The next two parameters show how to auto-mount a CD-ROM when the
293 # cdrom share is accesed. For this to work /etc/fstab must contain
294 # an entry like this:
296 # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
298 # The CD-ROM gets unmounted automatically after the connection to the
300 # If you don't want to use auto-mounting/unmounting make sure the CD
301 # is mounted on /cdrom
303 ; preexec = /bin/mount /cdrom
304 ; postexec = /bin/umount /cdrom