1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE variablelist PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
3 <variablelist xmlns:xi="http://www.w3.org/2003/XInclude">
5 <indexterm significance="preferred"><primary>abort shutdown script</primary></indexterm><term><anchor id="ABORTSHUTDOWNSCRIPT"/>abort shutdown script (G)</term><listitem>
6 <para>This a full path name to a script called by <citerefentry><refentrytitle>smbd</refentrytitle>
7 <manvolnum>8</manvolnum></citerefentry> that
8 should stop a shutdown procedure issued by the <link linkend="SHUTDOWNSCRIPT">
9 <parameter moreinfo="none">shutdown script</parameter></link>.</para>
11 <para>If the connected user posseses the <constant>SeRemoteShutdownPrivilege</constant>,
12 right, this command will be run as user.</para>
14 <para>Default: <emphasis><parameter>abort shutdown script</parameter> =
17 <para>Example: <emphasis><parameter>abort shutdown script</parameter> = /sbin/shutdown -c
20 </listitem></varlistentry>
22 <indexterm significance="preferred"><primary>acl compatibility</primary></indexterm><term><anchor id="ACLCOMPATIBILITY"/>acl compatibility (S)</term><listitem>
23 <para>This parameter specifies what OS ACL semantics should
24 be compatible with. Possible values are <emphasis>winnt</emphasis> for Windows NT 4,
25 <emphasis>win2k</emphasis> for Windows 2000 and above and <emphasis>auto</emphasis>.
26 If you specify <emphasis>auto</emphasis>, the value for this parameter
27 will be based upon the version of the client. There should
28 be no reason to change this parameter from the default.</para>
30 <para>Default: <emphasis><parameter>acl compatibility</parameter> = Auto
33 <para>Example: <emphasis><parameter>acl compatibility</parameter> = win2k
36 </listitem></varlistentry>
38 <indexterm significance="preferred"><primary>add group script</primary></indexterm><term><anchor id="ADDGROUPSCRIPT"/>add group script (G)</term><listitem>
39 <para>This is the full pathname to a script that will be run
40 <emphasis>AS ROOT</emphasis> by <citerefentry>
41 <refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
42 when a new group is requested. It will expand any <parameter moreinfo="none">%g</parameter> to the group name passed. This
43 script is only useful for installations using the Windows NT
44 domain administration tools. The script is free to create a
45 group with an arbitrary name to circumvent unix group name
46 restrictions. In that case the script must print the numeric gid
47 of the created group on stdout.</para>
49 <para><emphasis>No default</emphasis></para>
51 </listitem></varlistentry>
53 <indexterm significance="preferred"><primary>add machine script</primary></indexterm><term><anchor id="ADDMACHINESCRIPT"/>add machine script (G)</term><listitem>
54 <para>This is the full pathname to a script that will be run by
55 <citerefentry><refentrytitle>smbd</refentrytitle>
56 <manvolnum>8</manvolnum></citerefentry> when a machine is added
57 to it's domain using the administrator username and password
60 <para>This option is only required when using sam back-ends tied
61 to the Unix uid method of RID calculation such as smbpasswd.
62 This option is only available in Samba 3.0.</para>
64 <para>Default: <emphasis><parameter>add machine script</parameter> =
67 <para>Example: <emphasis><parameter>add machine script</parameter> = /usr/sbin/adduser -n -g machines -c Machine -d /var/lib/nobody -s /bin/false %u
70 </listitem></varlistentry>
72 <indexterm significance="preferred"><primary>addprinter command</primary></indexterm><term><anchor id="ADDPRINTERCOMMAND"/>addprinter command (G)</term><listitem>
73 <para>With the introduction of MS-RPC based printing
74 support for Windows NT/2000 clients in Samba 2.2, The MS Add
75 Printer Wizard (APW) icon is now also available in the
76 "Printers..." folder displayed a share listing. The APW
77 allows for printers to be add remotely to a Samba or Windows
78 NT/2000 print server.</para>
80 <para>For a Samba host this means that the printer must be
81 physically added to the underlying printing system. The <parameter moreinfo="none">add
82 printer command</parameter> defines a script to be run which
83 will perform the necessary operations for adding the printer
84 to the print system and to add the appropriate service definition
85 to the <filename moreinfo="none">smb.conf</filename> file in order that it can be
86 shared by <citerefentry><refentrytitle>smbd</refentrytitle>
87 <manvolnum>8</manvolnum></citerefentry>.</para>
89 <para>The <parameter moreinfo="none">addprinter command</parameter> is
90 automatically invoked with the following parameter (in
94 <listitem><para><parameter moreinfo="none">printer name</parameter></para></listitem>
95 <listitem><para><parameter moreinfo="none">share name</parameter></para></listitem>
96 <listitem><para><parameter moreinfo="none">port name</parameter></para></listitem>
97 <listitem><para><parameter moreinfo="none">driver name</parameter></para></listitem>
98 <listitem><para><parameter moreinfo="none">location</parameter></para></listitem>
99 <listitem><para><parameter moreinfo="none">Windows 9x driver location</parameter></para></listitem>
102 <para>All parameters are filled in from the PRINTER_INFO_2 structure sent
103 by the Windows NT/2000 client with one exception. The "Windows 9x
104 driver location" parameter is included for backwards compatibility
105 only. The remaining fields in the structure are generated from answers
106 to the APW questions.</para>
108 <para>Once the <parameter moreinfo="none">addprinter command</parameter> has
109 been executed, <command moreinfo="none">smbd</command> will reparse the <filename moreinfo="none">
110 smb.conf</filename> to determine if the share defined by the APW
111 exists. If the sharename is still invalid, then <command moreinfo="none">smbd
112 </command> will return an ACCESS_DENIED error to the client.</para>
115 The "add printer command" program can output a single line of text,
116 which Samba will set as the port the new printer is connected to.
117 If this line isn't output, Samba won't reload its printer shares.
121 <para>Default: <emphasis><parameter>addprinter command</parameter> =
124 <para>Example: <emphasis><parameter>addprinter command</parameter> = /usr/bin/addprinter
127 </listitem></varlistentry>
129 <indexterm significance="preferred"><primary>add share command</primary></indexterm><term><anchor id="ADDSHARECOMMAND"/>add share command (G)</term><listitem>
130 <para>Samba 2.2.0 introduced the ability to dynamically
131 add and delete shares via the Windows NT 4.0 Server Manager. The
132 <parameter moreinfo="none">add share command</parameter> is used to define an
133 external program or script which will add a new service definition
134 to <filename moreinfo="none">smb.conf</filename>. In order to successfully
135 execute the <parameter moreinfo="none">add share command</parameter>, <command moreinfo="none">smbd</command>
136 requires that the administrator be connected using a root account (i.e.
141 When executed, <command moreinfo="none">smbd</command> will automatically invoke the
142 <parameter moreinfo="none">add share command</parameter> with four parameters.
147 <para><parameter moreinfo="none">configFile</parameter> - the location
148 of the global <filename moreinfo="none">smb.conf</filename> file.
153 <para><parameter moreinfo="none">shareName</parameter> - the name of the new
159 <para><parameter moreinfo="none">pathName</parameter> - path to an **existing**
165 <para><parameter moreinfo="none">comment</parameter> - comment string to associate
172 This parameter is only used for add file shares. To add printer shares,
173 see the <link linkend="ADDPRINTERCOMMAND"><parameter moreinfo="none">addprinter
174 command</parameter></link>.
177 <para>Default: <emphasis><parameter>add share command</parameter> =
180 <para>Example: <emphasis><parameter>add share command</parameter> = /usr/local/bin/addshare
183 </listitem></varlistentry>
185 <indexterm significance="preferred"><primary>add user script</primary></indexterm><term><anchor id="ADDUSERSCRIPT"/>add user script (G)</term><listitem>
186 <para>This is the full pathname to a script that will
187 be run <emphasis>AS ROOT</emphasis> by <citerefentry><refentrytitle>smbd</refentrytitle>
188 <manvolnum>8</manvolnum></citerefentry> under special circumstances described below.</para>
190 <para>Normally, a Samba server requires that UNIX users are
191 created for all users accessing files on this server. For sites
192 that use Windows NT account databases as their primary user database
193 creating these users and keeping the user list in sync with the
194 Windows NT PDC is an onerous task. This option allows smbd to create the required UNIX users
195 <emphasis>ON DEMAND</emphasis> when a user accesses the Samba server.</para>
197 <para>In order to use this option, <citerefentry><refentrytitle>smbd</refentrytitle>
198 <manvolnum>8</manvolnum></citerefentry> must <emphasis>NOT</emphasis> be set to <parameter moreinfo="none">security = share</parameter>
199 and <parameter moreinfo="none">add user script</parameter>
200 must be set to a full pathname for a script that will create a UNIX
201 user given one argument of <parameter moreinfo="none">%u</parameter>, which expands into
202 the UNIX user name to create.</para>
204 <para>When the Windows user attempts to access the Samba server,
205 at login (session setup in the SMB protocol) time, <citerefentry><refentrytitle>smbd</refentrytitle>
206 <manvolnum>8</manvolnum></citerefentry> contacts the <parameter moreinfo="none">password server</parameter> and
207 attempts to authenticate the given user with the given password. If the
208 authentication succeeds then <command moreinfo="none">smbd</command>
209 attempts to find a UNIX user in the UNIX password database to map the
210 Windows user into. If this lookup fails, and <parameter moreinfo="none">add user script
211 </parameter> is set then <command moreinfo="none">smbd</command> will
212 call the specified script <emphasis>AS ROOT</emphasis>, expanding
213 any <parameter moreinfo="none">%u</parameter> argument to be the user name to create.</para>
215 <para>If this script successfully creates the user then <command moreinfo="none">smbd
216 </command> will continue on as though the UNIX user
217 already existed. In this way, UNIX users are dynamically created to
218 match existing Windows NT accounts.</para>
220 <para>See also <link linkend="SECURITY"><parameter moreinfo="none">
221 security</parameter></link>, <link linkend="PASSWORDSERVER">
222 <parameter moreinfo="none">password server</parameter></link>,
223 <link linkend="DELETEUSERSCRIPT"><parameter moreinfo="none">delete user
224 script</parameter></link>.</para>
226 <para>Default: <emphasis><parameter>add user script</parameter> =
229 <para>Example: <emphasis><parameter>add user script</parameter> = /usr/local/samba/bin/add_user %u
232 </listitem></varlistentry>
234 <indexterm significance="preferred"><primary>add user to group script</primary></indexterm><term><anchor id="ADDUSERTOGROUPSCRIPT"/>add user to group script (G)</term><listitem>
235 <para>Full path to the script that will be called when
236 a user is added to a group using the Windows NT domain administration
237 tools. It will be run by <citerefentry><refentrytitle>smbd</refentrytitle>
238 <manvolnum>8</manvolnum></citerefentry> <emphasis>AS ROOT</emphasis>.
239 Any <parameter moreinfo="none">%g</parameter> will be replaced with the group name and
240 any <parameter moreinfo="none">%u</parameter> will be replaced with the user name.
243 <para>Note that the <command>adduser</command> command used in the example below does
244 not support the used syntax on all systems. </para>
247 <para>Default: <emphasis><parameter>add user to group script</parameter> =
250 <para>Example: <emphasis><parameter>add user to group script</parameter> = /usr/sbin/adduser %u %g
253 </listitem></varlistentry>
255 <indexterm significance="preferred"><primary>admin users</primary></indexterm><term><anchor id="ADMINUSERS"/>admin users (S)</term><listitem>
256 <para>This is a list of users who will be granted
257 administrative privileges on the share. This means that they
258 will do all file operations as the super-user (root).</para>
260 <para>You should use this option very carefully, as any user in
261 this list will be able to do anything they like on the share,
262 irrespective of file permissions.</para>
264 <para>This parameter will not work with the <link linkend="SECURITY">
265 <parameter moreinfo="none">security = share</parameter></link> in
266 Samba 3.0. This is by design.</para>
269 <para>Default: <emphasis><parameter>admin users</parameter> =
272 <para>Example: <emphasis><parameter>admin users</parameter> = jason
275 </listitem></varlistentry>
277 <indexterm significance="preferred"><primary>afs share</primary></indexterm><term><anchor id="AFSSHARE"/>afs share (S)</term><listitem>
278 <para>This parameter controls whether special AFS features are enabled
279 for this share. If enabled, it assumes that the directory exported via
280 the <parameter>path</parameter> parameter is a local AFS import. The
281 special AFS features include the attempt to hand-craft an AFS token
282 if you enabled --with-fake-kaserver in configure.
285 <para>Default: <emphasis><parameter>afs share</parameter> = no
289 </listitem></varlistentry>
291 <indexterm significance="preferred"><primary>afs username map</primary></indexterm><term><anchor id="AFSUSERNAMEMAP"/>afs username map (G)</term><listitem>
292 <para>If you are using the fake kaserver AFS feature, you might
293 want to hand-craft the usernames you are creating tokens for.
294 For example this is necessary if you have users from several domain
295 in your AFS Protection Database. One possible scheme to code users
296 as DOMAIN+User as it is done by winbind with the + as a separator.
299 <para>The mapped user name must contain the cell name to log into,
300 so without setting this parameter there will be no token.</para>
302 <para>Default: <emphasis><parameter>afs username map</parameter> =
305 <para>Example: <emphasis><parameter>afs username map</parameter> = %u@afs.samba.org
308 </listitem></varlistentry>
310 <indexterm significance="preferred"><primary>algorithmic rid base</primary></indexterm><term><anchor id="ALGORITHMICRIDBASE"/>algorithmic rid base (G)</term><listitem>
311 <para>This determines how Samba will use its
312 algorithmic mapping from uids/gid to the RIDs needed to construct
313 NT Security Identifiers.
316 <para>Setting this option to a larger value could be useful to sites
317 transitioning from WinNT and Win2k, as existing user and
318 group rids would otherwise clash with sytem users etc.
321 <para>All UIDs and GIDs must be able to be resolved into SIDs for
322 the correct operation of ACLs on the server. As such the algorithmic
323 mapping can't be 'turned off', but pushing it 'out of the way' should
324 resolve the issues. Users and groups can then be assigned 'low' RIDs
325 in arbitary-rid supporting backends.
328 <para>Default: <emphasis><parameter>algorithmic rid base</parameter> = 1000
331 <para>Example: <emphasis><parameter>algorithmic rid base</parameter> = 100000
334 </listitem></varlistentry>
336 <indexterm significance="preferred"><primary>allocation roundup size</primary></indexterm><term><anchor id="ALLOCATIONROUNDUPSIZE"/>allocation roundup size (S)</term><listitem>
337 <para>This parameter allows an administrator to tune the
338 allocation size reported to Windows clients. The default
339 size of 1Mb generally results in improved Windows client
340 performance. However, rounding the allocation size may cause
341 difficulties for some applications, e.g. MS Visual Studio.
342 If the MS Visual Studio compiler starts to crash with an
343 internal error, set this parameter to zero for this share.
346 <para>The integer parameter specifies the roundup size in bytes.</para>
348 <para>Default: <emphasis><parameter>allocation roundup size</parameter> = 1048576
351 <para>Example: <emphasis><parameter>allocation roundup size</parameter> = 0
352 # (to disable roundups)
355 </listitem></varlistentry>
357 <indexterm significance="preferred"><primary>allow trusted domains</primary></indexterm><term><anchor id="ALLOWTRUSTEDDOMAINS"/>allow trusted domains (G)</term><listitem>
358 <para>This option only takes effect when the <link linkend="SECURITY">
359 <parameter moreinfo="none">security</parameter></link> option is set to
360 <constant>server</constant> or <constant>domain</constant>.
361 If it is set to no, then attempts to connect to a resource from
362 a domain or workgroup other than the one which smbd is running
363 in will fail, even if that domain is trusted by the remote server
364 doing the authentication.</para>
366 <para>This is useful if you only want your Samba server to
367 serve resources to users in the domain it is a member of. As
368 an example, suppose that there are two domains DOMA and DOMB. DOMB
369 is trusted by DOMA, which contains the Samba server. Under normal
370 circumstances, a user with an account in DOMB can then access the
371 resources of a UNIX account with the same account name on the
372 Samba server even if they do not have an account in DOMA. This
373 can make implementing a security boundary difficult.</para>
375 <para>Default: <emphasis><parameter>allow trusted domains</parameter> = yes
379 </listitem></varlistentry>
381 <indexterm significance="preferred"><primary>announce as</primary></indexterm><term><anchor id="ANNOUNCEAS"/>announce as (G)</term><listitem>
382 <para>This specifies what type of server <citerefentry><refentrytitle>nmbd</refentrytitle>
383 <manvolnum>8</manvolnum></citerefentry> will announce itself as, to a network neighborhood browse
384 list. By default this is set to Windows NT. The valid options
385 are : "NT Server" (which can also be written as "NT"),
386 "NT Workstation", "Win95" or "WfW" meaning Windows NT Server,
387 Windows NT Workstation, Windows 95 and Windows for Workgroups
388 respectively. Do not change this parameter unless you have a
389 specific need to stop Samba appearing as an NT server as this
390 may prevent Samba servers from participating as browser servers
393 <para>Default: <emphasis><parameter>announce as</parameter> = NT Server
396 <para>Example: <emphasis><parameter>announce as</parameter> = Win95
399 </listitem></varlistentry>
401 <indexterm significance="preferred"><primary>announce version</primary></indexterm><term><anchor id="ANNOUNCEVERSION"/>announce version (G)</term><listitem>
402 <para>This specifies the major and minor version numbers
403 that nmbd will use when announcing itself as a server. The default
404 is 4.9. Do not change this parameter unless you have a specific
405 need to set a Samba server to be a downlevel server.</para>
407 <para>Default: <emphasis><parameter>announce version</parameter> = 4.9
410 <para>Example: <emphasis><parameter>announce version</parameter> = 2.0
413 </listitem></varlistentry>
415 <indexterm significance="preferred"><primary>auth methods</primary></indexterm><term><anchor id="AUTHMETHODS"/>auth methods (G)</term><listitem>
416 <para>This option allows the administrator to chose what
417 authentication methods <command moreinfo="none">smbd</command> will use when authenticating
418 a user. This option defaults to sensible values based on <link linkend="SECURITY">
419 <parameter moreinfo="none">security</parameter></link>. This should be considered
420 a developer option and used only in rare circumstances. In the majority (if not all)
421 of production servers, the default setting should be adequate.</para>
423 <para>Each entry in the list attempts to authenticate the user in turn, until
424 the user authenticates. In practice only one method will ever actually
425 be able to complete the authentication.
428 <para>Possible options include <constant>guest</constant> (anonymous access),
429 <constant>sam</constant> (lookups in local list of accounts based on netbios
430 name or domain name), <constant>winbind</constant> (relay authentication requests
431 for remote users through winbindd), <constant>ntdomain</constant> (pre-winbindd
432 method of authentication for remote domain users; deprecated in favour of winbind method),
433 <constant>trustdomain</constant> (authenticate trusted users by contacting the
434 remote DC directly from smbd; deprecated in favour of winbind method).</para>
436 <para>Default: <emphasis><parameter>auth methods</parameter> =
439 <para>Example: <emphasis><parameter>auth methods</parameter> = guest sam winbind
442 </listitem></varlistentry>
444 <indexterm significance="preferred"><primary>available</primary></indexterm><term><anchor id="AVAILABLE"/>available (S)</term><listitem>
445 <para>This parameter lets you "turn off" a service. If
446 <parameter moreinfo="none">available = no</parameter>, then <emphasis>ALL</emphasis>
447 attempts to connect to the service will fail. Such failures are
451 <para>Default: <emphasis><parameter>available</parameter> = yes
455 </listitem></varlistentry>
457 <indexterm significance="preferred"><primary>bind interfaces only</primary></indexterm><term><anchor id="BINDINTERFACESONLY"/>bind interfaces only (G)</term><listitem>
458 <para>This global parameter allows the Samba admin
459 to limit what interfaces on a machine will serve SMB requests. It
460 affects file service <citerefentry><refentrytitle>smbd</refentrytitle>
461 <manvolnum>8</manvolnum></citerefentry> and name service <citerefentry><refentrytitle>nmbd</refentrytitle>
462 <manvolnum>8</manvolnum></citerefentry> in a slightly different ways.</para>
464 <para>For name service it causes <command moreinfo="none">nmbd</command> to bind
465 to ports 137 and 138 on the interfaces listed in
466 the <link linkend="INTERFACES">interfaces</link> parameter. <command moreinfo="none">nmbd</command> also
467 binds to the "all addresses" interface (0.0.0.0)
468 on ports 137 and 138 for the purposes of reading broadcast messages.
469 If this option is not set then <command moreinfo="none">nmbd</command> will service
470 name requests on all of these sockets. If <parameter moreinfo="none">bind interfaces
471 only</parameter> is set then <command moreinfo="none">nmbd</command> will check the
472 source address of any packets coming in on the broadcast sockets
473 and discard any that don't match the broadcast addresses of the
474 interfaces in the <parameter moreinfo="none">interfaces</parameter> parameter list.
475 As unicast packets are received on the other sockets it allows
476 <command moreinfo="none">nmbd</command> to refuse to serve names to machines that
477 send packets that arrive through any interfaces not listed in the
478 <parameter moreinfo="none">interfaces</parameter> list. IP Source address spoofing
479 does defeat this simple check, however, so it must not be used
480 seriously as a security feature for <command moreinfo="none">nmbd</command>.</para>
482 <para>For file service it causes <citerefentry><refentrytitle>smbd</refentrytitle>
483 <manvolnum>8</manvolnum></citerefentry> to bind only to the interface list
484 given in the <link linkend="INTERFACES">interfaces</link> parameter. This
485 restricts the networks that <command moreinfo="none">smbd</command> will serve
486 to packets coming in those interfaces. Note that you should not use this parameter
487 for machines that are serving PPP or other intermittent or non-broadcast network
488 interfaces as it will not cope with non-permanent interfaces.</para>
490 <para>If <parameter moreinfo="none">bind interfaces only</parameter> is set then
491 unless the network address <emphasis>127.0.0.1</emphasis> is added
492 to the <parameter moreinfo="none">interfaces</parameter> parameter
493 list <citerefentry><refentrytitle>smbpasswd</refentrytitle>
494 <manvolnum>8</manvolnum></citerefentry> and <citerefentry><refentrytitle>swat</refentrytitle>
495 <manvolnum>8</manvolnum></citerefentry> may not work as expected due
496 to the reasons covered below.</para>
498 <para>To change a users SMB password, the <command moreinfo="none">smbpasswd</command>
499 by default connects to the <emphasis>localhost - 127.0.0.1</emphasis>
500 address as an SMB client to issue the password change request. If
501 <parameter moreinfo="none">bind interfaces only</parameter> is set then unless the
502 network address <emphasis>127.0.0.1</emphasis> is added to the
503 <parameter moreinfo="none">interfaces</parameter> parameter list then <command moreinfo="none">
504 smbpasswd</command> will fail to connect in it's default mode.
505 <command moreinfo="none">smbpasswd</command> can be forced to use the primary IP interface
506 of the local host by using its <citerefentry><refentrytitle>smbpasswd</refentrytitle>
507 <manvolnum>8</manvolnum></citerefentry> <parameter moreinfo="none">-r <replaceable>remote machine</replaceable></parameter>
508 parameter, with <replaceable>remote machine</replaceable> set
509 to the IP name of the primary interface of the local host.</para>
511 <para>The <command moreinfo="none">swat</command> status page tries to connect with
512 <command moreinfo="none">smbd</command> and <command moreinfo="none">nmbd</command> at the address
513 <emphasis>127.0.0.1</emphasis> to determine if they are running.
514 Not adding <emphasis>127.0.0.1</emphasis> will cause <command moreinfo="none">
515 smbd</command> and <command moreinfo="none">nmbd</command> to always show
516 "not running" even if they really are. This can prevent <command moreinfo="none">
517 swat</command> from starting/stopping/restarting <command moreinfo="none">smbd</command>
518 and <command moreinfo="none">nmbd</command>.</para>
521 <para>Default: <emphasis><parameter>bind interfaces only</parameter> = no
525 </listitem></varlistentry>
527 <indexterm significance="preferred"><primary>blocking locks</primary></indexterm><term><anchor id="BLOCKINGLOCKS"/>blocking locks (S)</term><listitem>
528 <para>This parameter controls the behavior
529 of <citerefentry><refentrytitle>smbd</refentrytitle>
530 <manvolnum>8</manvolnum></citerefentry> when given a request by a client
531 to obtain a byte range lock on a region of an open file, and the
532 request has a time limit associated with it.</para>
534 <para>If this parameter is set and the lock range requested
535 cannot be immediately satisfied, samba will internally
536 queue the lock request, and periodically attempt to obtain
537 the lock until the timeout period expires.</para>
539 <para>If this parameter is set to <constant>no</constant>, then
540 samba will behave as previous versions of Samba would and
541 will fail the lock request immediately if the lock range
542 cannot be obtained.</para>
545 <para>Default: <emphasis><parameter>blocking locks</parameter> = yes
549 </listitem></varlistentry>
551 <indexterm significance="preferred"><primary>block size</primary></indexterm><term><anchor id="BLOCKSIZE"/>block size (S)</term><listitem>
552 <para>This parameter controls the behavior of <citerefentry><refentrytitle>smbd</refentrytitle>
553 <manvolnum>8</manvolnum></citerefentry> when reporting disk free
554 sizes. By default, this reports a disk block size of 1024 bytes.
557 <para>Changing this parameter may have some effect on the
558 efficiency of client writes, this is not yet confirmed. This
559 parameter was added to allow advanced administrators to change
560 it (usually to a higher value) and test the effect it has on
561 client write performance without re-compiling the code. As this
562 is an experimental option it may be removed in a future release.
565 <para>Changing this option does not change the disk free reporting
566 size, just the block size unit reported to the client.
569 <para><emphasis>No default</emphasis></para>
571 </listitem></varlistentry>
573 <indexterm significance="preferred"><primary>browsable</primary><see>browseable</see></indexterm><term><anchor id="BROWSABLE"/>browsable</term><listitem><para>This parameter is a synonym for browseable.</para></listitem></varlistentry><varlistentry>
574 <indexterm significance="preferred"><primary>browseable</primary></indexterm><term><anchor id="BROWSEABLE"/>browseable (S)</term><listitem>
575 <para>This controls whether this share is seen in
576 the list of available shares in a net view and in the browse list.</para>
579 <para>Default: <emphasis><parameter>browseable</parameter> = yes
583 </listitem></varlistentry>
585 <indexterm significance="preferred"><primary>browse list</primary></indexterm><term><anchor id="BROWSELIST"/>browse list (G)</term><listitem>
586 <para>This controls whether <citerefentry><refentrytitle>smbd</refentrytitle>
587 <manvolnum>8</manvolnum></citerefentry> will serve a browse list to
588 a client doing a <command moreinfo="none">NetServerEnum</command> call. Normally
589 set to <constant>yes</constant>. You should never need to change
593 <para>Default: <emphasis><parameter>browse list</parameter> = yes
597 </listitem></varlistentry>
599 <indexterm significance="preferred"><primary>casesignames</primary><see>case sensitive</see></indexterm><term><anchor id="CASESIGNAMES"/>casesignames</term><listitem><para>This parameter is a synonym for case sensitive.</para></listitem></varlistentry><varlistentry>
600 <indexterm significance="preferred"><primary>case sensitive</primary></indexterm><term><anchor id="CASESENSITIVE"/>case sensitive (S)</term><listitem>
601 <para>See the discussion in the section <link linkend="NAMEMANGLINGSECT">NAME MANGLING</link>.</para>
603 <para>Default: <emphasis><parameter>case sensitive</parameter> = no
607 </listitem></varlistentry>
609 <indexterm significance="preferred"><primary>change notify timeout</primary></indexterm><term><anchor id="CHANGENOTIFYTIMEOUT"/>change notify timeout (G)</term><listitem>
610 <para>This SMB allows a client to tell a server to
611 "watch" a particular directory for any changes and only reply to
612 the SMB request when a change has occurred. Such constant scanning of
613 a directory is expensive under UNIX, hence an <citerefentry><refentrytitle>smbd</refentrytitle>
614 <manvolnum>8</manvolnum></citerefentry> daemon only performs such a scan
615 on each requested directory once every <parameter moreinfo="none">change notify
616 timeout</parameter> seconds.</para>
618 <para>Default: <emphasis><parameter>change notify timeout</parameter> = 60
621 <para>Example: <emphasis><parameter>change notify timeout</parameter> = 300
622 # Would change the scan time to every 5 minutes.
625 </listitem></varlistentry>
627 <indexterm significance="preferred"><primary>change share command</primary></indexterm><term><anchor id="CHANGESHARECOMMAND"/>change share command (G)</term><listitem>
628 <para>Samba 2.2.0 introduced the ability to dynamically
629 add and delete shares via the Windows NT 4.0 Server Manager. The
630 <parameter moreinfo="none">change share command</parameter> is used to define an
631 external program or script which will modify an existing service definition
632 in <filename moreinfo="none">smb.conf</filename>. In order to successfully
633 execute the <parameter moreinfo="none">change share command</parameter>, <command moreinfo="none">smbd</command>
634 requires that the administrator be connected using a root account (i.e.
639 When executed, <command moreinfo="none">smbd</command> will automatically invoke the
640 <parameter moreinfo="none">change share command</parameter> with four parameters.
645 <para><parameter moreinfo="none">configFile</parameter> - the location
646 of the global <filename moreinfo="none">smb.conf</filename> file.
651 <para><parameter moreinfo="none">shareName</parameter> - the name of the new
657 <para><parameter moreinfo="none">pathName</parameter> - path to an **existing**
663 <para><parameter moreinfo="none">comment</parameter> - comment string to associate
670 This parameter is only used modify existing file shares definitions. To modify
671 printer shares, use the "Printers..." folder as seen when browsing the Samba host.
674 <para>Default: <emphasis><parameter>change share command</parameter> =
677 <para>Example: <emphasis><parameter>change share command</parameter> = /usr/local/bin/addshare
680 </listitem></varlistentry>
682 <indexterm significance="preferred"><primary>check password script</primary></indexterm><term><anchor id="CHECKPASSWORDSCRIPT"/>check password script (G)</term><listitem>
683 <para>The name of a program that can be used to check password
684 complexity. The password is sent to the program's standrad input.</para>
686 <para>The program must return 0 on good password any other value otherwise.
687 In case the password is considered weak (the program do not return 0) the
688 user will be notified and the password change will fail.</para>
690 <para>Note: In the example directory there is a sample program called crackcheck
691 that uses cracklib to checkpassword quality</para>.
694 <para>Default: <emphasis><parameter>check password script</parameter> = Disabled
697 <para>Example: <emphasis><parameter>check password script</parameter> = check password script = /usr/local/sbin/crackcheck
700 </listitem></varlistentry>
702 <indexterm significance="preferred"><primary>client lanman auth</primary></indexterm><term><anchor id="CLIENTLANMANAUTH"/>client lanman auth (G)</term><listitem>
703 <para>This parameter determines whether or not <citerefentry><refentrytitle>smbclient</refentrytitle>
704 <manvolnum>8</manvolnum></citerefentry> and other samba client
705 tools will attempt to authenticate itself to servers using the
706 weaker LANMAN password hash. If disabled, only server which support NT
707 password hashes (e.g. Windows NT/2000, Samba, etc... but not
708 Windows 95/98) will be able to be connected from the Samba client.</para>
710 <para>The LANMAN encrypted response is easily broken, due to it's
711 case-insensitive nature, and the choice of algorithm. Clients
712 without Windows 95/98 servers are advised to disable
715 <para>Disabling this option will also disable the <command moreinfo="none">client plaintext auth</command> option</para>
717 <para>Likewise, if the <command moreinfo="none">client ntlmv2
718 auth</command> parameter is enabled, then only NTLMv2 logins will be
721 <para>Default: <emphasis><parameter>client lanman auth</parameter> = yes
725 </listitem></varlistentry>
727 <indexterm significance="preferred"><primary>client ntlmv2 auth</primary></indexterm><term><anchor id="CLIENTNTLMV2AUTH"/>client ntlmv2 auth (G)</term><listitem>
728 <para>This parameter determines whether or not <citerefentry><refentrytitle>smbclient</refentrytitle>
729 <manvolnum>8</manvolnum></citerefentry> will attempt to
730 authenticate itself to servers using the NTLMv2 encrypted password
733 <para>If enabled, only an NTLMv2 and LMv2 response (both much more
734 secure than earlier versions) will be sent. Many servers
735 (including NT4 < SP4, Win9x and Samba 2.2) are not compatible with
738 <para>Similarly, if enabled, NTLMv1, <command moreinfo="none">client lanman auth</command> and <command moreinfo="none">client plaintext auth</command>
739 authentication will be disabled. This also disables share-level
740 authentication. </para>
742 <para>If disabled, an NTLM response (and possibly a LANMAN response)
743 will be sent by the client, depending on the value of <command moreinfo="none">client lanman auth</command>. </para>
745 <para>Note that some sites (particularly
746 those following 'best practice' security polices) only allow NTLMv2
747 responses, and not the weaker LM or NTLM.</para>
749 <para>Default: <emphasis><parameter>client ntlmv2 auth</parameter> = no
753 </listitem></varlistentry>
755 <indexterm significance="preferred"><primary>client plaintext auth</primary></indexterm><term><anchor id="CLIENTPLAINTEXTAUTH"/>client plaintext auth (G)</term><listitem>
756 <para>Specifies whether a client should send a plaintext
757 password if the server does not support encrypted passwords.</para>
759 <para>Default: <emphasis><parameter>client plaintext auth</parameter> = yes
763 </listitem></varlistentry>
765 <indexterm significance="preferred"><primary>client schannel</primary></indexterm><term><anchor id="CLIENTSCHANNEL"/>client schannel (G)</term><listitem>
767 <para>This controls whether the client offers or even
768 demands the use of the netlogon schannel.
769 <parameter>client schannel = no</parameter> does not
770 offer the schannel, <parameter>client schannel =
771 auto</parameter> offers the schannel but does not
772 enforce it, and <parameter>client schannel =
773 yes</parameter> denies access if the server is not
774 able to speak netlogon schannel. </para>
776 <para>Default: <emphasis><parameter>client schannel</parameter> = auto
779 <para>Example: <emphasis><parameter>client schannel</parameter> = yes
782 </listitem></varlistentry>
784 <indexterm significance="preferred"><primary>client signing</primary></indexterm><term><anchor id="CLIENTSIGNING"/>client signing (G)</term><listitem>
785 <para>This controls whether the client offers or requires
786 the server it talks to to use SMB signing. Possible values
787 are <emphasis>auto</emphasis>, <emphasis>mandatory</emphasis>
788 and <emphasis>disabled</emphasis>.
791 <para>When set to auto, SMB signing is offered, but not enforced.
792 When set to mandatory, SMB signing is required and if set
793 to disabled, SMB signing is not offered either.</para>
795 <para>Default: <emphasis><parameter>client signing</parameter> = auto
799 </listitem></varlistentry>
801 <indexterm significance="preferred"><primary>client use spnego</primary></indexterm><term><anchor id="CLIENTUSESPNEGO"/>client use spnego (G)</term><listitem>
802 <para> This variable controls whether Samba clients will try
803 to use Simple and Protected NEGOciation (as specified by rfc2478) with
804 supporting servers (including WindowsXP, Windows2000 and Samba
805 3.0) to agree upon an authentication
806 mechanism. This enables Kerberos authentication in particular.</para>
808 <para>Default: <emphasis><parameter>client use spnego</parameter> = yes
812 </listitem></varlistentry>
814 <indexterm significance="preferred"><primary>comment</primary></indexterm><term><anchor id="COMMENT"/>comment (S)</term><listitem>
815 <para>This is a text field that is seen next to a share
816 when a client does a queries the server, either via the network
817 neighborhood or via <command moreinfo="none">net view</command> to list what shares
818 are available.</para>
820 <para>If you want to set the string that is displayed next to the
821 machine name then see the <link linkend="SERVERSTRING"><parameter moreinfo="none">
822 server string</parameter></link> parameter.</para>
825 <para>Default: <emphasis><parameter>comment</parameter> =
829 <para>Example: <emphasis><parameter>comment</parameter> = Fred's Files
832 </listitem></varlistentry>
834 <indexterm significance="preferred"><primary>config file</primary></indexterm><term><anchor id="CONFIGFILE"/>config file (G)</term><listitem>
835 <para>This allows you to override the config file
836 to use, instead of the default (usually <filename moreinfo="none">smb.conf</filename>).
837 There is a chicken and egg problem here as this option is set
838 in the config file!</para>
840 <para>For this reason, if the name of the config file has changed
841 when the parameters are loaded then it will reload them from
842 the new config file.</para>
844 <para>This option takes the usual substitutions, which can
845 be very useful.</para>
847 <para>If the config file doesn't exist then it won't be loaded
848 (allowing you to special case the config files of just a few
851 <para><emphasis>No default</emphasis></para>
852 <para>Example: <emphasis><parameter>config file</parameter> = /usr/local/samba/lib/smb.conf.%m
855 </listitem></varlistentry>
857 <indexterm significance="preferred"><primary>copy</primary></indexterm><term><anchor id="COPY"/>copy (S)</term><listitem>
858 <para>This parameter allows you to "clone" service
859 entries. The specified service is simply duplicated under the
860 current service's name. Any parameters specified in the current
861 section will override those in the section being copied.</para>
863 <para>This feature lets you set up a 'template' service and
864 create similar services easily. Note that the service being
865 copied must occur earlier in the configuration file than the
866 service doing the copying.</para>
868 <para>Default: <emphasis><parameter>copy</parameter> =
871 <para>Example: <emphasis><parameter>copy</parameter> = otherservice
874 </listitem></varlistentry>
876 <indexterm significance="preferred"><primary>create mode</primary><see>create mask</see></indexterm><term><anchor id="CREATEMODE"/>create mode</term><listitem><para>This parameter is a synonym for create mask.</para></listitem></varlistentry><varlistentry>
877 <indexterm significance="preferred"><primary>create mask</primary></indexterm><term><anchor id="CREATEMASK"/>create mask (S)</term><listitem>
878 <para>When a file is created, the necessary permissions are
879 calculated according to the mapping from DOS modes to UNIX
880 permissions, and the resulting UNIX mode is then bit-wise 'AND'ed
881 with this parameter. This parameter may be thought of as a bit-wise
882 MASK for the UNIX modes of a file. Any bit <emphasis>not</emphasis>
883 set here will be removed from the modes set on a file when it is
886 <para>The default value of this parameter removes the
887 'group' and 'other' write and execute bits from the UNIX modes.</para>
889 <para>Following this Samba will bit-wise 'OR' the UNIX mode created
890 from this parameter with the value of the <link linkend="FORCECREATEMODE">
891 <parameter moreinfo="none">force create mode</parameter></link>
892 parameter which is set to 000 by default.</para>
894 <para>This parameter does not affect directory modes. See the
895 parameter <link linkend="DIRECTORYMODE"><parameter moreinfo="none">directory mode
896 </parameter></link> for details.</para>
898 <para>Note that this parameter does not apply to permissions
899 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
900 a mask on access control lists also, they need to set the <link linkend="SECURITYMASK">
901 <parameter moreinfo="none">security mask</parameter></link>.</para>
903 <para>Default: <emphasis><parameter>create mask</parameter> = 0744
906 <para>Example: <emphasis><parameter>create mask</parameter> = 0775
909 </listitem></varlistentry>
911 <indexterm significance="preferred"><primary>csc policy</primary></indexterm><term><anchor id="CSCPOLICY"/>csc policy (S)</term><listitem>
912 <para>This stands for <emphasis>client-side caching
913 policy</emphasis>, and specifies how clients capable of offline
914 caching will cache the files in the share. The valid values
915 are: manual, documents, programs, disable.</para>
917 <para>These values correspond to those used on Windows servers.</para>
919 <para>For example, shares containing roaming profiles can have
920 offline caching disabled using <command moreinfo="none">csc policy = disable</command>.</para>
922 <para>Default: <emphasis><parameter>csc policy</parameter> = manual
925 <para>Example: <emphasis><parameter>csc policy</parameter> = programs
928 </listitem></varlistentry>
930 <indexterm significance="preferred"><primary>cups options</primary></indexterm><term><anchor id="CUPSOPTIONS"/>cups options (S)</term><listitem>
931 <para>This parameter is only applicable if <link linkend="PRINTING"><parameter moreinfo="none">printing</parameter></link> is
932 set to <constant>cups</constant>. Its value is a free form string of options
933 passed directly to the cups library.
936 <para>You can pass any generic print option known to CUPS (as listed
937 in the CUPS "Software Users' Manual"). You can also pass any printer
938 specific option (as listed in "lpoptions -d printername -l")
939 valid for the target queue.</para>
941 <para>You should set this parameter to <constant>raw</constant> if your CUPS server
942 <filename>error_log</filename> file contains messages such as
943 "Unsupported format 'application/octet-stream'" when printing from a Windows client
944 through Samba. It is no longer necessary to enable
945 system wide raw printing in <filename>/etc/cups/mime.{convs,types}</filename>.
949 <para>Default: <emphasis><parameter>cups options</parameter> = ""
952 <para>Example: <emphasis><parameter>cups options</parameter> = "raw,media=a4,job-sheets=secret,secret"
955 </listitem></varlistentry>
957 <indexterm significance="preferred"><primary>cups server</primary></indexterm><term><anchor id="CUPSSERVER"/>cups server (G)</term><listitem>
958 <para>This parameter is only applicable if <link linkend="PRINTING"><parameter moreinfo="none">printing</parameter></link> is
959 set to <constant>cups</constant>.
962 <para>If set, this option overrides the ServerName option in the CUPS
963 <filename>client.conf</filename>. This is necessary if you have virtual
964 samba servers that connect to different CUPS daemons.</para>
966 <para>Default: <emphasis><parameter>cups server</parameter> = ""
969 <para>Example: <emphasis><parameter>cups server</parameter> = MYCUPSSERVER
972 </listitem></varlistentry>
974 <indexterm significance="preferred"><primary>deadtime</primary></indexterm><term><anchor id="DEADTIME"/>deadtime (G)</term><listitem>
975 <para>The value of the parameter (a decimal integer)
976 represents the number of minutes of inactivity before a connection
977 is considered dead, and it is disconnected. The deadtime only takes
978 effect if the number of open files is zero.</para>
980 <para>This is useful to stop a server's resources being
981 exhausted by a large number of inactive connections.</para>
983 <para>Most clients have an auto-reconnect feature when a
984 connection is broken so in most cases this parameter should be
985 transparent to users.</para>
987 <para>Using this parameter with a timeout of a few minutes
988 is recommended for most systems.</para>
990 <para>A deadtime of zero indicates that no auto-disconnection
991 should be performed.</para>
993 <para>Default: <emphasis><parameter>deadtime</parameter> = 0
996 <para>Example: <emphasis><parameter>deadtime</parameter> = 15
999 </listitem></varlistentry>
1001 <indexterm significance="preferred"><primary>debug hires timestamp</primary></indexterm><term><anchor id="DEBUGHIRESTIMESTAMP"/>debug hires timestamp (G)</term><listitem>
1002 <para>Sometimes the timestamps in the log messages
1003 are needed with a resolution of higher that seconds, this
1004 boolean parameter adds microsecond resolution to the timestamp
1005 message header when turned on.</para>
1007 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter moreinfo="none">
1008 debug timestamp</parameter></link> must be on for this to have an
1012 <para>Default: <emphasis><parameter>debug hires timestamp</parameter> = no
1016 </listitem></varlistentry>
1018 <indexterm significance="preferred"><primary>debug pid</primary></indexterm><term><anchor id="DEBUGPID"/>debug pid (G)</term><listitem>
1019 <para>When using only one log file for more then one forked
1020 <citerefentry><refentrytitle>smbd</refentrytitle>
1021 <manvolnum>8</manvolnum></citerefentry>-process there may be hard to
1022 follow which process outputs which message. This boolean parameter
1023 is adds the process-id to the timestamp message headers in the
1024 logfile when turned on.</para>
1026 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter moreinfo="none">
1027 debug timestamp</parameter></link> must be on for this to have an
1030 <para>Default: <emphasis><parameter>debug pid</parameter> = no
1034 </listitem></varlistentry>
1036 <indexterm significance="preferred"><primary>timestamp logs</primary><see>debug timestamp</see></indexterm><term><anchor id="TIMESTAMPLOGS"/>timestamp logs</term><listitem><para>This parameter is a synonym for debug timestamp.</para></listitem></varlistentry><varlistentry>
1037 <indexterm significance="preferred"><primary>debug timestamp</primary></indexterm><term><anchor id="DEBUGTIMESTAMP"/>debug timestamp (G)</term><listitem>
1038 <para>Samba debug log messages are timestamped
1039 by default. If you are running at a high <link linkend="DEBUGLEVEL">
1040 <parameter moreinfo="none">debug level</parameter></link> these timestamps
1041 can be distracting. This boolean parameter allows timestamping
1042 to be turned off.</para>
1044 <para>Default: <emphasis><parameter>debug timestamp</parameter> = yes
1048 </listitem></varlistentry>
1050 <indexterm significance="preferred"><primary>debug uid</primary></indexterm><term><anchor id="DEBUGUID"/>debug uid (G)</term><listitem>
1051 <para>Samba is sometimes run as root and sometime
1052 run as the connected user, this boolean parameter inserts the
1053 current euid, egid, uid and gid to the timestamp message headers
1054 in the log file if turned on.</para>
1056 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter moreinfo="none">
1057 debug timestamp</parameter></link> must be on for this to have an
1060 <para>Default: <emphasis><parameter>debug uid</parameter> = no
1064 </listitem></varlistentry>
1066 <indexterm significance="preferred"><primary>default case</primary></indexterm><term><anchor id="DEFAULTCASE"/>default case (S)</term><listitem>
1067 <para>See the section on <link linkend="NAMEMANGLINGSECT">
1068 NAME MANGLING</link>. Also note the <link linkend="SHORTPRESERVECASE">
1069 <parameter moreinfo="none">short preserve case</parameter></link> parameter.</para>
1071 <para>Default: <emphasis><parameter>default case</parameter> = lower
1075 </listitem></varlistentry>
1077 <indexterm significance="preferred"><primary>default devmode</primary></indexterm><term><anchor id="DEFAULTDEVMODE"/>default devmode (S)</term><listitem>
1078 <para>This parameter is only applicable to <link linkend="PRINTOK">printable</link> services.
1079 When smbd is serving Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba
1080 server has a Device Mode which defines things such as paper size and
1081 orientation and duplex settings. The device mode can only correctly be
1082 generated by the printer driver itself (which can only be executed on a
1083 Win32 platform). Because smbd is unable to execute the driver code
1084 to generate the device mode, the default behavior is to set this field
1088 <para>Most problems with serving printer drivers to Windows NT/2k/XP clients
1089 can be traced to a problem with the generated device mode. Certain drivers
1090 will do things such as crashing the client's Explorer.exe with a NULL devmode.
1091 However, other printer drivers can cause the client's spooler service
1092 (spoolsv.exe) to die if the devmode was not created by the driver itself
1093 (i.e. smbd generates a default devmode).
1096 <para>This parameter should be used with care and tested with the printer
1097 driver in question. It is better to leave the device mode to NULL
1098 and let the Windows client set the correct values. Because drivers do not
1099 do this all the time, setting <command moreinfo="none">default devmode = yes</command>
1100 will instruct smbd to generate a default one.
1103 <para>For more information on Windows NT/2k printing and Device Modes,
1104 see the <ulink url="http://msdn.microsoft.com/">MSDN documentation</ulink>.
1107 <para>Default: <emphasis><parameter>default devmode</parameter> = no
1111 </listitem></varlistentry>
1113 <indexterm significance="preferred"><primary>default</primary><see>default service</see></indexterm><term><anchor id="DEFAULT"/>default</term><listitem><para>This parameter is a synonym for default service.</para></listitem></varlistentry><varlistentry>
1114 <indexterm significance="preferred"><primary>default service</primary></indexterm><term><anchor id="DEFAULTSERVICE"/>default service (G)</term><listitem>
1115 <para>This parameter specifies the name of a service
1116 which will be connected to if the service actually requested cannot
1117 be found. Note that the square brackets are <emphasis>NOT</emphasis>
1118 given in the parameter value (see example below).</para>
1120 <para>There is no default value for this parameter. If this
1121 parameter is not given, attempting to connect to a nonexistent
1122 service results in an error.</para>
1124 <para>Typically the default service would be a <link linkend="GUESTOK">
1125 <parameter moreinfo="none">guest ok</parameter></link>, <link linkend="READONLY">
1126 <parameter moreinfo="none">read-only</parameter></link> service.</para>
1128 <para>Also note that the apparent service name will be changed
1129 to equal that of the requested service, this is very useful as it
1130 allows you to use macros like <parameter moreinfo="none">%S</parameter> to make
1131 a wildcard service.</para>
1133 <para>Note also that any "_" characters in the name of the service
1134 used in the default service will get mapped to a "/". This allows for
1135 interesting things.</para>
1137 <para>Default: <emphasis><parameter>default service</parameter> =
1140 <para>Example: <emphasis><parameter>default service</parameter> = pub
1143 </listitem></varlistentry>
1145 <indexterm significance="preferred"><primary>defer sharing violations</primary></indexterm><term><anchor id="DEFERSHARINGVIOLATIONS"/>defer sharing violations (G)</term><listitem>
1147 Windows allows specifying how a file will be shared with
1148 other processes when it is opened. Sharing violations occur when
1149 a file is opened by a different process using options that violate
1150 the share settings specified by other processes. This parameter causes
1151 smbd to act as a Windows server does, and defer returning a "sharing
1152 violation" error message for up to one second, allowing the client
1153 to close the file causing the violation in the meantime.
1156 <para>Unix by default does not have this behaviour.</para>
1159 There should be no reason to turn off this parameter, as it is
1160 designed to enable Samba to more correctly emulate Windows.
1163 <para>Default: <emphasis><parameter>defer sharing violations</parameter> = True
1167 </listitem></varlistentry>
1169 <indexterm significance="preferred"><primary>delete group script</primary></indexterm><term><anchor id="DELETEGROUPSCRIPT"/>delete group script (G)</term><listitem>
1170 <para>This is the full pathname to a script that will
1171 be run <emphasis>AS ROOT</emphasis> <citerefentry><refentrytitle>smbd</refentrytitle>
1172 <manvolnum>8</manvolnum></citerefentry> when a group is requested to be deleted.
1173 It will expand any <parameter moreinfo="none">%g</parameter> to the group name passed.
1174 This script is only useful for installations using the Windows NT domain administration tools.
1177 <para>Default: <emphasis><parameter>delete group script</parameter> =
1181 </listitem></varlistentry>
1183 <indexterm significance="preferred"><primary>deleteprinter command</primary></indexterm><term><anchor id="DELETEPRINTERCOMMAND"/>deleteprinter command (G)</term><listitem>
1184 <para>With the introduction of MS-RPC based printer
1185 support for Windows NT/2000 clients in Samba 2.2, it is now
1186 possible to delete printer at run time by issuing the
1187 DeletePrinter() RPC call.</para>
1189 <para>For a Samba host this means that the printer must be
1190 physically deleted from underlying printing system. The <parameter moreinfo="none">
1191 deleteprinter command</parameter> defines a script to be run which
1192 will perform the necessary operations for removing the printer
1193 from the print system and from <filename moreinfo="none">smb.conf</filename>.
1196 <para>The <parameter moreinfo="none">deleteprinter command</parameter> is
1197 automatically called with only one parameter: <parameter moreinfo="none">
1198 "printer name"</parameter>.</para>
1200 <para>Once the <parameter moreinfo="none">deleteprinter command</parameter> has
1201 been executed, <command moreinfo="none">smbd</command> will reparse the <filename moreinfo="none">
1202 smb.conf</filename> to associated printer no longer exists.
1203 If the sharename is still valid, then <command moreinfo="none">smbd
1204 </command> will return an ACCESS_DENIED error to the client.</para>
1206 <para>Default: <emphasis><parameter>deleteprinter command</parameter> =
1209 <para>Example: <emphasis><parameter>deleteprinter command</parameter> = /usr/bin/removeprinter
1212 </listitem></varlistentry>
1214 <indexterm significance="preferred"><primary>delete readonly</primary></indexterm><term><anchor id="DELETEREADONLY"/>delete readonly (S)</term><listitem>
1215 <para>This parameter allows readonly files to be deleted.
1216 This is not normal DOS semantics, but is allowed by UNIX.</para>
1218 <para>This option may be useful for running applications such
1219 as rcs, where UNIX file ownership prevents changing file
1220 permissions, and DOS semantics prevent deletion of a read only file.</para>
1222 <para>Default: <emphasis><parameter>delete readonly</parameter> = no
1226 </listitem></varlistentry>
1228 <indexterm significance="preferred"><primary>delete share command</primary></indexterm><term><anchor id="DELETESHARECOMMAND"/>delete share command (G)</term><listitem>
1229 <para>Samba 2.2.0 introduced the ability to dynamically
1230 add and delete shares via the Windows NT 4.0 Server Manager. The
1231 <parameter moreinfo="none">delete share command</parameter> is used to define an
1232 external program or script which will remove an existing service
1233 definition from <filename moreinfo="none">smb.conf</filename>. In order to successfully
1234 execute the <parameter moreinfo="none">delete share command</parameter>, <command moreinfo="none">smbd</command>
1235 requires that the administrator be connected using a root account (i.e.
1240 When executed, <command moreinfo="none">smbd</command> will automatically invoke the
1241 <parameter moreinfo="none">delete share command</parameter> with two parameters.
1246 <para><parameter moreinfo="none">configFile</parameter> - the location
1247 of the global <filename moreinfo="none">smb.conf</filename> file.
1252 <para><parameter moreinfo="none">shareName</parameter> - the name of
1253 the existing service.
1259 This parameter is only used to remove file shares. To delete printer shares,
1260 see the <link linkend="DELETEPRINTERCOMMAND"><parameter moreinfo="none">deleteprinter
1261 command</parameter></link>.
1264 <para>Default: <emphasis><parameter>delete share command</parameter> =
1267 <para>Example: <emphasis><parameter>delete share command</parameter> = /usr/local/bin/delshare
1270 </listitem></varlistentry>
1272 <indexterm significance="preferred"><primary>delete user from group script</primary></indexterm><term><anchor id="DELETEUSERFROMGROUPSCRIPT"/>delete user from group script (G)</term><listitem>
1273 <para>Full path to the script that will be called when
1274 a user is removed from a group using the Windows NT domain administration
1275 tools. It will be run by <citerefentry><refentrytitle>smbd</refentrytitle>
1276 <manvolnum>8</manvolnum></citerefentry> <emphasis>AS ROOT</emphasis>.
1277 Any <parameter moreinfo="none">%g</parameter> will be replaced with the group name and
1278 any <parameter moreinfo="none">%u</parameter> will be replaced with the user name.
1281 <para>Default: <emphasis><parameter>delete user from group script</parameter> =
1284 <para>Example: <emphasis><parameter>delete user from group script</parameter> = /usr/sbin/deluser %u %g
1287 </listitem></varlistentry>
1289 <indexterm significance="preferred"><primary>delete user script</primary></indexterm><term><anchor id="DELETEUSERSCRIPT"/>delete user script (G)</term><listitem>
1290 <para>This is the full pathname to a script that will
1291 be run by <citerefentry><refentrytitle>smbd</refentrytitle>
1292 <manvolnum>8</manvolnum></citerefentry> when managing users
1293 with remote RPC (NT) tools.
1296 <para>This script is called when a remote client removes a user
1297 from the server, normally using 'User Manager for Domains' or
1298 <command moreinfo="none">rpcclient</command>.</para>
1300 <para>This script should delete the given UNIX username.</para>
1302 <para>Default: <emphasis><parameter>delete user script</parameter> =
1305 <para>Example: <emphasis><parameter>delete user script</parameter> = /usr/local/samba/bin/del_user %u
1308 </listitem></varlistentry>
1310 <indexterm significance="preferred"><primary>delete veto files</primary></indexterm><term><anchor id="DELETEVETOFILES"/>delete veto files (S)</term><listitem>
1311 <para>This option is used when Samba is attempting to
1312 delete a directory that contains one or more vetoed directories
1313 (see the <link linkend="VETOFILES"><parameter moreinfo="none">veto files</parameter></link>
1314 option). If this option is set to <constant>no</constant> (the default) then if a vetoed
1315 directory contains any non-vetoed files or directories then the
1316 directory delete will fail. This is usually what you want.</para>
1318 <para>If this option is set to <constant>yes</constant>, then Samba
1319 will attempt to recursively delete any files and directories within
1320 the vetoed directory. This can be useful for integration with file
1321 serving systems such as NetAtalk which create meta-files within
1322 directories you might normally veto DOS/Windows users from seeing
1323 (e.g. <filename moreinfo="none">.AppleDouble</filename>)</para>
1325 <para>Setting <command moreinfo="none">delete veto files = yes</command> allows these
1326 directories to be transparently deleted when the parent directory
1327 is deleted (so long as the user has permissions to do so).</para>
1329 <para>Default: <emphasis><parameter>delete veto files</parameter> = no
1333 </listitem></varlistentry>
1335 <indexterm significance="preferred"><primary>dfree command</primary></indexterm><term><anchor id="DFREECOMMAND"/>dfree command (G)</term><listitem>
1337 <para>The <parameter moreinfo="none">dfree command</parameter> setting
1338 should only be used on systems where a problem occurs with the
1339 internal disk space calculations. This has been known to happen
1340 with Ultrix, but may occur with other operating systems. The
1341 symptom that was seen was an error of "Abort Retry
1342 Ignore" at the end of each directory listing.</para>
1344 <para>This setting allows the replacement of the internal routines to
1345 calculate the total disk space and amount available with an external
1346 routine. The example below gives a possible script that might fulfill
1347 this function.</para>
1349 <para>The external program will be passed a single parameter indicating
1350 a directory in the filesystem being queried. This will typically consist
1351 of the string <filename moreinfo="none">./</filename>. The script should return two
1352 integers in ASCII. The first should be the total disk space in blocks,
1353 and the second should be the number of available blocks. An optional
1354 third return value can give the block size in bytes. The default
1355 blocksize is 1024 bytes.</para>
1357 <para>Note: Your script should <emphasis>NOT</emphasis> be setuid or
1358 setgid and should be owned by (and writeable only by) root!</para>
1360 <para>Where the script dfree (which must be made executable) could be:</para>
1362 <para><programlisting format="linespecific">
1364 df $1 | tail -1 | awk '{print $2" "$4}'
1365 </programlisting></para>
1367 <para>or perhaps (on Sys V based systems):</para>
1369 <para><programlisting format="linespecific">
1371 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1372 </programlisting></para>
1374 <para>Note that you may have to replace the command names with full path names on some systems.</para>
1377 <para>Default: <emphasis><parameter>dfree command</parameter> =
1378 # By default internal routines for
1379 determining the disk capacity and remaining space will be used.
1382 <para>Example: <emphasis><parameter>dfree command</parameter> = /usr/local/samba/bin/dfree
1385 </listitem></varlistentry>
1387 <indexterm significance="preferred"><primary>directory mode</primary><see>directory mask</see></indexterm><term><anchor id="DIRECTORYMODE"/>directory mode</term><listitem><para>This parameter is a synonym for directory mask.</para></listitem></varlistentry><varlistentry>
1388 <indexterm significance="preferred"><primary>directory mask</primary></indexterm><term><anchor id="DIRECTORYMASK"/>directory mask (S)</term><listitem>
1389 <para>This parameter is the octal modes which are
1390 used when converting DOS modes to UNIX modes when creating UNIX
1393 <para>When a directory is created, the necessary permissions are
1394 calculated according to the mapping from DOS modes to UNIX permissions,
1395 and the resulting UNIX mode is then bit-wise 'AND'ed with this
1396 parameter. This parameter may be thought of as a bit-wise MASK for
1397 the UNIX modes of a directory. Any bit <emphasis>not</emphasis> set
1398 here will be removed from the modes set on a directory when it is
1401 <para>The default value of this parameter removes the 'group'
1402 and 'other' write bits from the UNIX mode, allowing only the
1403 user who owns the directory to modify it.</para>
1405 <para>Following this Samba will bit-wise 'OR' the UNIX mode
1406 created from this parameter with the value of the <link linkend="FORCEDIRECTORYMODE">
1407 <parameter moreinfo="none">force directory mode</parameter></link> parameter.
1408 This parameter is set to 000 by default (i.e. no extra mode bits are added).</para>
1410 <para>Note that this parameter does not apply to permissions
1411 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
1412 a mask on access control lists also, they need to set the <link linkend="DIRECTORYSECURITYMASK">
1413 <parameter moreinfo="none">directory security mask</parameter></link>.</para>
1415 <para>Default: <emphasis><parameter>directory mask</parameter> = 0755
1418 <para>Example: <emphasis><parameter>directory mask</parameter> = 0775
1421 </listitem></varlistentry>
1423 <indexterm significance="preferred"><primary>directory security mask</primary></indexterm><term><anchor id="DIRECTORYSECURITYMASK"/>directory security mask (S)</term><listitem>
1424 <para>This parameter controls what UNIX permission bits
1425 can be modified when a Windows NT client is manipulating the UNIX
1426 permission on a directory using the native NT security dialog
1429 <para>This parameter is applied as a mask (AND'ed with) to
1430 the changed permission bits, thus preventing any bits not in
1431 this mask from being modified. Essentially, zero bits in this
1432 mask may be treated as a set of bits the user is not allowed
1435 <para>If not set explicitly this parameter is set to 0777
1436 meaning a user is allowed to modify all the user/group/world
1437 permissions on a directory.</para>
1439 <para><emphasis>Note</emphasis> that users who can access the
1440 Samba server through other means can easily bypass this restriction,
1441 so it is primarily useful for standalone "appliance" systems.
1442 Administrators of most normal systems will probably want to leave
1443 it as the default of <constant>0777</constant>.</para>
1445 <para>Default: <emphasis><parameter>directory security mask</parameter> = 0777
1448 <para>Example: <emphasis><parameter>directory security mask</parameter> = 0700
1451 </listitem></varlistentry>
1453 <indexterm significance="preferred"><primary>disable netbios</primary></indexterm><term><anchor id="DISABLENETBIOS"/>disable netbios (G)</term><listitem>
1454 <para>Enabling this parameter will disable netbios support
1455 in Samba. Netbios is the only available form of browsing in
1456 all windows versions except for 2000 and XP. </para>
1458 <note><para>Clients that only support netbios won't be able to
1459 see your samba server when netbios support is disabled.
1462 <para>Default: <emphasis><parameter>disable netbios</parameter> = no
1466 </listitem></varlistentry>
1468 <indexterm significance="preferred"><primary>disable spoolss</primary></indexterm><term><anchor id="DISABLESPOOLSS"/>disable spoolss (G)</term><listitem>
1469 <para>Enabling this parameter will disable Samba's support
1470 for the SPOOLSS set of MS-RPC's and will yield identical behavior
1471 as Samba 2.0.x. Windows NT/2000 clients will downgrade to using
1472 Lanman style printing commands. Windows 9x/ME will be uneffected by
1473 the parameter. However, this will also disable the ability to upload
1474 printer drivers to a Samba server via the Windows NT Add Printer
1475 Wizard or by using the NT printer properties dialog window. It will
1476 also disable the capability of Windows NT/2000 clients to download
1477 print drivers from the Samba host upon demand.
1478 <emphasis>Be very careful about enabling this parameter.</emphasis>
1481 <para>Default: <emphasis><parameter>disable spoolss</parameter> = no
1485 </listitem></varlistentry>
1487 <indexterm significance="preferred"><primary>display charset</primary></indexterm><term><anchor id="DISPLAYCHARSET"/>display charset (G)</term><listitem>
1488 <para>Specifies the charset that samba will use
1489 to print messages to stdout and stderr and SWAT will use.
1490 Should generally be the same as the <command moreinfo="none">unix charset</command>.
1493 <para>Default: <emphasis><parameter>display charset</parameter> = ASCII
1496 <para>Example: <emphasis><parameter>display charset</parameter> = UTF8
1499 </listitem></varlistentry>
1501 <indexterm significance="preferred"><primary>dns proxy</primary></indexterm><term><anchor id="DNSPROXY"/>dns proxy (G)</term><listitem>
1502 <para>Specifies that <citerefentry><refentrytitle>nmbd</refentrytitle>
1503 <manvolnum>8</manvolnum></citerefentry> when acting as a WINS server and
1504 finding that a NetBIOS name has not been registered, should treat the
1505 NetBIOS name word-for-word as a DNS name and do a lookup with the DNS server
1506 for that name on behalf of the name-querying client.</para>
1508 <para>Note that the maximum length for a NetBIOS name is 15
1509 characters, so the DNS name (or DNS alias) can likewise only be
1510 15 characters, maximum.</para>
1512 <para><command moreinfo="none">nmbd</command> spawns a second copy of itself to do the
1513 DNS name lookup requests, as doing a name lookup is a blocking
1516 <para>Default: <emphasis><parameter>dns proxy</parameter> = yes
1520 </listitem></varlistentry>
1522 <indexterm significance="preferred"><primary>domain logons</primary></indexterm><term><anchor id="DOMAINLOGONS"/>domain logons (G)</term><listitem>
1524 If set to <constant>yes</constant>, the Samba server will
1525 provide the netlogon service for Windows 9X network logons for the
1526 <link linkend="WORKGROUP">
1527 <parameter moreinfo="none">workgroup</parameter></link> it is in.
1528 This will also cause the Samba server to act as a domain
1529 controller for NT4 style domain services. For more details on
1530 setting up this feature see the Domain Control chapter of the
1531 Samba HOWTO Collection.
1534 <para>Default: <emphasis><parameter>domain logons</parameter> = no
1538 </listitem></varlistentry>
1540 <indexterm significance="preferred"><primary>domain master</primary></indexterm><term><anchor id="DOMAINMASTER"/>domain master (G)</term><listitem>
1541 <para>Tell <citerefentry><refentrytitle>smbd</refentrytitle>
1542 <manvolnum>8</manvolnum></citerefentry> to enable WAN-wide browse list
1543 collation. Setting this option causes <command moreinfo="none">nmbd</command> to
1544 claim a special domain specific NetBIOS name that identifies
1545 it as a domain master browser for its given <link linkend="WORKGROUP">
1546 <parameter moreinfo="none">workgroup</parameter></link>. Local master browsers
1547 in the same <parameter moreinfo="none">workgroup</parameter> on broadcast-isolated
1548 subnets will give this <command moreinfo="none">nmbd</command> their local browse lists,
1549 and then ask <citerefentry><refentrytitle>smbd</refentrytitle>
1550 <manvolnum>8</manvolnum></citerefentry> for a complete copy of the browse
1551 list for the whole wide area network. Browser clients will then contact
1552 their local master browser, and will receive the domain-wide browse list,
1553 instead of just the list for their broadcast-isolated subnet.</para>
1555 <para>Note that Windows NT Primary Domain Controllers expect to be
1556 able to claim this <parameter moreinfo="none">workgroup</parameter> specific special
1557 NetBIOS name that identifies them as domain master browsers for
1558 that <parameter moreinfo="none">workgroup</parameter> by default (i.e. there is no
1559 way to prevent a Windows NT PDC from attempting to do this). This
1560 means that if this parameter is set and <command moreinfo="none">nmbd</command> claims
1561 the special name for a <parameter moreinfo="none">workgroup</parameter> before a Windows
1562 NT PDC is able to do so then cross subnet browsing will behave
1563 strangely and may fail.</para>
1565 <para>If <link linkend="DOMAINLOGONS"><command moreinfo="none">domain logons = yes</command>
1566 </link>, then the default behavior is to enable the <parameter moreinfo="none">domain
1567 master</parameter> parameter. If <parameter moreinfo="none">domain logons</parameter> is
1568 not enabled (the default setting), then neither will <parameter moreinfo="none">domain
1569 master</parameter> be enabled by default.</para>
1572 <para>Default: <emphasis><parameter>domain master</parameter> = auto
1576 </listitem></varlistentry>
1578 <indexterm significance="preferred"><primary>dont descend</primary></indexterm><term><anchor id="DONTDESCEND"/>dont descend (S)</term><listitem>
1579 <para>There are certain directories on some systems
1580 (e.g., the <filename moreinfo="none">/proc</filename> tree under Linux) that are either not
1581 of interest to clients or are infinitely deep (recursive). This
1582 parameter allows you to specify a comma-delimited list of directories
1583 that the server should always show as empty.</para>
1585 <para>Note that Samba can be very fussy about the exact format
1586 of the "dont descend" entries. For example you may need <filename moreinfo="none">
1587 ./proc</filename> instead of just <filename moreinfo="none">/proc</filename>.
1588 Experimentation is the best policy :-) </para>
1590 <para>Default: <emphasis><parameter>dont descend</parameter> =
1593 <para>Example: <emphasis><parameter>dont descend</parameter> = /proc,/dev
1596 </listitem></varlistentry>
1598 <indexterm significance="preferred"><primary>dos charset</primary></indexterm><term><anchor id="DOSCHARSET"/>dos charset (G)</term><listitem>
1599 <para>DOS SMB clients assume the server has
1600 the same charset as they do. This option specifies which
1601 charset Samba should talk to DOS clients.
1604 <para>The default depends on which charsets you have installed.
1605 Samba tries to use charset 850 but falls back to ASCII in
1606 case it is not available. Run <citerefentry><refentrytitle>testparm</refentrytitle>
1607 <manvolnum>1</manvolnum></citerefentry> to check the default on your system.</para>
1609 <para><emphasis>No default</emphasis></para>
1611 </listitem></varlistentry>
1613 <indexterm significance="preferred"><primary>dos filemode</primary></indexterm><term><anchor id="DOSFILEMODE"/>dos filemode (S)</term><listitem>
1614 <para> The default behavior in Samba is to provide
1615 UNIX-like behavior where only the owner of a file/directory is
1616 able to change the permissions on it. However, this behavior
1617 is often confusing to DOS/Windows users. Enabling this parameter
1618 allows a user who has write access to the file (by whatever
1619 means) to modify the permissions on it. Note that a user
1620 belonging to the group owning the file will not be allowed to
1621 change permissions if the group is only granted read access.
1622 Ownership of the file/directory is not changed, only the permissions
1623 are modified.</para>
1625 <para>Default: <emphasis><parameter>dos filemode</parameter> = no
1629 </listitem></varlistentry>
1631 <indexterm significance="preferred"><primary>dos filetime resolution</primary></indexterm><term><anchor id="DOSFILETIMERESOLUTION"/>dos filetime resolution (S)</term><listitem>
1632 <para>Under the DOS and Windows FAT filesystem, the finest
1633 granularity on time resolution is two seconds. Setting this parameter
1634 for a share causes Samba to round the reported time down to the
1635 nearest two second boundary when a query call that requires one second
1636 resolution is made to <citerefentry><refentrytitle>smbd</refentrytitle>
1637 <manvolnum>8</manvolnum></citerefentry>.</para>
1639 <para>This option is mainly used as a compatibility option for Visual
1640 C++ when used against Samba shares. If oplocks are enabled on a
1641 share, Visual C++ uses two different time reading calls to check if a
1642 file has changed since it was last read. One of these calls uses a
1643 one-second granularity, the other uses a two second granularity. As
1644 the two second call rounds any odd second down, then if the file has a
1645 timestamp of an odd number of seconds then the two timestamps will not
1646 match and Visual C++ will keep reporting the file has changed. Setting
1647 this option causes the two timestamps to match, and Visual C++ is
1650 <para>Default: <emphasis><parameter>dos filetime resolution</parameter> = no
1654 </listitem></varlistentry>
1656 <indexterm significance="preferred"><primary>dos filetimes</primary></indexterm><term><anchor id="DOSFILETIMES"/>dos filetimes (S)</term><listitem>
1657 <para>Under DOS and Windows, if a user can write to a
1658 file they can change the timestamp on it. Under POSIX semantics,
1659 only the owner of the file or root may change the timestamp. By
1660 default, Samba runs with POSIX semantics and refuses to change the
1661 timestamp on a file if the user <command moreinfo="none">smbd</command> is acting
1662 on behalf of is not the file owner. Setting this option to <constant>
1663 yes</constant> allows DOS semantics and <citerefentry><refentrytitle>smbd</refentrytitle>
1664 <manvolnum>8</manvolnum></citerefentry> will change the file
1665 timestamp as DOS requires. Due to changes in Microsoft Office 2000 and beyond,
1666 the default for this parameter has been changed from "no" to "yes" in Samba 3.0.14
1667 and above. Microsoft Excel will display dialog box warnings about the file being
1668 changed by another user if this parameter is not set to "yes" and files are being
1669 shared between users.
1672 <para>Default: <emphasis><parameter>dos filetimes</parameter> = yes
1676 </listitem></varlistentry>
1678 <indexterm significance="preferred"><primary>ea support</primary></indexterm><term><anchor id="EASUPPORT"/>ea support (S)</term><listitem>
1679 <para>This boolean parameter controls whether <citerefentry><refentrytitle>smbd</refentrytitle>
1680 <manvolnum>8</manvolnum></citerefentry> will allow clients to attempt to store OS/2 style Extended
1681 attributes on a share. In order to enable this parameter the underlying filesystem exported by
1682 the share must support extended attributes (such as provided on XFS and EXT3 on Linux, with the
1683 correct kernel patches). On Linux the filesystem must have been mounted with the mount
1684 option user_xattr in order for extended attributes to work, also
1685 extended attributes must be compiled into the Linux kernel.</para>
1687 <para>Default: <emphasis><parameter>ea support</parameter> = no
1691 </listitem></varlistentry>
1693 <indexterm significance="preferred"><primary>enable privileges</primary></indexterm><term><anchor id="ENABLEPRIVILEGES"/>enable privileges (G)</term><listitem>
1694 <para>This parameter controls whether or not smbd will honor
1695 privileges assigned to specific SIDs via either <command>net rpc rights</command>
1696 or one of the Windows user and group manager tools. This parameter is
1697 disabled by default to prevent members of the Domain Admins group from
1698 being able to assign privileges to users or groups which can then result in certain
1699 smbd operations running as root that would normally run under the context
1700 of the connected user. </para>
1702 <para>An example of how privileges can be used is to assign
1703 the right to join clients to a Samba controlled domain without
1704 providing root access to the server via smbd.</para>
1706 <para>Please read the extended description provided in the
1707 Samba documentation before enabling this option.</para>
1710 <para>Default: <emphasis><parameter>enable privileges</parameter> = no
1714 </listitem></varlistentry>
1716 <indexterm significance="preferred"><primary>enable rid algorithm</primary></indexterm><term><anchor id="ENABLERIDALGORITHM"/>enable rid algorithm (G)</term><listitem>
1717 <para>This option is used to control whether or not smbd in Samba 3.0 should fallback
1718 to the algorithm used by Samba 2.2 to generate user and group RIDs. The longterm
1719 development goal is to remove the algorithmic mappings of RIDs altogether, but
1720 this has proved to be difficult. This parameter is mainly provided so that
1721 developers can turn the algorithm on and off and see what breaks. This parameter
1722 should not be disabled by non-developers because certain features in Samba will fail
1727 <para>Default: <emphasis><parameter>enable rid algorithm</parameter> = yes
1731 </listitem></varlistentry>
1733 <indexterm significance="preferred"><primary>encrypt passwords</primary></indexterm><term><anchor id="ENCRYPTPASSWORDS"/>encrypt passwords (G)</term><listitem>
1734 <para>This boolean controls whether encrypted passwords
1735 will be negotiated with the client. Note that Windows NT 4.0 SP3 and
1736 above and also Windows 98 will by default expect encrypted passwords
1737 unless a registry entry is changed. To use encrypted passwords in
1738 Samba see the chapter "User Database" in the Samba HOWTO Collection.
1742 MS Windows clients that expect Microsoft encrypted passwords and that
1743 do not have plain text password support enabled will be able to
1744 connect only to a Samba server that has encypted password support
1745 enabled and for which the user accounts have a valid encrypted password.
1746 Refer to the smbpasswd command man page for information regarding the
1747 creation of encrypted passwords for user accounts.
1751 The use of plain text passwords is NOT advised as support for this feature
1752 is no longer maintained in Microsoft Windows products. If you want to use
1753 plain text passwords you must set this parameter to no.
1756 <para>In order for encrypted passwords to work correctly
1757 <citerefentry><refentrytitle>smbd</refentrytitle>
1758 <manvolnum>8</manvolnum></citerefentry> must either
1759 have access to a local <citerefentry><refentrytitle>smbpasswd</refentrytitle>
1760 <manvolnum>5</manvolnum></citerefentry> file (see the <citerefentry><refentrytitle>smbpasswd</refentrytitle>
1761 <manvolnum>8</manvolnum></citerefentry> program for information on how to set up
1762 and maintain this file), or set the <link linkend="SECURITY">security = [server|domain|ads]</link> parameter which
1763 causes <command moreinfo="none">smbd</command> to authenticate against another
1766 <para>Default: <emphasis><parameter>encrypt passwords</parameter> = yes
1770 </listitem></varlistentry>
1772 <indexterm significance="preferred"><primary>enhanced browsing</primary></indexterm><term><anchor id="ENHANCEDBROWSING"/>enhanced browsing (G)</term><listitem>
1773 <para>This option enables a couple of enhancements to
1774 cross-subnet browse propagation that have been added in Samba
1775 but which are not standard in Microsoft implementations.
1778 <para>The first enhancement to browse propagation consists of a regular
1779 wildcard query to a Samba WINS server for all Domain Master Browsers,
1780 followed by a browse synchronization with each of the returned
1781 DMBs. The second enhancement consists of a regular randomised browse
1782 synchronization with all currently known DMBs.</para>
1784 <para>You may wish to disable this option if you have a problem with empty
1785 workgroups not disappearing from browse lists. Due to the restrictions
1786 of the browse protocols these enhancements can cause a empty workgroup
1787 to stay around forever which can be annoying.</para>
1789 <para>In general you should leave this option enabled as it makes
1790 cross-subnet browse propagation much more reliable.</para>
1793 <para>Default: <emphasis><parameter>enhanced browsing</parameter> = yes
1797 </listitem></varlistentry>
1799 <indexterm significance="preferred"><primary>enumports command</primary></indexterm><term><anchor id="ENUMPORTSCOMMAND"/>enumports command (G)</term><listitem>
1800 <para>The concept of a "port" is fairly foreign
1801 to UNIX hosts. Under Windows NT/2000 print servers, a port
1802 is associated with a port monitor and generally takes the form of
1803 a local port (i.e. LPT1:, COM1:, FILE:) or a remote port
1804 (i.e. LPD Port Monitor, etc...). By default, Samba has only one
1805 port defined--<constant>"Samba Printer Port"</constant>. Under
1806 Windows NT/2000, all printers must have a valid port name.
1807 If you wish to have a list of ports displayed (<command moreinfo="none">smbd
1808 </command> does not use a port name for anything) other than
1809 the default <constant>"Samba Printer Port"</constant>, you
1810 can define <parameter moreinfo="none">enumports command</parameter> to point to
1811 a program which should generate a list of ports, one per line,
1812 to standard output. This listing will then be used in response
1813 to the level 1 and 2 EnumPorts() RPC.</para>
1815 <para>Default: <emphasis><parameter>enumports command</parameter> =
1818 <para>Example: <emphasis><parameter>enumports command</parameter> = /usr/bin/listports
1821 </listitem></varlistentry>
1823 <indexterm significance="preferred"><primary>fake directory create times</primary></indexterm><term><anchor id="FAKEDIRECTORYCREATETIMES"/>fake directory create times (S)</term><listitem>
1824 <para>NTFS and Windows VFAT file systems keep a create
1825 time for all files and directories. This is not the same as the
1826 ctime - status change time - that Unix keeps, so Samba by default
1827 reports the earliest of the various times Unix does keep. Setting
1828 this parameter for a share causes Samba to always report midnight
1829 1-1-1980 as the create time for directories.</para>
1831 <para>This option is mainly used as a compatibility option for
1832 Visual C++ when used against Samba shares. Visual C++ generated
1833 makefiles have the object directory as a dependency for each object
1834 file, and a make rule to create the directory. Also, when NMAKE
1835 compares timestamps it uses the creation time when examining a
1836 directory. Thus the object directory will be created if it does not
1837 exist, but once it does exist it will always have an earlier
1838 timestamp than the object files it contains.</para>
1840 <para>However, Unix time semantics mean that the create time
1841 reported by Samba will be updated whenever a file is created or
1842 or deleted in the directory. NMAKE finds all object files in
1843 the object directory. The timestamp of the last one built is then
1844 compared to the timestamp of the object directory. If the
1845 directory's timestamp if newer, then all object files
1846 will be rebuilt. Enabling this option
1847 ensures directories always predate their contents and an NMAKE build
1848 will proceed as expected.</para>
1850 <para>Default: <emphasis><parameter>fake directory create times</parameter> = no
1854 </listitem></varlistentry>
1856 <indexterm significance="preferred"><primary>fake oplocks</primary></indexterm><term><anchor id="FAKEOPLOCKS"/>fake oplocks (S)</term><listitem>
1857 <para>Oplocks are the way that SMB clients get permission
1858 from a server to locally cache file operations. If a server grants
1859 an oplock (opportunistic lock) then the client is free to assume
1860 that it is the only one accessing the file and it will aggressively
1861 cache file data. With some oplock types the client may even cache
1862 file open/close operations. This can give enormous performance benefits.
1865 <para>When you set <command moreinfo="none">fake oplocks = yes</command>, <citerefentry>
1866 <refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum></citerefentry> will
1867 always grant oplock requests no matter how many clients are using the file.</para>
1869 <para>It is generally much better to use the real <link linkend="OPLOCKS">
1870 <parameter moreinfo="none">oplocks</parameter></link> support rather
1871 than this parameter.</para>
1873 <para>If you enable this option on all read-only shares or
1874 shares that you know will only be accessed from one client at a
1875 time such as physically read-only media like CDROMs, you will see
1876 a big performance improvement on many operations. If you enable
1877 this option on shares where multiple clients may be accessing the
1878 files read-write at the same time you can get data corruption. Use
1879 this option carefully!</para>
1881 <para>Default: <emphasis><parameter>fake oplocks</parameter> = no
1885 </listitem></varlistentry>
1887 <indexterm significance="preferred"><primary>follow symlinks</primary></indexterm><term><anchor id="FOLLOWSYMLINKS"/>follow symlinks (S)</term><listitem>
1888 <para>This parameter allows the Samba administrator
1889 to stop <citerefentry><refentrytitle>smbd</refentrytitle>
1890 <manvolnum>8</manvolnum></citerefentry> from following symbolic
1891 links in a particular share. Setting this
1892 parameter to <constant>no</constant> prevents any file or directory
1893 that is a symbolic link from being followed (the user will get an
1894 error). This option is very useful to stop users from adding a
1895 symbolic link to <filename moreinfo="none">/etc/passwd</filename> in their home
1896 directory for instance. However it will slow filename lookups
1897 down slightly.</para>
1899 <para>This option is enabled (i.e. <command moreinfo="none">smbd</command> will
1900 follow symbolic links) by default.</para>
1902 <para>Default: <emphasis><parameter>follow symlinks</parameter> = yes
1906 </listitem></varlistentry>
1908 <indexterm significance="preferred"><primary>force create mode</primary></indexterm><term><anchor id="FORCECREATEMODE"/>force create mode (S)</term><listitem>
1909 <para>This parameter specifies a set of UNIX mode bit
1910 permissions that will <emphasis>always</emphasis> be set on a
1911 file created by Samba. This is done by bitwise 'OR'ing these bits onto
1912 the mode bits of a file that is being created or having its
1913 permissions changed. The default for this parameter is (in octal)
1914 000. The modes in this parameter are bitwise 'OR'ed onto the file
1915 mode after the mask set in the <parameter moreinfo="none">create mask</parameter>
1916 parameter is applied.</para>
1918 <para>The example below would force all created files to have read and execute
1919 permissions set for 'group' and 'other' as well as the
1920 read/write/execute bits set for the 'user'.</para>
1923 <para>Default: <emphasis><parameter>force create mode</parameter> = 000
1926 <para>Example: <emphasis><parameter>force create mode</parameter> = 0755
1929 </listitem></varlistentry>
1931 <indexterm significance="preferred"><primary>force directory mode</primary></indexterm><term><anchor id="FORCEDIRECTORYMODE"/>force directory mode (S)</term><listitem>
1932 <para>This parameter specifies a set of UNIX mode bit
1933 permissions that will <emphasis>always</emphasis> be set on a directory
1934 created by Samba. This is done by bitwise 'OR'ing these bits onto the
1935 mode bits of a directory that is being created. The default for this
1936 parameter is (in octal) 0000 which will not add any extra permission
1937 bits to a created directory. This operation is done after the mode
1938 mask in the parameter <parameter moreinfo="none">directory mask</parameter> is
1941 <para>The example below would force all created directories to have read and execute
1942 permissions set for 'group' and 'other' as well as the
1943 read/write/execute bits set for the 'user'.</para>
1945 <para>Default: <emphasis><parameter>force directory mode</parameter> = 000
1948 <para>Example: <emphasis><parameter>force directory mode</parameter> = 0755
1951 </listitem></varlistentry>
1953 <indexterm significance="preferred"><primary>force directory security mode</primary></indexterm><term><anchor id="FORCEDIRECTORYSECURITYMODE"/>force directory security mode (S)</term><listitem>
1954 <para>This parameter controls what UNIX permission bits
1955 can be modified when a Windows NT client is manipulating the UNIX
1956 permission on a directory using the native NT security dialog box.</para>
1958 <para>This parameter is applied as a mask (OR'ed with) to the
1959 changed permission bits, thus forcing any bits in this mask that
1960 the user may have modified to be on. Essentially, one bits in this
1961 mask may be treated as a set of bits that, when modifying security
1962 on a directory, the user has always set to be 'on'.</para>
1964 <para>If not set explicitly this parameter is 000, which
1965 allows a user to modify all the user/group/world permissions on a
1966 directory without restrictions.</para>
1968 <note><para>Users who can access the
1969 Samba server through other means can easily bypass this restriction,
1970 so it is primarily useful for standalone "appliance" systems.
1971 Administrators of most normal systems will probably want to leave
1972 it set as 0000.</para></note>
1975 <para>Default: <emphasis><parameter>force directory security mode</parameter> = 0
1978 <para>Example: <emphasis><parameter>force directory security mode</parameter> = 700
1981 </listitem></varlistentry>
1983 <indexterm significance="preferred"><primary>group</primary><see>force group</see></indexterm><term><anchor id="GROUP"/>group</term><listitem><para>This parameter is a synonym for force group.</para></listitem></varlistentry><varlistentry>
1984 <indexterm significance="preferred"><primary>force group</primary></indexterm><term><anchor id="FORCEGROUP"/>force group (S)</term><listitem>
1985 <para>This specifies a UNIX group name that will be
1986 assigned as the default primary group for all users connecting
1987 to this service. This is useful for sharing files by ensuring
1988 that all access to files on service will use the named group for
1989 their permissions checking. Thus, by assigning permissions for this
1990 group to the files and directories within this service the Samba
1991 administrator can restrict or allow sharing of these files.</para>
1993 <para>In Samba 2.0.5 and above this parameter has extended
1994 functionality in the following way. If the group name listed here
1995 has a '+' character prepended to it then the current user accessing
1996 the share only has the primary group default assigned to this group
1997 if they are already assigned as a member of that group. This allows
1998 an administrator to decide that only users who are already in a
1999 particular group will create files with group ownership set to that
2000 group. This gives a finer granularity of ownership assignment. For
2001 example, the setting <filename moreinfo="none">force group = +sys</filename> means
2002 that only users who are already in group sys will have their default
2003 primary group assigned to sys when accessing this Samba share. All
2004 other users will retain their ordinary primary group.</para>
2006 <para>If the <link linkend="FORCEUSER"><parameter moreinfo="none">force user</parameter>
2007 </link> parameter is also set the group specified in
2008 <parameter moreinfo="none">force group</parameter> will override the primary group
2009 set in <parameter moreinfo="none">force user</parameter>.</para>
2012 <para>Default: <emphasis><parameter>force group</parameter> =
2015 <para>Example: <emphasis><parameter>force group</parameter> = agroup
2018 </listitem></varlistentry>
2020 <indexterm significance="preferred"><primary>force printername</primary></indexterm><term><anchor id="FORCEPRINTERNAME"/>force printername (S)</term><listitem>
2021 <para>When printing from Windows NT (or later),
2022 each printer in <filename>smb.conf</filename> has two
2023 associated names which can be used by the client. The first
2024 is the sharename (or shortname) defined in smb.conf. This
2025 is the only printername available for use by Windows 9x clients.
2026 The second name associated with a printer can be seen when
2027 browsing to the "Printers" (or "Printers and Faxes") folder
2028 on the Samba server. This is referred to simply as the printername
2029 (not to be confused with the <parameter>printer name</parameter> option).
2032 <para>When assigning a new driver to a printer on a remote
2033 Windows compatible print server such as Samba, the Windows client
2034 will rename the printer to match the driver name just uploaded.
2035 This can result in confusion for users when multiple
2036 printers are bound to the same driver. To prevent Samba from
2037 allowing the printer's printername to differ from the sharename
2038 defined in smb.conf, set <parameter>force printername = yes</parameter>.
2041 <para>Be aware that enabling this parameter may affect migrating
2042 printers from a Windows server to Samba since Windows has no way to
2043 force the sharename and printername to match.</para>
2045 <para>It is recommended that this parameter's value not be changed
2046 once the printer is in use by clients as this could cause a user
2047 not be able to delete printer connections from their local Printers
2051 <para>Default: <emphasis><parameter>force printername</parameter> = no
2055 </listitem></varlistentry>
2057 <indexterm significance="preferred"><primary>force security mode</primary></indexterm><term><anchor id="FORCESECURITYMODE"/>force security mode (S)</term><listitem>
2058 <para>This parameter controls what UNIX permission
2059 bits can be modified when a Windows NT client is manipulating
2060 the UNIX permission on a file using the native NT security dialog
2063 <para>This parameter is applied as a mask (OR'ed with) to the
2064 changed permission bits, thus forcing any bits in this mask that
2065 the user may have modified to be on. Essentially, one bits in this
2066 mask may be treated as a set of bits that, when modifying security
2067 on a file, the user has always set to be 'on'.</para>
2069 <para>If not set explicitly this parameter is set to 0,
2070 and allows a user to modify all the user/group/world permissions on a file,
2071 with no restrictions.</para>
2073 <para><emphasis>Note</emphasis> that users who can access
2074 the Samba server through other means can easily bypass this restriction,
2075 so it is primarily useful for standalone "appliance" systems.
2076 Administrators of most normal systems will probably want to leave
2077 this set to 0000.</para>
2080 <para>Default: <emphasis><parameter>force security mode</parameter> = 0
2083 <para>Example: <emphasis><parameter>force security mode</parameter> = 700
2086 </listitem></varlistentry>
2088 <indexterm significance="preferred"><primary>force unknown acl user</primary></indexterm><term><anchor id="FORCEUNKNOWNACLUSER"/>force unknown acl user (S)</term><listitem>
2089 <para>If this parameter is set, a Windows NT ACL that contains an unknown
2090 SID (security descriptor, or representation of a user or group
2091 id) as the owner or group owner of the file will be silently
2092 mapped into the current UNIX uid or gid of the currently
2093 connected user.</para>
2095 <para>This is designed to allow Windows NT clients to copy files and
2096 folders containing ACLs that were created locally on the client
2097 machine and contain users local to that machine only (no domain
2098 users) to be copied to a Samba server (usually with XCOPY /O)
2099 and have the unknown userid and groupid of the file owner map to
2100 the current connected user. This can only be fixed correctly
2101 when winbindd allows arbitrary mapping from any Windows NT SID
2102 to a UNIX uid or gid.</para>
2104 <para>Try using this parameter when XCOPY /O gives an ACCESS_DENIED
2107 <para>Default: <emphasis><parameter>force unknown acl user</parameter> = no
2111 </listitem></varlistentry>
2113 <indexterm significance="preferred"><primary>force user</primary></indexterm><term><anchor id="FORCEUSER"/>force user (S)</term><listitem>
2114 <para>This specifies a UNIX user name that will be
2115 assigned as the default user for all users connecting to this service.
2116 This is useful for sharing files. You should also use it carefully
2117 as using it incorrectly can cause security problems.</para>
2119 <para>This user name only gets used once a connection is established.
2120 Thus clients still need to connect as a valid user and supply a
2121 valid password. Once connected, all file operations will be performed
2122 as the "forced user", no matter what username the client connected
2123 as. This can be very useful.</para>
2125 <para>In Samba 2.0.5 and above this parameter also causes the
2126 primary group of the forced user to be used as the primary group
2127 for all file activity. Prior to 2.0.5 the primary group was left
2128 as the primary group of the connecting user (this was a bug).</para>
2131 <para>Default: <emphasis><parameter>force user</parameter> =
2134 <para>Example: <emphasis><parameter>force user</parameter> = auser
2137 </listitem></varlistentry>
2139 <indexterm significance="preferred"><primary>fstype</primary></indexterm><term><anchor id="FSTYPE"/>fstype (S)</term><listitem>
2140 <para>This parameter allows the administrator to
2141 configure the string that specifies the type of filesystem a share
2142 is using that is reported by <citerefentry><refentrytitle>smbd</refentrytitle>
2143 <manvolnum>8</manvolnum></citerefentry> when a client queries the filesystem type
2144 for a share. The default type is <constant>NTFS</constant> for
2145 compatibility with Windows NT but this can be changed to other
2146 strings such as <constant>Samba</constant> or <constant>FAT
2147 </constant> if required.</para>
2149 <para>Default: <emphasis><parameter>fstype</parameter> = NTFS
2152 <para>Example: <emphasis><parameter>fstype</parameter> = Samba
2155 </listitem></varlistentry>
2157 <indexterm significance="preferred"><primary>get quota command</primary></indexterm><term><anchor id="GETQUOTACOMMAND"/>get quota command (G)</term><listitem>
2158 <para>The <command>get quota command</command> should only be used
2159 whenever there is no operating system API available from the OS that
2160 samba can use.</para>
2162 <para>This option is only available with <command>./configure --with-sys-quotas</command>.
2163 Or on linux when <command>./configure --with-quotas</command> was used and a working quota api
2164 was found in the system.</para>
2166 <para>This parameter should specify the path to a script that
2167 queries the quota information for the specified
2168 user/group for the partition that
2169 the specified directory is on.</para>
2171 <para>Such a script should take 3 arguments:</para>
2174 <listitem><para>directory</para></listitem>
2175 <listitem><para>type of query</para></listitem>
2176 <listitem><para>uid of user or gid of group</para></listitem>
2179 <para>The type of query can be one of :</para>
2182 <listitem><para>1 - user quotas</para></listitem>
2183 <listitem><para>2 - user default quotas (uid = -1)</para></listitem>
2184 <listitem><para>3 - group quotas</para></listitem>
2185 <listitem><para>4 - group default quotas (gid = -1)</para></listitem>
2188 <para>This script should print one line as output with spaces between the arguments. The arguments are:
2192 <listitem><para>Arg 1 - quota flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and enforced)</para></listitem>
2193 <listitem><para>Arg 2 - number of currently used blocks</para></listitem>
2194 <listitem><para>Arg 3 - the softlimit number of blocks</para></listitem>
2195 <listitem><para>Arg 4 - the hardlimit number of blocks</para></listitem>
2196 <listitem><para>Arg 5 - currently used number of inodes</para></listitem>
2197 <listitem><para>Arg 6 - the softlimit number of inodes</para></listitem>
2198 <listitem><para>Arg 7 - the hardlimit number of inodes</para></listitem>
2199 <listitem><para>Arg 8(optional) - the number of bytes in a block(default is 1024)</para></listitem>
2202 <para>Default: <emphasis><parameter>get quota command</parameter> =
2205 <para>Example: <emphasis><parameter>get quota command</parameter> = /usr/local/sbin/query_quota
2208 </listitem></varlistentry>
2210 <indexterm significance="preferred"><primary>getwd cache</primary></indexterm><term><anchor id="GETWDCACHE"/>getwd cache (G)</term><listitem>
2211 <para>This is a tuning option. When this is enabled a
2212 caching algorithm will be used to reduce the time taken for getwd()
2213 calls. This can have a significant impact on performance, especially
2214 when the <link linkend="WIDELINKS"><parameter moreinfo="none">wide links</parameter>
2215 </link> parameter is set to <constant>no</constant>.</para>
2217 <para>Default: <emphasis><parameter>getwd cache</parameter> = yes
2221 </listitem></varlistentry>
2223 <indexterm significance="preferred"><primary>guest account</primary></indexterm><term><anchor id="GUESTACCOUNT"/>guest account (G)</term><listitem>
2224 <para>This is a username which will be used for access
2225 to services which are specified as <link linkend="GUESTOK"><parameter moreinfo="none">
2226 guest ok</parameter></link> (see below). Whatever privileges this
2227 user has will be available to any client connecting to the guest service.
2228 This user must exist in the password file, but does not require
2229 a valid login. The user account "ftp" is often a good choice
2233 <para>On some systems the default guest account "nobody" may not
2234 be able to print. Use another account in this case. You should test
2235 this by trying to log in as your guest user (perhaps by using the
2236 <command moreinfo="none">su -</command> command) and trying to print using the
2237 system print command such as <command moreinfo="none">lpr(1)</command> or <command moreinfo="none">
2238 lp(1)</command>.</para>
2240 <para>This parameter does not accept % macros, because
2241 many parts of the system require this value to be
2242 constant for correct operation.</para>
2244 <para>Default: <emphasis><parameter>guest account</parameter> = nobody
2245 # default can be changed at compile-time
2248 <para>Example: <emphasis><parameter>guest account</parameter> = ftp
2251 </listitem></varlistentry>
2253 <indexterm significance="preferred"><primary>public</primary><see>guest ok</see></indexterm><term><anchor id="PUBLIC"/>public</term><listitem><para>This parameter is a synonym for guest ok.</para></listitem></varlistentry><varlistentry>
2254 <indexterm significance="preferred"><primary>guest ok</primary></indexterm><term><anchor id="GUESTOK"/>guest ok (S)</term><listitem>
2255 <para>If this parameter is <constant>yes</constant> for
2256 a service, then no password is required to connect to the service.
2257 Privileges will be those of the <link linkend="GUESTACCOUNT"><parameter moreinfo="none">
2258 guest account</parameter></link>.</para>
2260 <para>This paramater nullifies the benifits of setting
2261 <link linkend="RESTRICTANONYMOUS"><parameter moreinfo="none">restrict
2262 anonymous</parameter></link> = 2</para>
2264 <para>See the section below on <link linkend="SECURITY"><parameter moreinfo="none">
2265 security</parameter></link> for more information about this option.
2268 <para>Default: <emphasis><parameter>guest ok</parameter> = no
2272 </listitem></varlistentry>
2274 <indexterm significance="preferred"><primary>only guest</primary><see>guest only</see></indexterm><term><anchor id="ONLYGUEST"/>only guest</term><listitem><para>This parameter is a synonym for guest only.</para></listitem></varlistentry><varlistentry>
2275 <indexterm significance="preferred"><primary>guest only</primary></indexterm><term><anchor id="GUESTONLY"/>guest only (S)</term><listitem>
2276 <para>If this parameter is <constant>yes</constant> for
2277 a service, then only guest connections to the service are permitted.
2278 This parameter will have no effect if <link linkend="GUESTOK">
2279 <parameter moreinfo="none">guest ok</parameter></link> is not set for the service.</para>
2281 <para>See the section below on <link linkend="SECURITY"><parameter moreinfo="none">
2282 security</parameter></link> for more information about this option.
2285 <para>Default: <emphasis><parameter>guest only</parameter> = no
2289 </listitem></varlistentry>
2291 <indexterm significance="preferred"><primary>hide dot files</primary></indexterm><term><anchor id="HIDEDOTFILES"/>hide dot files (S)</term><listitem>
2292 <para>This is a boolean parameter that controls whether
2293 files starting with a dot appear as hidden files.</para>
2295 <para>Default: <emphasis><parameter>hide dot files</parameter> = yes
2299 </listitem></varlistentry>
2301 <indexterm significance="preferred"><primary>hide files</primary></indexterm><term><anchor id="HIDEFILES"/>hide files (S)</term><listitem>
2302 <para>This is a list of files or directories that are not
2303 visible but are accessible. The DOS 'hidden' attribute is applied
2304 to any files or directories that match.</para>
2306 <para>Each entry in the list must be separated by a '/',
2307 which allows spaces to be included in the entry. '*'
2308 and '?' can be used to specify multiple files or directories
2309 as in DOS wildcards.</para>
2311 <para>Each entry must be a Unix path, not a DOS path and must
2312 not include the Unix directory separator '/'.</para>
2314 <para>Note that the case sensitivity option is applicable
2315 in hiding files.</para>
2317 <para>Setting this parameter will affect the performance of Samba,
2318 as it will be forced to check all files and directories for a match
2319 as they are scanned.</para>
2321 <para>Default: <emphasis><parameter>hide files</parameter> =
2322 # no file are hidden
2325 <para>Example: <emphasis><parameter>hide files</parameter> = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
2327 The above example is based on files that the Macintosh
2328 SMB client (DAVE) available from <ulink url="http://www.thursby.com">
2329 Thursby</ulink> creates for internal use, and also still hides
2330 all files beginning with a dot.
2333 </listitem></varlistentry>
2335 <indexterm significance="preferred"><primary>hide special files</primary></indexterm><term><anchor id="HIDESPECIALFILES"/>hide special files (S)</term><listitem>
2336 <para>This parameter prevents clients from seeing
2337 special files such as sockets, devices and fifo's in directory
2341 <para>Default: <emphasis><parameter>hide special files</parameter> = no
2345 </listitem></varlistentry>
2347 <indexterm significance="preferred"><primary>hide unreadable</primary></indexterm><term><anchor id="HIDEUNREADABLE"/>hide unreadable (S)</term><listitem>
2348 <para>This parameter prevents clients from seeing the
2349 existance of files that cannot be read. Defaults to off.</para>
2351 <para>Default: <emphasis><parameter>hide unreadable</parameter> = no
2355 </listitem></varlistentry>
2357 <indexterm significance="preferred"><primary>hide unwriteable files</primary></indexterm><term><anchor id="HIDEUNWRITEABLEFILES"/>hide unwriteable files (S)</term><listitem>
2358 <para>This parameter prevents clients from seeing
2359 the existance of files that cannot be written to. Defaults to off.
2360 Note that unwriteable directories are shown as usual.
2363 <para>Default: <emphasis><parameter>hide unwriteable files</parameter> = no
2367 </listitem></varlistentry>
2369 <indexterm significance="preferred"><primary>homedir map</primary></indexterm><term><anchor id="HOMEDIRMAP"/>homedir map (G)</term><listitem>
2370 <para>If<link linkend="NISHOMEDIR"><parameter moreinfo="none">nis homedir
2371 </parameter></link> is <constant>yes</constant>, and <citerefentry><refentrytitle>smbd</refentrytitle>
2372 <manvolnum>8</manvolnum></citerefentry> is also acting
2373 as a Win95/98 <parameter moreinfo="none">logon server</parameter> then this parameter
2374 specifies the NIS (or YP) map from which the server for the user's
2375 home directory should be extracted. At present, only the Sun
2376 auto.home map format is understood. The form of the map is:</para>
2378 <para><command moreinfo="none">username server:/some/file/system</command></para>
2380 <para>and the program will extract the servername from before
2381 the first ':'. There should probably be a better parsing system
2382 that copes with different map formats and also Amd (another
2383 automounter) maps.</para>
2385 <note><para>A working NIS client is required on
2386 the system for this option to work.</para></note>
2388 <para>Default: <emphasis><parameter>homedir map</parameter> =
2391 <para>Example: <emphasis><parameter>homedir map</parameter> = amd.homedir
2394 </listitem></varlistentry>
2396 <indexterm significance="preferred"><primary>host msdfs</primary></indexterm><term><anchor id="HOSTMSDFS"/>host msdfs (G)</term><listitem>
2397 <para>If set to <constant>yes</constant>, Samba will act as a Dfs
2398 server, and allow Dfs-aware clients to browse Dfs trees hosted
2399 on the server.</para>
2401 <para>See also the <link linkend="MSDFSROOT"><parameter moreinfo="none">
2402 msdfs root</parameter></link> share level parameter. For
2403 more information on setting up a Dfs tree on Samba,
2404 refer to <link linkend="msdfs"/>.
2407 <para>Default: <emphasis><parameter>host msdfs</parameter> = no
2411 </listitem></varlistentry>
2413 <indexterm significance="preferred"><primary>hostname lookups</primary></indexterm><term><anchor id="HOSTNAMELOOKUPS"/>hostname lookups (G)</term><listitem>
2414 <para>Specifies whether samba should use (expensive)
2415 hostname lookups or use the ip addresses instead. An example place
2416 where hostname lookups are currently used is when checking
2417 the <command moreinfo="none">hosts deny</command> and <command moreinfo="none">hosts allow</command>.
2420 <para>Default: <emphasis><parameter>hostname lookups</parameter> = no
2423 <para>Example: <emphasis><parameter>hostname lookups</parameter> = yes
2426 </listitem></varlistentry>
2428 <indexterm significance="preferred"><primary>allow hosts</primary><see>hosts allow</see></indexterm><term><anchor id="ALLOWHOSTS"/>allow hosts</term><listitem><para>This parameter is a synonym for hosts allow.</para></listitem></varlistentry><varlistentry>
2429 <indexterm significance="preferred"><primary>hosts allow</primary></indexterm><term><anchor id="HOSTSALLOW"/>hosts allow (S)</term><listitem>
2430 <para>A synonym for this parameter is <parameter moreinfo="none">allow
2431 hosts</parameter>.</para>
2433 <para>This parameter is a comma, space, or tab delimited
2434 set of hosts which are permitted to access a service.</para>
2436 <para>If specified in the [global] section then it will
2437 apply to all services, regardless of whether the individual
2438 service has a different setting.</para>
2440 <para>You can specify the hosts by name or IP number. For
2441 example, you could restrict access to only the hosts on a
2442 Class C subnet with something like <command moreinfo="none">allow hosts = 150.203.5.
2443 </command>. The full syntax of the list is described in the man
2444 page <filename moreinfo="none">hosts_access(5)</filename>. Note that this man
2445 page may not be present on your system, so a brief description will
2446 be given here also.</para>
2448 <para>Note that the localhost address 127.0.0.1 will always
2449 be allowed access unless specifically denied by a <link linkend="HOSTSDENY">
2450 <parameter moreinfo="none">hosts deny</parameter></link> option.</para>
2452 <para>You can also specify hosts by network/netmask pairs and
2453 by netgroup names if your system supports netgroups. The
2454 <emphasis>EXCEPT</emphasis> keyword can also be used to limit a
2455 wildcard list. The following examples may provide some help:</para>
2457 <para>Example 1: allow all IPs in 150.203.*.*; except one</para>
2459 <para><command moreinfo="none">hosts allow = 150.203. EXCEPT 150.203.6.66</command></para>
2461 <para>Example 2: allow hosts that match the given network/netmask</para>
2463 <para><command moreinfo="none">hosts allow = 150.203.15.0/255.255.255.0</command></para>
2465 <para>Example 3: allow a couple of hosts</para>
2467 <para><command moreinfo="none">hosts allow = lapland, arvidsjaur</command></para>
2469 <para>Example 4: allow only hosts in NIS netgroup "foonet", but
2470 deny access from one particular host</para>
2472 <para><command moreinfo="none">hosts allow = @foonet</command></para>
2474 <para><command moreinfo="none">hosts deny = pirate</command></para>
2476 <note><para>Note that access still requires suitable user-level passwords.</para></note>
2478 <para>See <citerefentry><refentrytitle>testparm</refentrytitle>
2479 <manvolnum>1</manvolnum></citerefentry> for a way of testing your host access
2480 to see if it does what you expect.</para>
2484 <para>Default: <emphasis><parameter>hosts allow</parameter> =
2485 # none (i.e., all hosts permitted access)
2488 <para>Example: <emphasis><parameter>hosts allow</parameter> = 150.203.5. myhost.mynet.edu.au
2491 </listitem></varlistentry>
2493 <indexterm significance="preferred"><primary>deny hosts</primary><see>hosts deny</see></indexterm><term><anchor id="DENYHOSTS"/>deny hosts</term><listitem><para>This parameter is a synonym for hosts deny.</para></listitem></varlistentry><varlistentry>
2494 <indexterm significance="preferred"><primary>hosts deny</primary></indexterm><term><anchor id="HOSTSDENY"/>hosts deny (S)</term><listitem>
2495 <para>The opposite of <parameter moreinfo="none">hosts allow</parameter>
2496 - hosts listed here are <emphasis>NOT</emphasis> permitted access to
2497 services unless the specific services have their own lists to override
2498 this one. Where the lists conflict, the <parameter moreinfo="none">allow</parameter>
2499 list takes precedence.</para>
2501 <para>Default: <emphasis><parameter>hosts deny</parameter> =
2502 # none (i.e., no hosts specifically excluded)
2505 <para>Example: <emphasis><parameter>hosts deny</parameter> = 150.203.4. badhost.mynet.edu.au
2508 </listitem></varlistentry>
2510 <indexterm significance="preferred"><primary>hosts equiv</primary></indexterm><term><anchor id="HOSTSEQUIV"/>hosts equiv (G)</term><listitem>
2511 <para>If this global parameter is a non-null string,
2512 it specifies the name of a file to read for the names of hosts
2513 and users who will be allowed access without specifying a password.
2516 <para>This is not be confused with <link linkend="HOSTSALLOW">
2517 <parameter moreinfo="none">hosts allow</parameter></link> which is about hosts
2518 access to services and is more useful for guest services. <parameter moreinfo="none">
2519 hosts equiv</parameter> may be useful for NT clients which will
2520 not supply passwords to Samba.</para>
2522 <note><para>The use of <parameter moreinfo="none">hosts equiv
2523 </parameter> can be a major security hole. This is because you are
2524 trusting the PC to supply the correct username. It is very easy to
2525 get a PC to supply a false username. I recommend that the
2526 <parameter moreinfo="none">hosts equiv</parameter> option be only used if you really
2527 know what you are doing, or perhaps on a home network where you trust
2528 your spouse and kids. And only if you <emphasis>really</emphasis> trust
2529 them :-).</para></note>
2531 <para>Default: <emphasis><parameter>hosts equiv</parameter> =
2532 # no host equivalences
2535 <para>Example: <emphasis><parameter>hosts equiv</parameter> = hosts equiv = /etc/hosts.equiv
2538 </listitem></varlistentry>
2540 <indexterm significance="preferred"><primary>idmap backend</primary></indexterm><term><anchor id="IDMAPBACKEND"/>idmap backend (G)</term><listitem>
2542 The purpose of the idmap backend parameter is to allow idmap to NOT use the local idmap
2543 tdb file to obtain SID to UID / GID mappings, but instead to obtain them from a common
2544 LDAP backend. This way all domain members and controllers will have the same UID and GID
2545 to SID mappings. This avoids the risk of UID / GID inconsistencies across UNIX / Linux
2546 systems that are sharing information over protocols other than SMB/CIFS (ie: NFS).
2550 An alternate method of SID to UID / GID mapping can be achieved using the idmap_rid
2551 plug-in. This plug-in uses the account RID to derive the UID and GID by adding the
2552 RID to a base value specified. This utility requires that the parameter
2553 <quote><emphasis>allow trusted domains = No</emphasis></quote> must be specified, as it is not compatible
2554 with multiple domain environments. The idmap uid and idmap gid ranges must also be
2558 <para>Default: <emphasis><parameter>idmap backend</parameter> =
2561 <para>Example: <emphasis><parameter>idmap backend</parameter> = ldap:ldap://ldapslave.example.com
2563 </para><para>Example: <emphasis><parameter>idmap backend</parameter> = idmap_rid:DOMNAME=1000-100000000
2566 </listitem></varlistentry>
2568 <indexterm significance="preferred"><primary>winbind gid</primary><see>idmap gid</see></indexterm><term><anchor id="WINBINDGID"/>winbind gid</term><listitem><para>This parameter is a synonym for idmap gid.</para></listitem></varlistentry><varlistentry>
2569 <indexterm significance="preferred"><primary>idmap gid</primary></indexterm><term><anchor id="IDMAPGID"/>idmap gid (G)</term><listitem>
2571 <para>The idmap gid parameter specifies the range of group ids that are allocated for
2572 the purpose of mapping UNX groups to NT group SIDs. This range of group ids should have no
2573 existing local or NIS groups within it as strange conflicts can occur otherwise.</para>
2575 <para>The availability of an idmap gid range is essential for correct operation of
2576 all group mapping.</para>
2578 <para>Default: <emphasis><parameter>idmap gid</parameter> =
2581 <para>Example: <emphasis><parameter>idmap gid</parameter> = 10000-20000
2584 </listitem></varlistentry>
2586 <indexterm significance="preferred"><primary>winbind uid</primary><see>idmap uid</see></indexterm><term><anchor id="WINBINDUID"/>winbind uid</term><listitem><para>This parameter is a synonym for idmap uid.</para></listitem></varlistentry><varlistentry>
2587 <indexterm significance="preferred"><primary>idmap uid</primary></indexterm><term><anchor id="IDMAPUID"/>idmap uid (G)</term><listitem>
2588 <para>The idmap uid parameter specifies the range of user ids that are allocated for use
2589 in mapping UNIX users to NT user SIDs. This range of ids should have no existing local
2590 or NIS users within it as strange conflicts can occur otherwise.</para>
2592 <para>Default: <emphasis><parameter>idmap uid</parameter> =
2595 <para>Example: <emphasis><parameter>idmap uid</parameter> = 10000-20000
2598 </listitem></varlistentry>
2600 <indexterm significance="preferred"><primary>include</primary></indexterm><term><anchor id="INCLUDE"/>include (G)</term><listitem>
2601 <para>This allows you to include one config file
2602 inside another. The file is included literally, as though typed
2605 <para>It takes the standard substitutions, except <parameter moreinfo="none">%u
2606 </parameter>, <parameter moreinfo="none">%P</parameter> and <parameter moreinfo="none">%S</parameter>.
2609 <para>Default: <emphasis><parameter>include</parameter> =
2612 <para>Example: <emphasis><parameter>include</parameter> = /usr/local/samba/lib/admin_smb.conf
2615 </listitem></varlistentry>
2617 <indexterm significance="preferred"><primary>inherit acls</primary></indexterm><term><anchor id="INHERITACLS"/>inherit acls (S)</term><listitem>
2618 <para>This parameter can be used to ensure that if default acls
2619 exist on parent directories, they are always honored when creating a
2620 subdirectory. The default behavior is to use the mode specified when
2621 creating the directory. Enabling this option sets the mode to 0777,
2622 thus guaranteeing that default directory acls are propagated.
2625 <para>Default: <emphasis><parameter>inherit acls</parameter> = no
2629 </listitem></varlistentry>
2631 <indexterm significance="preferred"><primary>inherit owner</primary></indexterm><term><anchor id="INHERITOWNER"/>inherit owner (S)</term><listitem>
2632 <para>The ownership of new files and directories
2633 is normally governed by effective uid of the connected user.
2634 This option allows the Samba administrator to specify that
2635 the ownership for new files and directories should be controlled
2636 by the ownership of the parent directory.</para>
2638 <para>Common scenarios where this behavior is useful is in
2639 implementing drop-boxes where users can create and edit files but not
2640 delete them and to ensure that newly create files in a user's
2641 roaming profile directory are actually owner by the user.</para>
2643 <para>Default: <emphasis><parameter>inherit owner</parameter> = no
2647 </listitem></varlistentry>
2649 <indexterm significance="preferred"><primary>inherit permissions</primary></indexterm><term><anchor id="INHERITPERMISSIONS"/>inherit permissions (S)</term><listitem>
2650 <para>The permissions on new files and directories
2651 are normally governed by <link linkend="CREATEMASK"><parameter moreinfo="none">
2652 create mask</parameter></link>, <link linkend="DIRECTORYMASK">
2653 <parameter moreinfo="none">directory mask</parameter></link>, <link linkend="FORCECREATEMODE">
2654 <parameter moreinfo="none">force create mode</parameter>
2655 </link> and <link linkend="FORCEDIRECTORYMODE"><parameter moreinfo="none">force
2656 directory mode</parameter></link> but the boolean inherit
2657 permissions parameter overrides this.</para>
2659 <para>New directories inherit the mode of the parent directory,
2660 including bits such as setgid.</para>
2662 <para>New files inherit their read/write bits from the parent
2663 directory. Their execute bits continue to be determined by
2664 <link linkend="MAPARCHIVE"><parameter moreinfo="none">map archive</parameter>
2665 </link>, <link linkend="MAPHIDDEN"><parameter moreinfo="none">map hidden</parameter>
2666 </link> and <link linkend="MAPSYSTEM"><parameter moreinfo="none">map system</parameter>
2667 </link> as usual.</para>
2669 <para>Note that the setuid bit is <emphasis>never</emphasis> set via
2670 inheritance (the code explicitly prohibits this).</para>
2672 <para>This can be particularly useful on large systems with
2673 many users, perhaps several thousand, to allow a single [homes]
2674 share to be used flexibly by each user.</para>
2676 <para>Default: <emphasis><parameter>inherit permissions</parameter> = no
2680 </listitem></varlistentry>
2682 <indexterm significance="preferred"><primary>interfaces</primary></indexterm><term><anchor id="INTERFACES"/>interfaces (G)</term><listitem>
2683 <para>This option allows you to override the default
2684 network interfaces list that Samba will use for browsing, name
2685 registration and other NBT traffic. By default Samba will query
2686 the kernel for the list of all active interfaces and use any
2687 interfaces except 127.0.0.1 that are broadcast capable.</para>
2689 <para>The option takes a list of interface strings. Each string
2690 can be in any of the following forms:</para>
2693 <listitem><para>a network interface name (such as eth0).
2694 This may include shell-like wildcards so eth* will match
2695 any interface starting with the substring "eth"</para></listitem>
2697 <listitem><para>an IP address. In this case the netmask is
2698 determined from the list of interfaces obtained from the
2699 kernel</para></listitem>
2701 <listitem><para>an IP/mask pair. </para></listitem>
2703 <listitem><para>a broadcast/mask pair.</para></listitem>
2706 <para>The "mask" parameters can either be a bit length (such
2707 as 24 for a C class network) or a full netmask in dotted
2708 decimal form.</para>
2710 <para>The "IP" parameters above can either be a full dotted
2711 decimal IP address or a hostname which will be looked up via
2712 the OS's normal hostname resolution mechanisms.</para>
2715 <para>Default: <emphasis><parameter>interfaces</parameter> =
2716 # all active interfaces except 127.0.0.1 that are broadcast capable
2719 <para>Example: <emphasis><parameter>interfaces</parameter> =
2721 # This would configure three network interfaces corresponding
2722 to the eth0 device and IP addresses 192.168.2.10 and 192.168.3.10.
2723 The netmasks of the latter two interfaces would be set to 255.255.255.0.
2724 eth0 192.168.2.10/24 192.168.3.10/255.255.255.0
2728 </listitem></varlistentry>
2730 <indexterm significance="preferred"><primary>invalid users</primary></indexterm><term><anchor id="INVALIDUSERS"/>invalid users (S)</term><listitem>
2731 <para>This is a list of users that should not be allowed
2732 to login to this service. This is really a <emphasis>paranoid</emphasis>
2733 check to absolutely ensure an improper setting does not breach
2734 your security.</para>
2736 <para>A name starting with a '@' is interpreted as an NIS
2737 netgroup first (if your system supports NIS), and then as a UNIX
2738 group if the name was not found in the NIS netgroup database.</para>
2740 <para>A name starting with '+' is interpreted only
2741 by looking in the UNIX group database. A name starting with
2742 '&' is interpreted only by looking in the NIS netgroup database
2743 (this requires NIS to be working on your system). The characters
2744 '+' and '&' may be used at the start of the name in either order
2745 so the value <parameter moreinfo="none">+&group</parameter> means check the
2746 UNIX group database, followed by the NIS netgroup database, and
2747 the value <parameter moreinfo="none">&+group</parameter> means check the NIS
2748 netgroup database, followed by the UNIX group database (the
2749 same as the '@' prefix).</para>
2751 <para>The current servicename is substituted for <parameter moreinfo="none">%S</parameter>.
2752 This is useful in the [homes] section.</para>
2754 <para>Default: <emphasis><parameter>invalid users</parameter> =
2758 <para>Example: <emphasis><parameter>invalid users</parameter> = root fred admin @wheel
2761 </listitem></varlistentry>
2763 <indexterm significance="preferred"><primary>keepalive</primary></indexterm><term><anchor id="KEEPALIVE"/>keepalive (G)</term><listitem>
2764 <para>The value of the parameter (an integer) represents
2765 the number of seconds between <parameter moreinfo="none">keepalive</parameter>
2766 packets. If this parameter is zero, no keepalive packets will be
2767 sent. Keepalive packets, if sent, allow the server to tell whether
2768 a client is still present and responding.</para>
2770 <para>Keepalives should, in general, not be needed if the socket
2771 being used has the SO_KEEPALIVE attribute set on it (see <link linkend="SOCKETOPTIONS">
2772 <parameter moreinfo="none">socket options</parameter></link>).
2773 Basically you should only use this option if you strike difficulties.</para>
2775 <para>Default: <emphasis><parameter>keepalive</parameter> = 300
2778 <para>Example: <emphasis><parameter>keepalive</parameter> = 600
2781 </listitem></varlistentry>
2783 <indexterm significance="preferred"><primary>kernel change notify</primary></indexterm><term><anchor id="KERNELCHANGENOTIFY"/>kernel change notify (G)</term><listitem>
2784 <para>This parameter specifies whether Samba should ask the
2785 kernel for change notifications in directories so that
2786 SMB clients can refresh whenever the data on the server changes.
2789 <para>This parameter is only used when your kernel supports
2790 change notification to user programs, using the F_NOTIFY fcntl.
2793 <para>Default: <emphasis><parameter>kernel change notify</parameter> = yes
2797 </listitem></varlistentry>
2799 <indexterm significance="preferred"><primary>kernel oplocks</primary></indexterm><term><anchor id="KERNELOPLOCKS"/>kernel oplocks (G)</term><listitem>
2800 <para>For UNIXes that support kernel based <link linkend="OPLOCKS">
2801 <parameter moreinfo="none">oplocks</parameter></link>
2802 (currently only IRIX and the Linux 2.4 kernel), this parameter
2803 allows the use of them to be turned on or off.</para>
2805 <para>Kernel oplocks support allows Samba <parameter moreinfo="none">oplocks
2806 </parameter> to be broken whenever a local UNIX process or NFS operation
2807 accesses a file that <citerefentry><refentrytitle>smbd</refentrytitle>
2808 <manvolnum>8</manvolnum></citerefentry> has oplocked. This allows complete
2809 data consistency between SMB/CIFS, NFS and local file access (and is
2810 a <emphasis>very</emphasis> cool feature :-).</para>
2812 <para>This parameter defaults to <constant>on</constant>, but is translated
2813 to a no-op on systems that no not have the necessary kernel support.
2814 You should never need to touch this parameter.</para>
2816 <para>Default: <emphasis><parameter>kernel oplocks</parameter> = yes
2820 </listitem></varlistentry>
2822 <indexterm significance="preferred"><primary>lanman auth</primary></indexterm><term><anchor id="LANMANAUTH"/>lanman auth (G)</term><listitem>
2823 <para>This parameter determines whether or not <citerefentry><refentrytitle>smbd</refentrytitle>
2824 <manvolnum>8</manvolnum></citerefentry> will attempt to
2825 authenticate users or permit password changes
2826 using the LANMAN password hash. If disabled, only clients which support NT
2827 password hashes (e.g. Windows NT/2000 clients, smbclient, but not
2828 Windows 95/98 or the MS DOS network client) will be able to
2829 connect to the Samba host.</para>
2831 <para>The LANMAN encrypted response is easily broken, due to it's
2832 case-insensitive nature, and the choice of algorithm. Servers
2833 without Windows 95/98/ME or MS DOS clients are advised to disable
2834 this option. </para>
2836 <para>Unlike the <command moreinfo="none">encypt
2837 passwords</command> option, this parameter cannot alter client
2838 behaviour, and the LANMAN response will still be sent over the
2839 network. See the <command moreinfo="none">client lanman
2840 auth</command> to disable this for Samba's clients (such as smbclient)</para>
2842 <para>If this option, and <command moreinfo="none">ntlm
2843 auth</command> are both disabled, then only NTLMv2 logins will be
2844 permited. Not all clients support NTLMv2, and most will require
2845 special configuration to use it.</para>
2847 <para>Default: <emphasis><parameter>lanman auth</parameter> = yes
2851 </listitem></varlistentry>
2853 <indexterm significance="preferred"><primary>large readwrite</primary></indexterm><term><anchor id="LARGEREADWRITE"/>large readwrite (G)</term><listitem>
2854 <para>This parameter determines whether or not
2855 <citerefentry><refentrytitle>smbd</refentrytitle>
2856 <manvolnum>8</manvolnum></citerefentry> supports the new 64k
2857 streaming read and write varient SMB requests introduced with
2858 Windows 2000. Note that due to Windows 2000 client redirector bugs
2859 this requires Samba to be running on a 64-bit capable operating
2860 system such as IRIX, Solaris or a Linux 2.4 kernel. Can improve
2861 performance by 10% with Windows 2000 clients. Defaults to on. Not as
2862 tested as some other Samba code paths.</para>
2864 <para>Default: <emphasis><parameter>large readwrite</parameter> = yes
2868 </listitem></varlistentry>
2870 <indexterm significance="preferred"><primary>ldap admin dn</primary></indexterm><term><anchor id="LDAPADMINDN"/>ldap admin dn (G)</term><listitem>
2871 <para> The <parameter moreinfo="none">ldap admin dn</parameter>
2872 defines the Distinguished Name (DN) name used by Samba to
2873 contact the ldap server when retreiving user account
2874 information. The <parameter moreinfo="none">ldap admin
2875 dn</parameter> is used in conjunction with the admin dn password
2876 stored in the <filename moreinfo="none">private/secrets.tdb</filename> file.
2877 See the <citerefentry><refentrytitle>smbpasswd</refentrytitle>
2878 <manvolnum>8</manvolnum></citerefentry> man page for more
2879 information on how to accmplish this.</para>
2881 <para><emphasis>No default</emphasis></para>
2883 </listitem></varlistentry>
2885 <indexterm significance="preferred"><primary>ldap delete dn</primary></indexterm><term><anchor id="LDAPDELETEDN"/>ldap delete dn (G)</term><listitem>
2886 <para> This parameter specifies whether a delete
2887 operation in the ldapsam deletes the complete entry or only the attributes
2891 <para>Default: <emphasis><parameter>ldap delete dn</parameter> = no
2895 </listitem></varlistentry>
2897 <indexterm significance="preferred"><primary>ldap filter</primary></indexterm><term><anchor id="LDAPFILTER"/>ldap filter (G)</term><listitem>
2898 <para>This parameter specifies the RFC 2254 compliant LDAP search filter.
2899 The default is to match the login name with the <constant>uid</constant>
2900 attribute. Note that this filter should only return one entry.
2903 <para>Default: <emphasis><parameter>ldap filter</parameter> = (uid=%u)
2906 <para>Example: <emphasis><parameter>ldap filter</parameter> = (&(uid=%u)(objectclass=sambaSamAccount))
2909 </listitem></varlistentry>
2911 <indexterm significance="preferred"><primary>ldap group suffix</primary></indexterm><term><anchor id="LDAPGROUPSUFFIX"/>ldap group suffix (G)</term><listitem>
2912 <para>This parameters specifies the suffix that is
2913 used for groups when these are added to the LDAP directory.
2914 If this parameter is unset, the value of <parameter>ldap suffix</parameter> will be used instead.</para>
2917 <para>Default: <emphasis><parameter>ldap group suffix</parameter> =
2920 <para>Example: <emphasis><parameter>ldap group suffix</parameter> = ou=Groups,dc=samba,ou=Groups
2923 </listitem></varlistentry>
2925 <indexterm significance="preferred"><primary>ldap idmap suffix</primary></indexterm><term><anchor id="LDAPIDMAPSUFFIX"/>ldap idmap suffix (G)</term><listitem>
2926 <para>This parameters specifies the suffix that is
2927 used when storing idmap mappings. If this parameter
2928 is unset, the value of <parameter>ldap suffix</parameter>
2929 will be used instead.</para>
2931 <para>Default: <emphasis><parameter>ldap idmap suffix</parameter> =
2934 <para>Example: <emphasis><parameter>ldap idmap suffix</parameter> = ou=Idmap,dc=samba,dc=org
2937 </listitem></varlistentry>
2939 <indexterm significance="preferred"><primary>ldap machine suffix</primary></indexterm><term><anchor id="LDAPMACHINESUFFIX"/>ldap machine suffix (G)</term><listitem>
2940 <para>It specifies where machines should be added to the ldap tree.</para>
2942 <para>Default: <emphasis><parameter>ldap machine suffix</parameter> =
2946 </listitem></varlistentry>
2948 <indexterm significance="preferred"><primary>ldap passwd sync</primary></indexterm><term><anchor id="LDAPPASSWDSYNC"/>ldap passwd sync (G)</term><listitem>
2949 <para>This option is used to define whether
2950 or not Samba should sync the LDAP password with the NT
2951 and LM hashes for normal accounts (NOT for
2952 workstation, server or domain trusts) on a password
2956 <para>The <parameter moreinfo="none">ldap passwd
2957 sync</parameter> can be set to one of three values: </para>
2961 <para><parameter moreinfo="none">Yes</parameter> = Try
2962 to update the LDAP, NT and LM passwords and update the pwdLastSet time.</para>
2966 <para><parameter moreinfo="none">No</parameter> = Update NT and
2967 LM passwords and update the pwdLastSet time.</para>
2971 <para><parameter moreinfo="none">Only</parameter> = Only update
2972 the LDAP password and let the LDAP server do the rest.</para>
2976 <para>Default: <emphasis><parameter>ldap passwd sync</parameter> = no
2980 </listitem></varlistentry>
2982 <indexterm significance="preferred"><primary>ldap port</primary></indexterm><term><anchor id="LDAPPORT"/>ldap port (G)</term><listitem>
2983 <para>This parameter is only available if Samba has been
2984 configure to include the <command moreinfo="none">--with-ldapsam</command> option
2985 at compile time.</para>
2987 <para>This option is used to control the tcp port number used to contact
2988 the <link linkend="LDAPSERVER"><parameter moreinfo="none">ldap server</parameter></link>.
2989 The default is to use the stand LDAPS port 636.</para>
2991 <para>Default: <emphasis><parameter>ldap port</parameter> = 636
2994 </para><para>Default: <emphasis><parameter>ldap port</parameter> = 389
2999 </listitem></varlistentry>
3001 <indexterm significance="preferred"><primary>ldap replication sleep</primary></indexterm><term><anchor id="LDAPREPLICATIONSLEEP"/>ldap replication sleep (G)</term><listitem>
3002 <para>When Samba is asked to write to a read-only LDAP
3003 replica, we are redirected to talk to the read-write master server.
3004 This server then replicates our changes back to the 'local' server,
3005 however the replication might take some seconds, especially over slow
3006 links. Certain client activities, particularly domain joins, can become
3007 confused by the 'success' that does not immediately change the LDAP
3008 back-end's data. </para>
3009 <para>This option simply causes Samba to wait a short time, to
3010 allow the LDAP server to catch up. If you have a particularly
3011 high-latency network, you may wish to time the LDAP replication with a
3012 network sniffer, and increase this value accordingly. Be aware that no
3013 checking is performed that the data has actually replicated.</para>
3014 <para>The value is specified in milliseconds, the maximum
3015 value is 5000 (5 seconds).</para>
3017 <para>Default: <emphasis><parameter>ldap replication sleep</parameter> = 1000
3021 </listitem></varlistentry>
3023 <indexterm significance="preferred"><primary>ldapsam:trusted</primary></indexterm><term><anchor id="LDAPSAM:TRUSTED"/>ldapsam:trusted (G)</term><listitem>
3026 By default, Samba as a Domain Controller with an LDAP backend needs to use the
3027 Unix-style NSS subsystem to access user and group information. Due to the way
3028 Unix stores user information in /etc/passwd and /etc/group this inevitably
3029 leads to inefficiencies. One important question a user needs to know is the
3030 list of groups he is member of. The plain Unix model involves a complete
3031 enumeration of the file /etc/group and its NSS counterparts in LDAP. In this
3032 particular case there often optimized functions are available in Unix, but for
3033 other queries there is no optimized function available.</para>
3035 <para>To make Samba scale well in large environments, the ldapsam:trusted=yes
3036 option assumes that the complete user and group database that is relevant to
3037 Samba is stored in LDAP with the standard posixAccount/posixGroup model, and
3038 that the Samba auxiliary object classes are stored together with the the posix
3039 data in the same LDAP object. If these assumptions are met,
3040 ldapsam:trusted=yes can be activated and Samba can completely bypass the NSS
3041 system to query user information. Optimized LDAP queries can speed up domain
3042 logon and administration tasks a lot. Depending on the size of the LDAP
3043 database a factor of 100 or more for common queries is easily achieved.</para>
3046 <para>Default: <emphasis><parameter>ldapsam:trusted</parameter> = no
3050 </listitem></varlistentry>
3052 <indexterm significance="preferred"><primary>ldap server</primary></indexterm><term><anchor id="LDAPSERVER"/>ldap server (G)</term><listitem>
3053 <para>This parameter is only available if Samba has been
3054 configure to include the <command moreinfo="none">--with-ldapsam</command>
3055 option at compile time.</para>
3057 <para>This parameter should contain the FQDN of the ldap directory
3058 server which should be queried to locate user account information.
3061 <para>Default: <emphasis><parameter>ldap server</parameter> = localhost
3065 </listitem></varlistentry>
3067 <indexterm significance="preferred"><primary>ldap ssl</primary></indexterm><term><anchor id="LDAPSSL"/>ldap ssl (G)</term><listitem>
3068 <para>This option is used to define whether or not Samba should
3069 use SSL when connecting to the ldap server
3070 This is <emphasis>NOT</emphasis> related to
3071 Samba's previous SSL support which was enabled by specifying the
3072 <command moreinfo="none">--with-ssl</command> option to the <filename moreinfo="none">configure</filename>
3075 <para>The <parameter moreinfo="none">ldap ssl</parameter> can be set to one of three values:</para>
3078 <para><parameter moreinfo="none">Off</parameter> = Never
3079 use SSL when querying the directory.</para>
3083 <para><parameter moreinfo="none">Start_tls</parameter> = Use
3084 the LDAPv3 StartTLS extended operation (RFC2830) for
3085 communicating with the directory server.</para>
3089 <para><parameter moreinfo="none">On</parameter> = Use SSL
3090 on the ldaps port when contacting the <parameter moreinfo="none">ldap server</parameter>. Only available when the
3091 backwards-compatiblity <command moreinfo="none">--with-ldapsam</command> option is specified
3092 to configure. See <link linkend="PASSDBBACKEND"><parameter moreinfo="none">passdb backend</parameter></link></para>
3096 <para>Default: <emphasis><parameter>ldap ssl</parameter> = start_tls
3100 </listitem></varlistentry>
3102 <indexterm significance="preferred"><primary>ldap suffix</primary></indexterm><term><anchor id="LDAPSUFFIX"/>ldap suffix (G)</term><listitem>
3103 <para>Specifies where user and machine accounts are added to the
3104 tree. Can be overriden by <command moreinfo="none">ldap user
3105 suffix</command> and <command moreinfo="none">ldap machine
3106 suffix</command>. It also used as the base dn for all ldap
3109 <para>Default: <emphasis><parameter>ldap suffix</parameter> =
3113 </listitem></varlistentry>
3115 <indexterm significance="preferred"><primary>ldap timeout</primary></indexterm><term><anchor id="LDAPTIMEOUT"/>ldap timeout (G)</term><listitem>
3116 <para>When Samba connects to an ldap server that server
3117 may be down or unreachable. To prevent Samba from hanging whilst
3118 waiting for the connection this parameter specifies in seconds how
3119 long Samba should wait before failing the connect. The default is
3120 to only wait fifteen seconds for the ldap server to respond to the
3121 connect request.</para>
3123 <para>Default: <emphasis><parameter>ldap timeout</parameter> = 15
3127 </listitem></varlistentry>
3129 <indexterm significance="preferred"><primary>ldap user suffix</primary></indexterm><term><anchor id="LDAPUSERSUFFIX"/>ldap user suffix (G)</term><listitem>
3130 <para>This parameter specifies where users are added to the tree.
3131 If this parameter is not specified, the value from <command>ldap suffix</command>.</para>
3134 <para>Default: <emphasis><parameter>ldap user suffix</parameter> =
3138 </listitem></varlistentry>
3140 <indexterm significance="preferred"><primary>level2 oplocks</primary></indexterm><term><anchor id="LEVEL2OPLOCKS"/>level2 oplocks (S)</term><listitem>
3141 <para>This parameter controls whether Samba supports
3142 level2 (read-only) oplocks on a share.</para>
3144 <para>Level2, or read-only oplocks allow Windows NT clients
3145 that have an oplock on a file to downgrade from a read-write oplock
3146 to a read-only oplock once a second client opens the file (instead
3147 of releasing all oplocks on a second open, as in traditional,
3148 exclusive oplocks). This allows all openers of the file that
3149 support level2 oplocks to cache the file for read-ahead only (ie.
3150 they may not cache writes or lock requests) and increases performance
3151 for many accesses of files that are not commonly written (such as
3152 application .EXE files).</para>
3154 <para>Once one of the clients which have a read-only oplock
3155 writes to the file all clients are notified (no reply is needed
3156 or waited for) and told to break their oplocks to "none" and
3157 delete any read-ahead caches.</para>
3159 <para>It is recommended that this parameter be turned on to
3160 speed access to shared executables.</para>
3162 <para>For more discussions on level2 oplocks see the CIFS spec.</para>
3164 <para>Currently, if <link linkend="KERNELOPLOCKS"><parameter moreinfo="none">kernel
3165 oplocks</parameter></link> are supported then level2 oplocks are
3166 not granted (even if this parameter is set to <constant>yes</constant>).
3167 Note also, the <link linkend="OPLOCKS"><parameter moreinfo="none">oplocks</parameter>
3168 </link> parameter must be set to <constant>yes</constant> on this share in order for
3169 this parameter to have any effect.</para>
3171 <para>Default: <emphasis><parameter>level2 oplocks</parameter> = yes
3175 </listitem></varlistentry>
3177 <indexterm significance="preferred"><primary>lm announce</primary></indexterm><term><anchor id="LMANNOUNCE"/>lm announce (G)</term><listitem>
3178 <para>This parameter determines if <citerefentry><refentrytitle>nmbd</refentrytitle>
3179 <manvolnum>8</manvolnum></citerefentry> will produce Lanman announce
3180 broadcasts that are needed by OS/2 clients in order for them to see
3181 the Samba server in their browse list. This parameter can have three
3182 values, <constant>yes</constant>, <constant>no</constant>, or
3183 <constant>auto</constant>. The default is <constant>auto</constant>.
3184 If set to <constant>no</constant> Samba will never produce these
3185 broadcasts. If set to <constant>yes</constant> Samba will produce
3186 Lanman announce broadcasts at a frequency set by the parameter
3187 <parameter moreinfo="none">lm interval</parameter>. If set to <constant>auto</constant>
3188 Samba will not send Lanman announce broadcasts by default but will
3189 listen for them. If it hears such a broadcast on the wire it will
3190 then start sending them at a frequency set by the parameter
3191 <parameter moreinfo="none">lm interval</parameter>.</para>
3193 <para>Default: <emphasis><parameter>lm announce</parameter> = auto
3196 <para>Example: <emphasis><parameter>lm announce</parameter> = yes
3199 </listitem></varlistentry>
3201 <indexterm significance="preferred"><primary>lm interval</primary></indexterm><term><anchor id="LMINTERVAL"/>lm interval (G)</term><listitem>
3202 <para>If Samba is set to produce Lanman announce
3203 broadcasts needed by OS/2 clients (see the <link linkend="LMANNOUNCE">
3204 <parameter moreinfo="none">lm announce</parameter></link> parameter) then this
3205 parameter defines the frequency in seconds with which they will be
3206 made. If this is set to zero then no Lanman announcements will be
3207 made despite the setting of the <parameter moreinfo="none">lm announce</parameter>
3210 <para>Default: <emphasis><parameter>lm interval</parameter> = 60
3213 <para>Example: <emphasis><parameter>lm interval</parameter> = 120
3216 </listitem></varlistentry>
3218 <indexterm significance="preferred"><primary>load printers</primary></indexterm><term><anchor id="LOADPRINTERS"/>load printers (G)</term><listitem>
3219 <para>A boolean variable that controls whether all
3220 printers in the printcap will be loaded for browsing by default.
3221 See the <link linkend="PRINTERSSECT">printers</link> section for
3222 more details.</para>
3224 <para>Default: <emphasis><parameter>load printers</parameter> = yes
3228 </listitem></varlistentry>
3230 <indexterm significance="preferred"><primary>local master</primary></indexterm><term><anchor id="LOCALMASTER"/>local master (G)</term><listitem>
3231 <para>This option allows <citerefentry><refentrytitle>nmbd</refentrytitle>
3232 <manvolnum>8</manvolnum></citerefentry> to try and become a local master browser
3233 on a subnet. If set to <constant>no</constant> then <command moreinfo="none">
3234 nmbd</command> will not attempt to become a local master browser
3235 on a subnet and will also lose in all browsing elections. By
3236 default this value is set to <constant>yes</constant>. Setting this value to
3237 <constant>yes</constant> doesn't mean that Samba will <emphasis>become</emphasis> the
3238 local master browser on a subnet, just that <command moreinfo="none">nmbd</command>
3239 will <emphasis>participate</emphasis> in elections for local master browser.</para>
3241 <para>Setting this value to <constant>no</constant> will cause <command moreinfo="none">nmbd</command> <emphasis>never</emphasis> to become a local
3242 master browser.</para>
3244 <para>Default: <emphasis><parameter>local master</parameter> = yes
3248 </listitem></varlistentry>
3250 <indexterm significance="preferred"><primary>lock dir</primary><see>lock directory</see></indexterm><term><anchor id="LOCKDIR"/>lock dir</term><listitem><para>This parameter is a synonym for lock directory.</para></listitem></varlistentry><varlistentry>
3251 <indexterm significance="preferred"><primary>lock directory</primary></indexterm><term><anchor id="LOCKDIRECTORY"/>lock directory (G)</term><listitem>
3252 <para>This option specifies the directory where lock
3253 files will be placed. The lock files are used to implement the
3254 <link linkend="MAXCONNECTIONS"><parameter moreinfo="none">max connections</parameter>
3255 </link> option.</para>
3257 <para>Default: <emphasis><parameter>lock directory</parameter> = ${prefix}/var/locks
3260 <para>Example: <emphasis><parameter>lock directory</parameter> = /var/run/samba/locks
3263 </listitem></varlistentry>
3265 <indexterm significance="preferred"><primary>locking</primary></indexterm><term><anchor id="LOCKING"/>locking (S)</term><listitem>
3266 <para>This controls whether or not locking will be
3267 performed by the server in response to lock requests from the
3270 <para>If <command moreinfo="none">locking = no</command>, all lock and unlock
3271 requests will appear to succeed and all lock queries will report
3272 that the file in question is available for locking.</para>
3274 <para>If <command moreinfo="none">locking = yes</command>, real locking will be performed
3275 by the server.</para>
3277 <para>This option <emphasis>may</emphasis> be useful for read-only
3278 filesystems which <emphasis>may</emphasis> not need locking (such as
3279 CDROM drives), although setting this parameter of <constant>no</constant>
3280 is not really recommended even in this case.</para>
3282 <para>Be careful about disabling locking either globally or in a
3283 specific service, as lack of locking may result in data corruption.
3284 You should never need to set this parameter.</para>
3286 <para><emphasis>No default</emphasis></para>
3288 </listitem></varlistentry>
3290 <indexterm significance="preferred"><primary>lock spin count</primary></indexterm><term><anchor id="LOCKSPINCOUNT"/>lock spin count (G)</term><listitem>
3291 <para>This parameter controls the number of times
3292 that smbd should attempt to gain a byte range lock on the
3293 behalf of a client request. Experiments have shown that
3294 Windows 2k servers do not reply with a failure if the lock
3295 could not be immediately granted, but try a few more times
3296 in case the lock could later be acquired. This behavior
3297 is used to support PC database formats such as MS Access
3301 <para>Default: <emphasis><parameter>lock spin count</parameter> = 3
3305 </listitem></varlistentry>
3307 <indexterm significance="preferred"><primary>lock spin time</primary></indexterm><term><anchor id="LOCKSPINTIME"/>lock spin time (G)</term><listitem>
3308 <para>The time in microseconds that smbd should
3309 pause before attempting to gain a failed lock. See
3310 <link linkend="LOCKSPINCOUNT"><parameter moreinfo="none">lock spin
3311 count</parameter></link> for more details.</para>
3313 <para>Default: <emphasis><parameter>lock spin time</parameter> = 10
3317 </listitem></varlistentry>
3319 <indexterm significance="preferred"><primary>log file</primary></indexterm><term><anchor id="LOGFILE"/>log file (G)</term><listitem>
3320 <para>This option allows you to override the name
3321 of the Samba log file (also known as the debug file).</para>
3323 <para>This option takes the standard substitutions, allowing
3324 you to have separate log files for each user or machine.</para>
3326 <para><emphasis>No default</emphasis></para>
3327 <para>Example: <emphasis><parameter>log file</parameter> = /usr/local/samba/var/log.%m
3330 </listitem></varlistentry>
3332 <indexterm significance="preferred"><primary>debuglevel</primary><see>log level</see></indexterm><term><anchor id="DEBUGLEVEL"/>debuglevel</term><listitem><para>This parameter is a synonym for log level.</para></listitem></varlistentry><varlistentry>
3333 <indexterm significance="preferred"><primary>log level</primary></indexterm><term><anchor id="LOGLEVEL"/>log level (G)</term><listitem>
3334 <para>The value of the parameter (a astring) allows
3335 the debug level (logging level) to be specified in the
3336 <filename moreinfo="none">smb.conf</filename> file. This parameter has been
3337 extended since the 2.2.x series, now it allow to specify the debug
3338 level for multiple debug classes. This is to give greater
3339 flexibility in the configuration of the system.</para>
3341 <para>The default will be the log level specified on
3342 the command line or level zero if none was specified.</para>
3345 <para><emphasis>No default</emphasis></para>
3346 <para>Example: <emphasis><parameter>log level</parameter> = 3 passdb:5 auth:10 winbind:2
3349 </listitem></varlistentry>
3351 <indexterm significance="preferred"><primary>logon drive</primary></indexterm><term><anchor id="LOGONDRIVE"/>logon drive (G)</term><listitem>
3352 <para>This parameter specifies the local path to
3353 which the home directory will be connected (see <link linkend="LOGONHOME">
3354 <parameter moreinfo="none">logon home</parameter></link>)
3355 and is only used by NT Workstations. </para>
3357 <para>Note that this option is only useful if Samba is set up as a
3358 logon server.</para>
3360 <para>Default: <emphasis><parameter>logon drive</parameter> = z:
3363 <para>Example: <emphasis><parameter>logon drive</parameter> = h:
3366 </listitem></varlistentry>
3368 <indexterm significance="preferred"><primary>logon home</primary></indexterm><term><anchor id="LOGONHOME"/>logon home (G)</term><listitem>
3369 <para>This parameter specifies the home directory
3370 location when a Win95/98 or NT Workstation logs into a Samba PDC.
3371 It allows you to do </para>
3373 <para><prompt moreinfo="none">C:\></prompt>
3374 <userinput moreinfo="none">NET USE H: /HOME</userinput>
3377 <para>from a command prompt, for example.</para>
3379 <para>This option takes the standard substitutions, allowing
3380 you to have separate logon scripts for each user or machine.</para>
3382 <para>This parameter can be used with Win9X workstations to ensure
3383 that roaming profiles are stored in a subdirectory of the user's
3384 home directory. This is done in the following way:</para>
3386 <para><command moreinfo="none">logon home = \\%N\%U\profile</command></para>
3388 <para>This tells Samba to return the above string, with
3389 substitutions made when a client requests the info, generally
3390 in a NetUserGetInfo request. Win9X clients truncate the info to
3391 \\server\share when a user does <command moreinfo="none">net use /home</command>
3392 but use the whole string when dealing with profiles.</para>
3394 <para>Note that in prior versions of Samba, the <link linkend="LOGONPATH">
3395 <parameter moreinfo="none">logon path</parameter></link> was returned rather than
3396 <parameter moreinfo="none">logon home</parameter>. This broke <command moreinfo="none">net use /home</command> but allowed profiles outside the home directory.
3397 The current implementation is correct, and can be used for profiles if you use
3398 the above trick.</para>
3400 <para>This option is only useful if Samba is set up as a logon
3403 <para>Default: <emphasis><parameter>logon home</parameter> = \\%N\%U
3406 <para>Example: <emphasis><parameter>logon home</parameter> = \\remote_smb_server\%U
3409 </listitem></varlistentry>
3411 <indexterm significance="preferred"><primary>logon path</primary></indexterm><term><anchor id="LOGONPATH"/>logon path (G)</term><listitem>
3412 <para>This parameter specifies the home directory
3413 where roaming profiles (NTuser.dat etc files for Windows NT) are
3414 stored. Contrary to previous versions of these manual pages, it has
3415 nothing to do with Win 9X roaming profiles. To find out how to
3416 handle roaming profiles for Win 9X system, see the <link linkend="LOGONHOME">
3417 <parameter moreinfo="none">logon home</parameter></link> parameter.</para>
3419 <para>This option takes the standard substitutions, allowing you
3420 to have separate logon scripts for each user or machine. It also
3421 specifies the directory from which the "Application Data",
3422 (<filename moreinfo="none">desktop</filename>, <filename moreinfo="none">start menu</filename>,
3423 <filename moreinfo="none">network neighborhood</filename>, <filename moreinfo="none">programs</filename>
3424 and other folders, and their contents, are loaded and displayed on
3425 your Windows NT client.</para>
3427 <para>The share and the path must be readable by the user for
3428 the preferences and directories to be loaded onto the Windows NT
3429 client. The share must be writeable when the user logs in for the first
3430 time, in order that the Windows NT client can create the NTuser.dat
3431 and other directories.</para>
3433 <para>Thereafter, the directories and any of the contents can,
3434 if required, be made read-only. It is not advisable that the
3435 NTuser.dat file be made read-only - rename it to NTuser.man to
3436 achieve the desired effect (a <emphasis>MAN</emphasis>datory
3439 <para>Windows clients can sometimes maintain a connection to
3440 the [homes] share, even though there is no user logged in.
3441 Therefore, it is vital that the logon path does not include a
3442 reference to the homes share (i.e. setting this parameter to
3443 \%N\%U\profile_path will cause problems).</para>
3445 <para>This option takes the standard substitutions, allowing
3446 you to have separate logon scripts for each user or machine.</para>
3450 Do not quote the value. Setting this as <quote><emphasis>\\%N\profile\%U</emphasis></quote>
3451 will break profile handling. </para>
3454 <para>Note that this option is only useful if Samba is set up
3455 as a logon server.</para>
3457 <para>Default: <emphasis><parameter>logon path</parameter> = \\%N\%U\profile
3460 <para>Example: <emphasis><parameter>logon path</parameter> = >\\PROFILESERVER\PROFILE\%U
3463 </listitem></varlistentry>
3465 <indexterm significance="preferred"><primary>logon script</primary></indexterm><term><anchor id="LOGONSCRIPT"/>logon script (G)</term><listitem>
3466 <para>This parameter specifies the batch file (.bat) or
3467 NT command file (.cmd) to be downloaded and run on a machine when
3468 a user successfully logs in. The file must contain the DOS
3469 style CR/LF line endings. Using a DOS-style editor to create the
3470 file is recommended.</para>
3472 <para>The script must be a relative path to the [netlogon]
3473 service. If the [netlogon] service specifies a <link linkend="PATH">
3474 <parameter moreinfo="none">path</parameter></link> of <filename moreinfo="none">/usr/local/samba/netlogon</filename>, and <command moreinfo="none">logon script = STARTUP.BAT</command>, then
3475 the file that will be downloaded is:</para>
3477 <para><filename moreinfo="none">/usr/local/samba/netlogon/STARTUP.BAT</filename></para>
3479 <para>The contents of the batch file are entirely your choice. A
3480 suggested command would be to add <command moreinfo="none">NET TIME \\SERVER /SET
3481 /YES</command>, to force every machine to synchronize clocks with
3482 the same time server. Another use would be to add <command moreinfo="none">NET USE
3483 U: \\SERVER\UTILS</command> for commonly used utilities, or <screen>
3484 <userinput>NET USE Q: \\SERVER\ISO9001_QA</userinput></screen> for example.</para>
3486 <para>Note that it is particularly important not to allow write
3487 access to the [netlogon] share, or to grant users write permission
3488 on the batch files in a secure environment, as this would allow
3489 the batch files to be arbitrarily modified and security to be
3492 <para>This option takes the standard substitutions, allowing you
3493 to have separate logon scripts for each user or machine.</para>
3495 <para>This option is only useful if Samba is set up as a logon
3498 <para>Default: <emphasis><parameter>logon script</parameter> =
3501 <para>Example: <emphasis><parameter>logon script</parameter> = scripts\%U.bat
3504 </listitem></varlistentry>
3506 <indexterm significance="preferred"><primary>lppause command</primary></indexterm><term><anchor id="LPPAUSECOMMAND"/>lppause command (S)</term><listitem>
3507 <para>This parameter specifies the command to be
3508 executed on the server host in order to stop printing or spooling
3509 a specific print job.</para>
3511 <para>This command should be a program or script which takes
3512 a printer name and job number to pause the print job. One way
3513 of implementing this is by using job priorities, where jobs
3514 having a too low priority won't be sent to the printer.</para>
3516 <para>If a <parameter moreinfo="none">%p</parameter> is given then the printer name
3517 is put in its place. A <parameter moreinfo="none">%j</parameter> is replaced with
3518 the job number (an integer). On HPUX (see <parameter moreinfo="none">printing=hpux
3519 </parameter>), if the <parameter moreinfo="none">-p%p</parameter> option is added
3520 to the lpq command, the job will show up with the correct status, i.e.
3521 if the job priority is lower than the set fence priority it will
3522 have the PAUSED status, whereas if the priority is equal or higher it
3523 will have the SPOOLED or PRINTING status.</para>
3525 <para>Note that it is good practice to include the absolute path
3526 in the lppause command as the PATH may not be available to the server.</para>
3528 <para>Default: <emphasis><parameter>lppause command</parameter> =
3529 # Currently no default value is given to
3530 this string, unless the value of the <parameter moreinfo="none">printing</parameter>
3531 parameter is <constant>SYSV</constant>, in which case the default is : <command moreinfo="none">lp -i %p-%j -H hold</command> or if the value of the <parameter moreinfo="none">printing</parameter> parameter is <constant>SOFTQ</constant>, then the default is: <command moreinfo="none">qstat -s -j%j -h</command>.
3534 <para>Example: <emphasis><parameter>lppause command</parameter> = /usr/bin/lpalt %p-%j -p0
3537 </listitem></varlistentry>
3539 <indexterm significance="preferred"><primary>lpq cache time</primary></indexterm><term><anchor id="LPQCACHETIME"/>lpq cache time (G)</term><listitem>
3540 <para>This controls how long lpq info will be cached
3541 for to prevent the <command moreinfo="none">lpq</command> command being called too
3542 often. A separate cache is kept for each variation of the <command moreinfo="none">
3543 lpq</command> command used by the system, so if you use different
3544 <command moreinfo="none">lpq</command> commands for different users then they won't
3545 share cache information.</para>
3547 <para>The cache files are stored in <filename moreinfo="none">/tmp/lpq.xxxx</filename>
3548 where xxxx is a hash of the <command moreinfo="none">lpq</command> command in use.</para>
3550 <para>The default is 10 seconds, meaning that the cached results
3551 of a previous identical <command moreinfo="none">lpq</command> command will be used
3552 if the cached data is less than 10 seconds old. A large value may
3553 be advisable if your <command moreinfo="none">lpq</command> command is very slow.</para>
3555 <para>A value of 0 will disable caching completely.</para>
3557 <para>Default: <emphasis><parameter>lpq cache time</parameter> = 10
3560 <para>Example: <emphasis><parameter>lpq cache time</parameter> = 30
3563 </listitem></varlistentry>
3565 <indexterm significance="preferred"><primary>lpq command</primary></indexterm><term><anchor id="LPQCOMMAND"/>lpq command (S)</term><listitem>
3566 <para>This parameter specifies the command to be
3567 executed on the server host in order to obtain <command moreinfo="none">lpq
3568 </command>-style printer status information.</para>
3570 <para>This command should be a program or script which
3571 takes a printer name as its only parameter and outputs printer
3572 status information.</para>
3574 <para>Currently nine styles of printer status information
3575 are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ.
3576 This covers most UNIX systems. You control which type is expected
3577 using the <parameter moreinfo="none">printing =</parameter> option.</para>
3579 <para>Some clients (notably Windows for Workgroups) may not
3580 correctly send the connection number for the printer they are
3581 requesting status information about. To get around this, the
3582 server reports on the first printer service connected to by the
3583 client. This only happens if the connection number sent is invalid.</para>
3585 <para>If a <parameter moreinfo="none">%p</parameter> is given then the printer name
3586 is put in its place. Otherwise it is placed at the end of the
3589 <para>Note that it is good practice to include the absolute path
3590 in the <parameter moreinfo="none">lpq command</parameter> as the <envar>$PATH
3591 </envar> may not be available to the server. When compiled with
3592 the CUPS libraries, no <parameter moreinfo="none">lpq command</parameter> is
3593 needed because smbd will make a library call to obtain the
3594 print queue listing.</para>
3596 <para>Default: <emphasis><parameter>lpq command</parameter> =
3599 <para>Example: <emphasis><parameter>lpq command</parameter> = /usr/bin/lpq -P%p
3602 </listitem></varlistentry>
3604 <indexterm significance="preferred"><primary>lpresume command</primary></indexterm><term><anchor id="LPRESUMECOMMAND"/>lpresume command (S)</term><listitem>
3605 <para>This parameter specifies the command to be
3606 executed on the server host in order to restart or continue
3607 printing or spooling a specific print job.</para>
3609 <para>This command should be a program or script which takes
3610 a printer name and job number to resume the print job. See
3611 also the <link linkend="LPPAUSECOMMAND"><parameter moreinfo="none">lppause command
3612 </parameter></link> parameter.</para>
3614 <para>If a <parameter moreinfo="none">%p</parameter> is given then the printer name
3615 is put in its place. A <parameter moreinfo="none">%j</parameter> is replaced with
3616 the job number (an integer).</para>
3618 <para>Note that it is good practice to include the absolute path
3619 in the <parameter moreinfo="none">lpresume command</parameter> as the PATH may not
3620 be available to the server.</para>
3622 <para>See also the <link linkend="PRINTING"><parameter moreinfo="none">printing
3623 </parameter></link> parameter.</para>
3625 <para>Default: Currently no default value is given
3626 to this string, unless the value of the <parameter moreinfo="none">printing</parameter>
3627 parameter is <constant>SYSV</constant>, in which case the default is :</para>
3629 <para><command moreinfo="none">lp -i %p-%j -H resume</command></para>
3631 <para>or if the value of the <parameter moreinfo="none">printing</parameter> parameter
3632 is <constant>SOFTQ</constant>, then the default is:</para>
3634 <para><command moreinfo="none">qstat -s -j%j -r</command></para>
3636 <para>Default: <emphasis><parameter>lpresume command</parameter> = lpresume command = /usr/bin/lpalt %p-%j -p2
3640 </listitem></varlistentry>
3642 <indexterm significance="preferred"><primary>lprm command</primary></indexterm><term><anchor id="LPRMCOMMAND"/>lprm command (S)</term><listitem>
3643 <para>This parameter specifies the command to be
3644 executed on the server host in order to delete a print job.</para>
3646 <para>This command should be a program or script which takes
3647 a printer name and job number, and deletes the print job.</para>
3649 <para>If a <parameter moreinfo="none">%p</parameter> is given then the printer name
3650 is put in its place. A <parameter moreinfo="none">%j</parameter> is replaced with
3651 the job number (an integer).</para>
3653 <para>Note that it is good practice to include the absolute
3654 path in the <parameter moreinfo="none">lprm command</parameter> as the PATH may not be
3655 available to the server.</para>
3658 <para>Default: <emphasis><parameter>lprm command</parameter> =
3659 # depends on the setting of <parameter moreinfo="none">printing</parameter>
3662 <para>Example: <emphasis><parameter>lprm command</parameter> = /usr/bin/lprm -P%p %j
3664 </para><para>Example: <emphasis><parameter>lprm command</parameter> = /usr/bin/cancel %p-%j
3667 </listitem></varlistentry>
3669 <indexterm significance="preferred"><primary>machine password timeout</primary></indexterm><term><anchor id="MACHINEPASSWORDTIMEOUT"/>machine password timeout (G)</term><listitem>
3670 <para>If a Samba server is a member of a Windows
3671 NT Domain (see the <link linkend="SECURITYEQUALSDOMAIN">security = domain</link>
3672 parameter) then periodically a running smbd
3673 process will try and change the MACHINE ACCOUNT
3674 PASSWORD stored in the TDB called <filename moreinfo="none">private/secrets.tdb
3675 </filename>. This parameter specifies how often this password
3676 will be changed, in seconds. The default is one week (expressed in
3677 seconds), the same as a Windows NT Domain member server.</para>
3679 <para>See also <citerefentry><refentrytitle>smbpasswd</refentrytitle>
3680 <manvolnum>8</manvolnum></citerefentry>, and the <link linkend="SECURITYEQUALSDOMAIN">
3681 security = domain</link> parameter.</para>
3684 <para>Default: <emphasis><parameter>machine password timeout</parameter> = 604800
3688 </listitem></varlistentry>
3690 <indexterm significance="preferred"><primary>magic output</primary></indexterm><term><anchor id="MAGICOUTPUT"/>magic output (S)</term><listitem>
3691 <para>This parameter specifies the name of a file
3692 which will contain output created by a magic script (see the
3693 <link linkend="MAGICSCRIPT"><parameter moreinfo="none">magic script</parameter></link>
3694 parameter below).</para>
3696 <warning><para>If two clients use the same <parameter moreinfo="none">magic script
3697 </parameter> in the same directory the output file content
3698 is undefined.</para></warning>
3700 <para>Default: <emphasis><parameter>magic output</parameter> = <magic script name>.out
3703 <para>Example: <emphasis><parameter>magic output</parameter> = myfile.txt
3706 </listitem></varlistentry>
3708 <indexterm significance="preferred"><primary>magic script</primary></indexterm><term><anchor id="MAGICSCRIPT"/>magic script (S)</term><listitem>
3709 <para>This parameter specifies the name of a file which,
3710 if opened, will be executed by the server when the file is closed.
3711 This allows a UNIX script to be sent to the Samba host and
3712 executed on behalf of the connected user.</para>
3714 <para>Scripts executed in this way will be deleted upon
3715 completion assuming that the user has the appropriate level
3716 of privilege and the file permissions allow the deletion.</para>
3718 <para>If the script generates output, output will be sent to
3719 the file specified by the <link linkend="MAGICOUTPUT"><parameter moreinfo="none">
3720 magic output</parameter></link> parameter (see above).</para>
3722 <para>Note that some shells are unable to interpret scripts
3723 containing CR/LF instead of CR as
3724 the end-of-line marker. Magic scripts must be executable
3725 <emphasis>as is</emphasis> on the host, which for some hosts and
3726 some shells will require filtering at the DOS end.</para>
3728 <para>Magic scripts are <emphasis>EXPERIMENTAL</emphasis> and
3729 should <emphasis>NOT</emphasis> be relied upon.</para>
3731 <para>Default: <emphasis><parameter>magic script</parameter> =
3734 <para>Example: <emphasis><parameter>magic script</parameter> = user.csh
3737 </listitem></varlistentry>
3739 <indexterm significance="preferred"><primary>mangled map</primary></indexterm><term><anchor id="MANGLEDMAP"/>mangled map (S)</term><listitem>
3740 <para>This is for those who want to directly map UNIX
3741 file names which cannot be represented on Windows/DOS. The mangling
3742 of names is not always what is needed. In particular you may have
3743 documents with file extensions that differ between DOS and UNIX.
3744 For example, under UNIX it is common to use <filename moreinfo="none">.html</filename>
3745 for HTML files, whereas under Windows/DOS <filename moreinfo="none">.htm</filename>
3746 is more commonly used.</para>
3748 <para>So to map <filename moreinfo="none">html</filename> to <filename moreinfo="none">htm</filename>
3749 you would use:</para>
3751 <para><command moreinfo="none">mangled map = (*.html *.htm)</command></para>
3753 <para>One very useful case is to remove the annoying <filename moreinfo="none">;1
3754 </filename> off the ends of filenames on some CDROMs (only visible
3755 under some UNIXes). To do this use a map of (*;1 *;).</para>
3757 <para>Default: <emphasis><parameter>mangled map</parameter> =
3761 <para>Example: <emphasis><parameter>mangled map</parameter> = (*;1 *;)
3764 </listitem></varlistentry>
3766 <indexterm significance="preferred"><primary>mangled names</primary></indexterm><term><anchor id="MANGLEDNAMES"/>mangled names (S)</term><listitem>
3767 <para>This controls whether non-DOS names under UNIX
3768 should be mapped to DOS-compatible names ("mangled") and made visible,
3769 or whether non-DOS names should simply be ignored.</para>
3771 <para>See the section on <link linkend="NAMEMANGLINGSECT">NAME MANGLING</link> for
3772 details on how to control the mangling process.</para>
3774 <para>If mangling is used then the mangling algorithm is as follows:</para>
3778 <para>The first (up to) five alphanumeric characters
3779 before the rightmost dot of the filename are preserved, forced
3780 to upper case, and appear as the first (up to) five characters
3781 of the mangled name.</para>
3785 <para>A tilde "~" is appended to the first part of the mangled
3786 name, followed by a two-character unique sequence, based on the
3787 original root name (i.e., the original filename minus its final
3788 extension). The final extension is included in the hash calculation
3789 only if it contains any upper case characters or is longer than three
3792 <para>Note that the character to use may be specified using
3793 the <link linkend="MANGLINGCHAR"><parameter moreinfo="none">mangling char</parameter>
3794 </link> option, if you don't like '~'.</para>
3798 <para>Files whose UNIX name begins with a dot will be
3799 presented as DOS hidden files. The mangled name will be created as
3800 for other filenames, but with the leading dot removed and "___" as
3801 its extension regardless of actual original extension (that's three
3802 underscores).</para>
3806 <para>The two-digit hash value consists of upper case alphanumeric characters.</para>
3808 <para>This algorithm can cause name collisions only if files
3809 in a directory share the same first five alphanumeric characters.
3810 The probability of such a clash is 1/1300.</para>
3812 <para>The name mangling (if enabled) allows a file to be
3813 copied between UNIX directories from Windows/DOS while retaining
3814 the long UNIX filename. UNIX files can be renamed to a new extension
3815 from Windows/DOS and will retain the same basename. Mangled names
3816 do not change between sessions.</para>
3818 <para>Default: <emphasis><parameter>mangled names</parameter> = yes
3822 </listitem></varlistentry>
3824 <indexterm significance="preferred"><primary>mangle prefix</primary></indexterm><term><anchor id="MANGLEPREFIX"/>mangle prefix (G)</term><listitem>
3825 <para> controls the number of prefix
3826 characters from the original name used when generating
3827 the mangled names. A larger value will give a weaker
3828 hash and therefore more name collisions. The minimum
3829 value is 1 and the maximum value is 6.</para>
3832 mangle prefix is effective only when mangling method is hash2.
3835 <para>Default: <emphasis><parameter>mangle prefix</parameter> = 1
3838 <para>Example: <emphasis><parameter>mangle prefix</parameter> = 4
3841 </listitem></varlistentry>
3843 <indexterm significance="preferred"><primary>mangling char</primary></indexterm><term><anchor id="MANGLINGCHAR"/>mangling char (S)</term><listitem>
3844 <para>This controls what character is used as
3845 the <emphasis>magic</emphasis> character in <link linkend="NAMEMANGLINGSECT">name mangling</link>. The
3846 default is a '~' but this may interfere with some software. Use this option to set
3847 it to whatever you prefer. This is effective only when mangling method is hash.</para>
3849 <para>Default: <emphasis><parameter>mangling char</parameter> = ~
3852 <para>Example: <emphasis><parameter>mangling char</parameter> = ^
3855 </listitem></varlistentry>
3857 <indexterm significance="preferred"><primary>mangling method</primary></indexterm><term><anchor id="MANGLINGMETHOD"/>mangling method (G)</term><listitem>
3858 <para> controls the algorithm used for the generating
3859 the mangled names. Can take two different values, "hash" and
3860 "hash2". "hash" is the algorithm that was used
3861 used in Samba for many years and was the default in Samba 2.2.x "hash2" is
3862 now the default and is newer and considered a better algorithm (generates less collisions) in
3863 the names. Many Win32 applications store the mangled names and so
3864 changing to algorithms must not be done lightly as these applications
3865 may break unless reinstalled.</para>
3867 <para>Default: <emphasis><parameter>mangling method</parameter> = hash2
3870 <para>Example: <emphasis><parameter>mangling method</parameter> = hash
3873 </listitem></varlistentry>
3875 <indexterm significance="preferred"><primary>map acl inherit</primary></indexterm><term><anchor id="MAPACLINHERIT"/>map acl inherit (S)</term><listitem>
3876 <para>This boolean parameter controls whether <citerefentry><refentrytitle>smbd</refentrytitle>
3877 <manvolnum>8</manvolnum></citerefentry> will attempt to map the 'inherit' and 'protected'
3878 access control entry flags stored in Windows ACLs into an extended attribute
3879 called user.SAMBA_PAI. This parameter only takes effect if Samba is being run
3880 on a platform that supports extended attributes (Linux and IRIX so far) and
3881 allows the Windows 2000 ACL editor to correctly use inheritance with the Samba
3882 POSIX ACL mapping code.
3885 <para>Default: <emphasis><parameter>map acl inherit</parameter> = no
3889 </listitem></varlistentry>
3891 <indexterm significance="preferred"><primary>map archive</primary></indexterm><term><anchor id="MAPARCHIVE"/>map archive (S)</term><listitem>
3892 <para>This controls whether the DOS archive attribute
3893 should be mapped to the UNIX owner execute bit. The DOS archive bit
3894 is set when a file has been modified since its last backup. One
3895 motivation for this option it to keep Samba/your PC from making
3896 any file it touches from becoming executable under UNIX. This can
3897 be quite annoying for shared source code, documents, etc...</para>
3899 <para>Note that this requires the <parameter moreinfo="none">create mask</parameter>
3900 parameter to be set such that owner execute bit is not masked out
3901 (i.e. it must include 100). See the parameter <link linkend="CREATEMASK">
3902 <parameter moreinfo="none">create mask</parameter></link> for details.</para>
3904 <para>Default: <emphasis><parameter>map archive</parameter> = yes
3908 </listitem></varlistentry>
3910 <indexterm significance="preferred"><primary>map hidden</primary></indexterm><term><anchor id="MAPHIDDEN"/>map hidden (S)</term><listitem>
3911 <para>This controls whether DOS style hidden files
3912 should be mapped to the UNIX world execute bit.</para>
3914 <para>Note that this requires the <parameter moreinfo="none">create mask</parameter>
3915 to be set such that the world execute bit is not masked out (i.e.
3916 it must include 001). See the parameter <link linkend="CREATEMASK">
3917 <parameter moreinfo="none">create mask</parameter></link> for details.</para>
3920 <para><emphasis>No default</emphasis></para>
3922 </listitem></varlistentry>
3924 <indexterm significance="preferred"><primary>map system</primary></indexterm><term><anchor id="MAPSYSTEM"/>map system (S)</term><listitem>
3925 <para>This controls whether DOS style system files
3926 should be mapped to the UNIX group execute bit.</para>
3928 <para>Note that this requires the <parameter moreinfo="none">create mask</parameter>
3929 to be set such that the group execute bit is not masked out (i.e.
3930 it must include 010). See the parameter <link linkend="CREATEMASK">
3931 <parameter moreinfo="none">create mask</parameter></link> for details.</para>
3933 <para>Default: <emphasis><parameter>map system</parameter> = no
3937 </listitem></varlistentry>
3939 <indexterm significance="preferred"><primary>map to guest</primary></indexterm><term><anchor id="MAPTOGUEST"/>map to guest (G)</term><listitem>
3940 <para>This parameter is only useful in <link linkend="SECURITY">
3941 security</link> modes other than <parameter moreinfo="none">security = share</parameter>
3942 - i.e. <constant>user</constant>, <constant>server</constant>,
3943 and <constant>domain</constant>.</para>
3945 <para>This parameter can take three different values, which tell
3946 <citerefentry><refentrytitle>smbd</refentrytitle>
3947 <manvolnum>8</manvolnum></citerefentry> what to do with user
3948 login requests that don't match a valid UNIX user in some way.</para>
3950 <para>The three settings are :</para>
3954 <para><constant>Never</constant> - Means user login
3955 requests with an invalid password are rejected. This is the
3960 <para><constant>Bad User</constant> - Means user
3961 logins with an invalid password are rejected, unless the username
3962 does not exist, in which case it is treated as a guest login and
3963 mapped into the <link linkend="GUESTACCOUNT"><parameter moreinfo="none">
3964 guest account</parameter></link>.</para>
3968 <para><constant>Bad Password</constant> - Means user logins
3969 with an invalid password are treated as a guest login and mapped
3970 into the <link linkend="GUESTACCOUNT">guest account</link>. Note that
3971 this can cause problems as it means that any user incorrectly typing
3972 their password will be silently logged on as "guest" - and
3973 will not know the reason they cannot access files they think
3974 they should - there will have been no message given to them
3975 that they got their password wrong. Helpdesk services will
3976 <emphasis>hate</emphasis> you if you set the <parameter moreinfo="none">map to
3977 guest</parameter> parameter this way :-).</para>
3981 <para>Note that this parameter is needed to set up "Guest"
3982 share services when using <parameter moreinfo="none">security</parameter> modes other than
3983 share. This is because in these modes the name of the resource being
3984 requested is <emphasis>not</emphasis> sent to the server until after
3985 the server has successfully authenticated the client so the server
3986 cannot make authentication decisions at the correct time (connection
3987 to the share) for "Guest" shares.</para>
3989 <para>For people familiar with the older Samba releases, this
3990 parameter maps to the old compile-time setting of the <constant>
3991 GUEST_SESSSETUP</constant> value in local.h.</para>
3993 <para>Default: <emphasis><parameter>map to guest</parameter> = Never
3996 <para>Example: <emphasis><parameter>map to guest</parameter> = Bad User
3999 </listitem></varlistentry>
4001 <indexterm significance="preferred"><primary>max connections</primary></indexterm><term><anchor id="MAXCONNECTIONS"/>max connections (S)</term><listitem>
4002 <para>This option allows the number of simultaneous connections to a service to be limited.
4003 If <parameter moreinfo="none">max connections</parameter> is greater than 0 then connections
4004 will be refused if this number of connections to the service are already open. A value
4005 of zero mean an unlimited number of connections may be made.</para>
4007 <para>Record lock files are used to implement this feature. The lock files will be stored in
4008 the directory specified by the <link linkend="LOCKDIRECTORY">
4009 <parameter moreinfo="none">lock directory</parameter></link> option.</para>
4011 <para>Default: <emphasis><parameter>max connections</parameter> = 0
4014 <para>Example: <emphasis><parameter>max connections</parameter> = 10
4017 </listitem></varlistentry>
4019 <indexterm significance="preferred"><primary>max disk size</primary></indexterm><term><anchor id="MAXDISKSIZE"/>max disk size (G)</term><listitem>
4020 <para>This option allows you to put an upper limit
4021 on the apparent size of disks. If you set this option to 100
4022 then all shares will appear to be not larger than 100 MB in
4025 <para>Note that this option does not limit the amount of
4026 data you can put on the disk. In the above case you could still
4027 store much more than 100 MB on the disk, but if a client ever asks
4028 for the amount of free disk space or the total disk size then the
4029 result will be bounded by the amount specified in <parameter moreinfo="none">max
4030 disk size</parameter>.</para>
4032 <para>This option is primarily useful to work around bugs
4033 in some pieces of software that can't handle very large disks,
4034 particularly disks over 1GB in size.</para>
4036 <para>A <parameter moreinfo="none">max disk size</parameter> of 0 means no limit.</para>
4038 <para>Default: <emphasis><parameter>max disk size</parameter> = 0
4041 <para>Example: <emphasis><parameter>max disk size</parameter> = 1000
4044 </listitem></varlistentry>
4046 <indexterm significance="preferred"><primary>max log size</primary></indexterm><term><anchor id="MAXLOGSIZE"/>max log size (G)</term><listitem>
4047 <para>This option (an integer in kilobytes) specifies
4048 the max size the log file should grow to. Samba periodically checks
4049 the size and if it is exceeded it will rename the file, adding
4050 a <filename moreinfo="none">.old</filename> extension.</para>
4052 <para>A size of 0 means no limit.</para>
4054 <para>Default: <emphasis><parameter>max log size</parameter> = 5000
4056 </para><para>Default: <emphasis><parameter>max log size</parameter> = 1000
4060 </listitem></varlistentry>
4062 <indexterm significance="preferred"><primary>max mux</primary></indexterm><term><anchor id="MAXMUX"/>max mux (G)</term><listitem>
4063 <para>This option controls the maximum number of
4064 outstanding simultaneous SMB operations that Samba tells the client
4065 it will allow. You should never need to set this parameter.</para>
4067 <para>Default: <emphasis><parameter>max mux</parameter> = 50
4071 </listitem></varlistentry>
4073 <indexterm significance="preferred"><primary>max open files</primary></indexterm><term><anchor id="MAXOPENFILES"/>max open files (G)</term><listitem>
4074 <para>This parameter limits the maximum number of
4075 open files that one <citerefentry><refentrytitle>smbd</refentrytitle>
4076 <manvolnum>8</manvolnum></citerefentry> file
4077 serving process may have open for a client at any one time. The
4078 default for this parameter is set very high (10,000) as Samba uses
4079 only one bit per unopened file.</para>
4081 <para>The limit of the number of open files is usually set
4082 by the UNIX per-process file descriptor limit rather than
4083 this parameter so you should never need to touch this parameter.</para>
4085 <para>Default: <emphasis><parameter>max open files</parameter> = 10000
4089 </listitem></varlistentry>
4091 <indexterm significance="preferred"><primary>max print jobs</primary></indexterm><term><anchor id="MAXPRINTJOBS"/>max print jobs (S)</term><listitem>
4092 <para>This parameter limits the maximum number of
4093 jobs allowable in a Samba printer queue at any given moment.
4094 If this number is exceeded, <citerefentry><refentrytitle>smbd</refentrytitle>
4095 <manvolnum>8</manvolnum></citerefentry> will remote "Out of Space" to the client.
4098 <para>Default: <emphasis><parameter>max print jobs</parameter> = 1000
4101 <para>Example: <emphasis><parameter>max print jobs</parameter> = 5000
4104 </listitem></varlistentry>
4106 <indexterm significance="preferred"><primary>protocol</primary><see>max protocol</see></indexterm><term><anchor id="PROTOCOL"/>protocol</term><listitem><para>This parameter is a synonym for max protocol.</para></listitem></varlistentry><varlistentry>
4107 <indexterm significance="preferred"><primary>max protocol</primary></indexterm><term><anchor id="MAXPROTOCOL"/>max protocol (G)</term><listitem>
4108 <para>The value of the parameter (a string) is the highest
4109 protocol level that will be supported by the server.</para>
4111 <para>Possible values are :</para>
4114 <para><constant>CORE</constant>: Earliest version. No
4115 concept of user names.</para>
4119 <para><constant>COREPLUS</constant>: Slight improvements on
4120 CORE for efficiency.</para>
4124 <para><constant>LANMAN1</constant>: First <emphasis>
4125 modern</emphasis> version of the protocol. Long filename
4130 <para><constant>LANMAN2</constant>: Updates to Lanman1 protocol.</para>
4134 <para><constant>NT1</constant>: Current up to date version of the protocol.
4135 Used by Windows NT. Known as CIFS.</para>
4139 <para>Normally this option should not be set as the automatic
4140 negotiation phase in the SMB protocol takes care of choosing
4141 the appropriate protocol.</para>
4143 <para>Default: <emphasis><parameter>max protocol</parameter> = NT1
4146 <para>Example: <emphasis><parameter>max protocol</parameter> = LANMAN1
4149 </listitem></varlistentry>
4151 <indexterm significance="preferred"><primary>max reported print jobs</primary></indexterm><term><anchor id="MAXREPORTEDPRINTJOBS"/>max reported print jobs (S)</term><listitem>
4152 <para>This parameter limits the maximum number of
4153 jobs displayed in a port monitor for Samba printer queue at any given
4154 moment. If this number is exceeded, the excess jobs will not be shown.
4155 A value of zero means there is no limit on the number of print
4156 jobs reported.</para>
4158 <para>Default: <emphasis><parameter>max reported print jobs</parameter> = 0
4161 <para>Example: <emphasis><parameter>max reported print jobs</parameter> = 1000
4164 </listitem></varlistentry>
4166 <indexterm significance="preferred"><primary>max smbd processes</primary></indexterm><term><anchor id="MAXSMBDPROCESSES"/>max smbd processes (G)</term><listitem>
4167 <para>This parameter limits the maximum number of <citerefentry><refentrytitle>smbd</refentrytitle>
4168 <manvolnum>8</manvolnum></citerefentry> processes concurrently running on a system and is intended
4169 as a stopgap to prevent degrading service to clients in the event that the server has insufficient
4170 resources to handle more than this number of connections. Remember that under normal operating
4171 conditions, each user will have an <citerefentry><refentrytitle>smbd</refentrytitle>
4172 <manvolnum>8</manvolnum></citerefentry> associated with him or her to handle connections to all
4173 shares from a given host.</para>
4175 <para>Default: <emphasis><parameter>max smbd processes</parameter> = 0
4178 <para>Example: <emphasis><parameter>max smbd processes</parameter> = 1000
4181 </listitem></varlistentry>
4183 <indexterm significance="preferred"><primary>max stat cache size</primary></indexterm><term><anchor id="MAXSTATCACHESIZE"/>max stat cache size (G)</term><listitem>
4184 <para>This parameter specifies the maximum amount of memory (in kilobytes)
4185 smbd will use for the stat cache that speeds up case insensitive name mappings.
4186 If set to zero (the default) there is no limit. Change this if your smbd processes
4187 grow too large when servicing something like a back-up application.</para>
4189 <para>Default: <emphasis><parameter>max stat cache size</parameter> = 0
4193 </listitem></varlistentry>
4195 <indexterm significance="preferred"><primary>max ttl</primary></indexterm><term><anchor id="MAXTTL"/>max ttl (G)</term><listitem>
4196 <para>This option tells <citerefentry><refentrytitle>nmbd</refentrytitle>
4197 <manvolnum>8</manvolnum></citerefentry> what the default 'time to live'
4198 of NetBIOS names should be (in seconds) when <command moreinfo="none">nmbd</command> is
4199 requesting a name using either a broadcast packet or from a WINS server. You should
4200 never need to change this parameter. The default is 3 days.</para>
4202 <para>Default: <emphasis><parameter>max ttl</parameter> = 259200
4206 </listitem></varlistentry>
4208 <indexterm significance="preferred"><primary>max wins ttl</primary></indexterm><term><anchor id="MAXWINSTTL"/>max wins ttl (G)</term><listitem>
4209 <para>This option tells <citerefentry><refentrytitle>smbd</refentrytitle>
4210 <manvolnum>8</manvolnum></citerefentry> when acting as a WINS server (<link linkend="WINSSUPPORT">
4211 <parameter moreinfo="none">wins support = yes</parameter></link>) what the maximum
4212 'time to live' of NetBIOS names that <command moreinfo="none">nmbd</command>
4213 will grant will be (in seconds). You should never need to change this
4214 parameter. The default is 6 days (518400 seconds).</para>
4216 <para>Default: <emphasis><parameter>max wins ttl</parameter> = 518400
4220 </listitem></varlistentry>
4222 <indexterm significance="preferred"><primary>max xmit</primary></indexterm><term><anchor id="MAXXMIT"/>max xmit (G)</term><listitem>
4223 <para>This option controls the maximum packet size
4224 that will be negotiated by Samba. The default is 65535, which
4225 is the maximum. In some cases you may find you get better performance
4226 with a smaller value. A value below 2048 is likely to cause problems.
4229 <para>Default: <emphasis><parameter>max xmit</parameter> = 65535
4232 <para>Example: <emphasis><parameter>max xmit</parameter> = 8192
4235 </listitem></varlistentry>
4237 <indexterm significance="preferred"><primary>message command</primary></indexterm><term><anchor id="MESSAGECOMMAND"/>message command (G)</term><listitem>
4238 <para>This specifies what command to run when the
4239 server receives a WinPopup style message.</para>
4241 <para>This would normally be a command that would
4242 deliver the message somehow. How this is to be done is
4243 up to your imagination.</para>
4245 <para>An example is:</para>
4247 <para><command moreinfo="none">message command = csh -c 'xedit %s;rm %s' &</command>
4250 <para>This delivers the message using <command moreinfo="none">xedit</command>, then
4251 removes it afterwards. <emphasis>NOTE THAT IT IS VERY IMPORTANT
4252 THAT THIS COMMAND RETURN IMMEDIATELY</emphasis>. That's why I
4253 have the '&' on the end. If it doesn't return immediately then
4254 your PCs may freeze when sending messages (they should recover
4255 after 30 seconds, hopefully).</para>
4257 <para>All messages are delivered as the global guest user.
4258 The command takes the standard substitutions, although <parameter moreinfo="none">
4259 %u</parameter> won't work (<parameter moreinfo="none">%U</parameter> may be better
4260 in this case).</para>
4262 <para>Apart from the standard substitutions, some additional
4263 ones apply. In particular:</para>
4267 <para><parameter moreinfo="none">%s</parameter> = the filename containing
4272 <para><parameter moreinfo="none">%t</parameter> = the destination that
4273 the message was sent to (probably the server name).</para>
4277 <para><parameter moreinfo="none">%f</parameter> = who the message
4282 <para>You could make this command send mail, or whatever else
4283 takes your fancy. Please let us know of any really interesting
4284 ideas you have.</para>
4286 <para>Here's a way of sending the messages as mail to root:</para>
4288 <para><command moreinfo="none">message command = /bin/mail -s 'message from %f on
4289 %m' root < %s; rm %s</command></para>
4291 <para>If you don't have a message command then the message
4292 won't be delivered and Samba will tell the sender there was
4293 an error. Unfortunately WfWg totally ignores the error code
4294 and carries on regardless, saying that the message was delivered.
4297 <para>If you want to silently delete it then try:</para>
4299 <para><command moreinfo="none">message command = rm %s</command></para>
4301 <para>Default: <emphasis><parameter>message command</parameter> =
4304 <para>Example: <emphasis><parameter>message command</parameter> = csh -c 'xedit %s; rm %s' &
4307 </listitem></varlistentry>
4309 <indexterm significance="preferred"><primary>min passwd length</primary><see>min password length</see></indexterm><term><anchor id="MINPASSWDLENGTH"/>min passwd length</term><listitem><para>This parameter is a synonym for min password length.</para></listitem></varlistentry><varlistentry>
4310 <indexterm significance="preferred"><primary>min password length</primary></indexterm><term><anchor id="MINPASSWORDLENGTH"/>min password length (G)</term><listitem>
4311 <para>This option sets the minimum length in characters of a
4312 plaintext password that <command moreinfo="none">smbd</command> will
4313 accept when performing UNIX password changing.</para>
4315 <para>Default: <emphasis><parameter>min password length</parameter> = 5
4319 </listitem></varlistentry>
4321 <indexterm significance="preferred"><primary>min print space</primary></indexterm><term><anchor id="MINPRINTSPACE"/>min print space (S)</term><listitem>
4322 <para>This sets the minimum amount of free disk
4323 space that must be available before a user will be able to spool
4324 a print job. It is specified in kilobytes. The default is 0, which
4325 means a user can always spool a print job.</para>
4327 <para>Default: <emphasis><parameter>min print space</parameter> = 0
4330 <para>Example: <emphasis><parameter>min print space</parameter> = 2000
4333 </listitem></varlistentry>
4335 <indexterm significance="preferred"><primary>min protocol</primary></indexterm><term><anchor id="MINPROTOCOL"/>min protocol (G)</term><listitem>
4336 <para>The value of the parameter (a string) is the
4337 lowest SMB protocol dialect than Samba will support. Please refer
4338 to the <link linkend="MAXPROTOCOL"><parameter moreinfo="none">max protocol</parameter></link>
4339 parameter for a list of valid protocol names and a brief description
4340 of each. You may also wish to refer to the C source code in
4341 <filename moreinfo="none">source/smbd/negprot.c</filename> for a listing of known protocol
4342 dialects supported by clients.</para>
4344 <para>If you are viewing this parameter as a security measure, you should
4345 also refer to the <link linkend="LANMANAUTH"><parameter moreinfo="none">lanman
4346 auth</parameter></link> parameter. Otherwise, you should never need
4347 to change this parameter.</para>
4349 <para>Default: <emphasis><parameter>min protocol</parameter> = CORE
4352 <para>Example: <emphasis><parameter>min protocol</parameter> = NT1
4355 </listitem></varlistentry>
4357 <indexterm significance="preferred"><primary>min wins ttl</primary></indexterm><term><anchor id="MINWINSTTL"/>min wins ttl (G)</term><listitem>
4358 <para>This option tells <citerefentry><refentrytitle>nmbd</refentrytitle>
4359 <manvolnum>8</manvolnum></citerefentry>
4360 when acting as a WINS server (<link linkend="WINSSUPPORT"><parameter moreinfo="none">
4361 wins support = yes</parameter></link>) what the minimum 'time to live'
4362 of NetBIOS names that <command moreinfo="none">nmbd</command> will grant will be (in
4363 seconds). You should never need to change this parameter. The default
4364 is 6 hours (21600 seconds).</para>
4366 <para>Default: <emphasis><parameter>min wins ttl</parameter> = 21600
4370 </listitem></varlistentry>
4372 <indexterm significance="preferred"><primary>msdfs proxy</primary></indexterm><term><anchor id="MSDFSPROXY"/>msdfs proxy (S)</term><listitem>
4373 <para>This parameter indicates that the share is a
4374 stand-in for another CIFS share whose location is specified by
4375 the value of the parameter. When clients attempt to connect to
4376 this share, they are redirected to the proxied share using
4377 the SMB-Dfs protocol.</para>
4379 <para>Only Dfs roots can act as proxy shares. Take a look at the
4380 <link linkend="MSDFSROOT"><parameter moreinfo="none">msdfs root</parameter></link>
4381 and <link linkend="HOSTMSDFS"><parameter moreinfo="none">host msdfs</parameter></link>
4382 options to find out how to set up a Dfs root share.</para>
4384 <para><emphasis>No default</emphasis></para>
4385 <para>Example: <emphasis><parameter>msdfs proxy</parameter> = \otherserver\someshare
4388 </listitem></varlistentry>
4390 <indexterm significance="preferred"><primary>msdfs root</primary></indexterm><term><anchor id="MSDFSROOT"/>msdfs root (S)</term><listitem>
4391 <para>If set to <constant>yes</constant>, Samba treats the
4392 share as a Dfs root and allows clients to browse the
4393 distributed file system tree rooted at the share directory.
4394 Dfs links are specified in the share directory by symbolic
4395 links of the form <filename moreinfo="none">msdfs:serverA\\shareA,serverB\\shareB</filename>
4396 and so on. For more information on setting up a Dfs tree on
4397 Samba, refer to <link linkend="msdfs"/>.</para>
4399 <para>Default: <emphasis><parameter>msdfs root</parameter> = no
4403 </listitem></varlistentry>
4405 <indexterm significance="preferred"><primary>name cache timeout</primary></indexterm><term><anchor id="NAMECACHETIMEOUT"/>name cache timeout (G)</term><listitem>
4406 <para>Specifies the number of seconds it takes before
4407 entries in samba's hostname resolve cache time out. If
4408 the timeout is set to 0. the caching is disabled.
4411 <para>Default: <emphasis><parameter>name cache timeout</parameter> = 660
4414 <para>Example: <emphasis><parameter>name cache timeout</parameter> = 0
4417 </listitem></varlistentry>
4419 <indexterm significance="preferred"><primary>name resolve order</primary></indexterm><term><anchor id="NAMERESOLVEORDER"/>name resolve order (G)</term><listitem>
4420 <para>This option is used by the programs in the Samba
4421 suite to determine what naming services to use and in what order
4422 to resolve host names to IP addresses. Its main purpose to is to
4423 control how netbios name resolution is performed. The option takes a space
4424 separated string of name resolution options.</para>
4426 <para>The options are: "lmhosts", "host",
4427 "wins" and "bcast". They cause names to be
4428 resolved as follows:</para>
4432 <para><constant>lmhosts</constant> : Lookup an IP
4433 address in the Samba lmhosts file. If the line in lmhosts has
4434 no name type attached to the NetBIOS name (see the <ulink url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
4435 any name type matches for lookup.</para>
4439 <para><constant>host</constant> : Do a standard host
4440 name to IP address resolution, using the system <filename moreinfo="none">/etc/hosts
4441 </filename>, NIS, or DNS lookups. This method of name resolution
4442 is operating system depended for instance on IRIX or Solaris this
4443 may be controlled by the <filename moreinfo="none">/etc/nsswitch.conf</filename>
4444 file. Note that this method is used only if the NetBIOS name
4445 type being queried is the 0x20 (server) name type or 0x1c (domain controllers).
4446 The latter case is only useful for active directory domains and results in a DNS
4447 query for the SRV RR entry matching _ldap._tcp.domain.</para>
4451 <para><constant>wins</constant> : Query a name with
4452 the IP address listed in the <link linkend="WINSSERVER"><parameter moreinfo="none">
4453 wins server</parameter></link> parameter. If no WINS server has
4454 been specified this method will be ignored.</para>
4458 <para><constant>bcast</constant> : Do a broadcast on
4459 each of the known local interfaces listed in the <link linkend="INTERFACES"><parameter moreinfo="none">interfaces</parameter></link>
4460 parameter. This is the least reliable of the name resolution
4461 methods as it depends on the target host being on a locally
4462 connected subnet.</para>
4466 <para>The example below will cause the local lmhosts file to be examined
4467 first, followed by a broadcast attempt, followed by a normal
4468 system hostname lookup.</para>
4470 <para>When Samba is functioning in ADS security mode (<command moreinfo="none">security = ads</command>)
4471 it is advised to use following settings for <parameter moreinfo="none">name resolve order</parameter>:</para>
4473 <para><command moreinfo="none">name resolve order = wins bcast</command></para>
4475 <para>DC lookups will still be done via DNS, but fallbacks to netbios names will
4476 not inundate your DNS servers with needless querys for DOMAIN<0x1c> lookups.</para>
4479 <para>Default: <emphasis><parameter>name resolve order</parameter> = lmhosts host wins bcast
4482 <para>Example: <emphasis><parameter>name resolve order</parameter> = lmhosts bcast host
4485 </listitem></varlistentry>
4487 <indexterm significance="preferred"><primary>netbios aliases</primary></indexterm><term><anchor id="NETBIOSALIASES"/>netbios aliases (G)</term><listitem>
4488 <para>This is a list of NetBIOS names that nmbd will
4489 advertise as additional names by which the Samba server is known. This allows one machine
4490 to appear in browse lists under multiple names. If a machine is acting as a browse server
4491 or logon server none of these names will be advertised as either browse server or logon
4492 servers, only the primary name of the machine will be advertised with these capabilities.
4495 <para>Default: <emphasis><parameter>netbios aliases</parameter> =
4496 # empty string (no additional names)
4499 <para>Example: <emphasis><parameter>netbios aliases</parameter> = TEST TEST1 TEST2
4502 </listitem></varlistentry>
4504 <indexterm significance="preferred"><primary>netbios name</primary></indexterm><term><anchor id="NETBIOSNAME"/>netbios name (G)</term><listitem>
4505 <para>This sets the NetBIOS name by which a Samba
4506 server is known. By default it is the same as the first component
4507 of the host's DNS name. If a machine is a browse server or
4508 logon server this name (or the first component
4509 of the hosts DNS name) will be the name that these services are
4510 advertised under.</para>
4512 <para>Default: <emphasis><parameter>netbios name</parameter> =
4516 <para>Example: <emphasis><parameter>netbios name</parameter> = MYNAME
4519 </listitem></varlistentry>
4521 <indexterm significance="preferred"><primary>netbios scope</primary></indexterm><term><anchor id="NETBIOSSCOPE"/>netbios scope (G)</term><listitem>
4522 <para>This sets the NetBIOS scope that Samba will
4523 operate under. This should not be set unless every machine
4524 on your LAN also sets this value.</para>
4526 <para>Default: <emphasis><parameter>netbios scope</parameter> =
4530 </listitem></varlistentry>
4532 <indexterm significance="preferred"><primary>nis homedir</primary></indexterm><term><anchor id="NISHOMEDIR"/>nis homedir (G)</term><listitem>
4533 <para>Get the home share server from a NIS map. For
4534 UNIX systems that use an automounter, the user's home directory
4535 will often be mounted on a workstation on demand from a remote
4538 <para>When the Samba logon server is not the actual home directory
4539 server, but is mounting the home directories via NFS then two
4540 network hops would be required to access the users home directory
4541 if the logon server told the client to use itself as the SMB server
4542 for home directories (one over SMB and one over NFS). This can
4543 be very slow.</para>
4545 <para>This option allows Samba to return the home share as
4546 being on a different server to the logon server and as
4547 long as a Samba daemon is running on the home directory server,
4548 it will be mounted on the Samba client directly from the directory
4549 server. When Samba is returning the home share to the client, it
4550 will consult the NIS map specified in <link linkend="HOMEDIRMAP">
4551 <parameter moreinfo="none">homedir map</parameter></link> and return the server
4552 listed there.</para>
4554 <para>Note that for this option to work there must be a working
4555 NIS system and the Samba server with this option must also
4556 be a logon server.</para>
4558 <para>Default: <emphasis><parameter>nis homedir</parameter> = no
4562 </listitem></varlistentry>
4564 <indexterm significance="preferred"><primary>nt acl support</primary></indexterm><term><anchor id="NTACLSUPPORT"/>nt acl support (S)</term><listitem>
4565 <para>This boolean parameter controls whether <citerefentry><refentrytitle>smbd</refentrytitle>
4566 <manvolnum>8</manvolnum></citerefentry> will attempt to map
4567 UNIX permissions into Windows NT access control lists.
4568 This parameter was formally a global parameter in releases
4569 prior to 2.2.2.</para>
4571 <para>Default: <emphasis><parameter>nt acl support</parameter> = yes
4575 </listitem></varlistentry>
4577 <indexterm significance="preferred"><primary>ntlm auth</primary></indexterm><term><anchor id="NTLMAUTH"/>ntlm auth (G)</term><listitem>
4578 <para>This parameter determines whether or not <citerefentry><refentrytitle>smbd</refentrytitle>
4579 <manvolnum>8</manvolnum></citerefentry> will attempt to
4580 authenticate users using the NTLM encrypted password response.
4581 If disabled, either the lanman password hash or an NTLMv2 response
4582 will need to be sent by the client.</para>
4584 <para>If this option, and <command moreinfo="none">lanman
4585 auth</command> are both disabled, then only NTLMv2 logins will be
4586 permited. Not all clients support NTLMv2, and most will require
4587 special configuration to us it.</para>
4589 <para>Default: <emphasis><parameter>ntlm auth</parameter> = yes
4593 </listitem></varlistentry>
4595 <indexterm significance="preferred"><primary>nt pipe support</primary></indexterm><term><anchor id="NTPIPESUPPORT"/>nt pipe support (G)</term><listitem>
4596 <para>This boolean parameter controls whether
4597 <citerefentry><refentrytitle>smbd</refentrytitle>
4598 <manvolnum>8</manvolnum></citerefentry> will allow Windows NT
4599 clients to connect to the NT SMB specific <constant>IPC$</constant>
4600 pipes. This is a developer debugging option and can be left
4603 <para>Default: <emphasis><parameter>nt pipe support</parameter> = yes
4607 </listitem></varlistentry>
4609 <indexterm significance="preferred"><primary>nt status support</primary></indexterm><term><anchor id="NTSTATUSSUPPORT"/>nt status support (G)</term><listitem>
4610 <para>This boolean parameter controls whether <citerefentry><refentrytitle>smbd</refentrytitle>
4611 <manvolnum>8</manvolnum></citerefentry> will negotiate NT specific status
4612 support with Windows NT/2k/XP clients. This is a developer debugging option and should be left alone.
4613 If this option is set to <constant>no</constant> then Samba offers
4614 exactly the same DOS error codes that versions prior to Samba 2.2.3
4617 <para>You should not need to ever disable this parameter.</para>
4619 <para>Default: <emphasis><parameter>nt status support</parameter> = yes
4623 </listitem></varlistentry>
4625 <indexterm significance="preferred"><primary>null passwords</primary></indexterm><term><anchor id="NULLPASSWORDS"/>null passwords (G)</term><listitem>
4626 <para>Allow or disallow client access to accounts that have null passwords. </para>
4628 <para>See also <citerefentry><refentrytitle>smbpasswd</refentrytitle>
4629 <manvolnum>5</manvolnum></citerefentry>.</para>
4631 <para>Default: <emphasis><parameter>null passwords</parameter> = no
4635 </listitem></varlistentry>
4637 <indexterm significance="preferred"><primary>obey pam restrictions</primary></indexterm><term><anchor id="OBEYPAMRESTRICTIONS"/>obey pam restrictions (G)</term><listitem>
4638 <para>When Samba 3.0 is configured to enable PAM support
4639 (i.e. --with-pam), this parameter will control whether or not Samba
4640 should obey PAM's account and session management directives. The
4641 default behavior is to use PAM for clear text authentication only
4642 and to ignore any account or session management. Note that Samba
4643 always ignores PAM for authentication in the case of <link linkend="ENCRYPTPASSWORDS">
4644 <parameter moreinfo="none">encrypt passwords = yes</parameter></link>. The reason
4645 is that PAM modules cannot support the challenge/response
4646 authentication mechanism needed in the presence of SMB password encryption.
4649 <para>Default: <emphasis><parameter>obey pam restrictions</parameter> = no
4653 </listitem></varlistentry>
4655 <indexterm significance="preferred"><primary>only user</primary></indexterm><term><anchor id="ONLYUSER"/>only user (S)</term><listitem>
4656 <para>This is a boolean option that controls whether
4657 connections with usernames not in the <parameter moreinfo="none">user</parameter>
4658 list will be allowed. By default this option is disabled so that a
4659 client can supply a username to be used by the server. Enabling
4660 this parameter will force the server to only use the login
4661 names from the <parameter moreinfo="none">user</parameter> list and is only really
4662 useful in <link linkend="SECURITYEQUALSSHARE">share level</link>
4665 <para>Note that this also means Samba won't try to deduce
4666 usernames from the service name. This can be annoying for
4667 the [homes] section. To get around this you could use <command moreinfo="none">user =
4668 %S</command> which means your <parameter moreinfo="none">user</parameter> list
4669 will be just the service name, which for home directories is the
4670 name of the user.</para>
4672 <para>Default: <emphasis><parameter>only user</parameter> = no
4676 </listitem></varlistentry>
4678 <indexterm significance="preferred"><primary>oplock break wait time</primary></indexterm><term><anchor id="OPLOCKBREAKWAITTIME"/>oplock break wait time (G)</term><listitem>
4679 <para>This is a tuning parameter added due to bugs in
4680 both Windows 9x and WinNT. If Samba responds to a client too
4681 quickly when that client issues an SMB that can cause an oplock
4682 break request, then the network client can fail and not respond
4683 to the break request. This tuning parameter (which is set in milliseconds)
4684 is the amount of time Samba will wait before sending an oplock break
4685 request to such (broken) clients.</para>
4687 <warning><para>DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND
4688 UNDERSTOOD THE SAMBA OPLOCK CODE.</para></warning>
4690 <para>Default: <emphasis><parameter>oplock break wait time</parameter> = 0
4694 </listitem></varlistentry>
4696 <indexterm significance="preferred"><primary>oplock contention limit</primary></indexterm><term><anchor id="OPLOCKCONTENTIONLIMIT"/>oplock contention limit (S)</term><listitem>
4697 <para>This is a <emphasis>very</emphasis> advanced
4698 <citerefentry><refentrytitle>smbd</refentrytitle>
4699 <manvolnum>8</manvolnum></citerefentry> tuning option to
4700 improve the efficiency of the granting of oplocks under multiple
4701 client contention for the same file.</para>
4703 <para>In brief it specifies a number, which causes <citerefentry><refentrytitle>smbd</refentrytitle>
4704 <manvolnum>8</manvolnum></citerefentry>not to grant an oplock even when requested
4705 if the approximate number of clients contending for an oplock on the same file goes over this
4706 limit. This causes <command moreinfo="none">smbd</command> to behave in a similar
4707 way to Windows NT.</para>
4709 <warning><para>DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ
4710 AND UNDERSTOOD THE SAMBA OPLOCK CODE.</para></warning>
4713 <para>Default: <emphasis><parameter>oplock contention limit</parameter> = 2
4717 </listitem></varlistentry>
4719 <indexterm significance="preferred"><primary>oplocks</primary></indexterm><term><anchor id="OPLOCKS"/>oplocks (S)</term><listitem>
4720 <para>This boolean option tells <command moreinfo="none">smbd</command> whether to
4721 issue oplocks (opportunistic locks) to file open requests on this
4722 share. The oplock code can dramatically (approx. 30% or more) improve
4723 the speed of access to files on Samba servers. It allows the clients
4724 to aggressively cache files locally and you may want to disable this
4725 option for unreliable network environments (it is turned on by
4726 default in Windows NT Servers). For more information see the file
4727 <filename moreinfo="none">Speed.txt</filename> in the Samba <filename moreinfo="none">docs/</filename>
4730 <para>Oplocks may be selectively turned off on certain files with a
4731 share. See the <link linkend="VETOOPLOCKFILES"><parameter moreinfo="none">
4732 veto oplock files</parameter></link> parameter. On some systems
4733 oplocks are recognized by the underlying operating system. This
4734 allows data synchronization between all access to oplocked files,
4735 whether it be via Samba or NFS or a local UNIX process. See the
4736 <parameter moreinfo="none">kernel oplocks</parameter> parameter for details.</para>
4738 <para>Default: <emphasis><parameter>oplocks</parameter> = yes
4742 </listitem></varlistentry>
4744 <indexterm significance="preferred"><primary>os2 driver map</primary></indexterm><term><anchor id="OS2DRIVERMAP"/>os2 driver map (G)</term><listitem>
4745 <para>The parameter is used to define the absolute
4746 path to a file containing a mapping of Windows NT printer driver
4747 names to OS/2 printer driver names. The format is:</para>
4749 <para><nt driver name> = <os2 driver name>.<device name></para>
4751 <para>For example, a valid entry using the HP LaserJet 5
4752 printer driver would appear as <command moreinfo="none">HP LaserJet 5L = LASERJET.HP
4753 LaserJet 5L</command>.</para>
4755 <para>The need for the file is due to the printer driver namespace
4756 problem described in <link linkend="printing"/>. For more details on OS/2 clients, please
4757 refer to <link linkend="Other-Clients"/>.</para>
4759 <para>Default: <emphasis><parameter>os2 driver map</parameter> =
4763 </listitem></varlistentry>
4765 <indexterm significance="preferred"><primary>os level</primary></indexterm><term><anchor id="OSLEVEL"/>os level (G)</term><listitem>
4766 <para>This integer value controls what level Samba
4767 advertises itself as for browse elections. The value of this
4768 parameter determines whether <citerefentry><refentrytitle>nmbd</refentrytitle>
4769 <manvolnum>8</manvolnum></citerefentry>
4770 has a chance of becoming a local master browser for the <parameter moreinfo="none">
4771 WORKGROUP</parameter> in the local broadcast area.</para>
4773 <para><emphasis>Note :</emphasis>By default, Samba will win
4774 a local master browsing election over all Microsoft operating
4775 systems except a Windows NT 4.0/2000 Domain Controller. This
4776 means that a misconfigured Samba host can effectively isolate
4777 a subnet for browsing purposes. See <filename moreinfo="none">BROWSING.txt
4778 </filename> in the Samba <filename moreinfo="none">docs/</filename> directory
4781 <para>Default: <emphasis><parameter>os level</parameter> = 20
4784 <para>Example: <emphasis><parameter>os level</parameter> = 65
4787 </listitem></varlistentry>
4789 <indexterm significance="preferred"><primary>pam password change</primary></indexterm><term><anchor id="PAMPASSWORDCHANGE"/>pam password change (G)</term><listitem>
4790 <para>With the addition of better PAM support in Samba 2.2,
4791 this parameter, it is possible to use PAM's password change control
4792 flag for Samba. If enabled, then PAM will be used for password
4793 changes when requested by an SMB client instead of the program listed in
4794 <link linkend="PASSWDPROGRAM"><parameter moreinfo="none">passwd program</parameter></link>.
4795 It should be possible to enable this without changing your
4796 <link linkend="PASSWDCHAT"><parameter moreinfo="none">passwd chat</parameter></link>
4797 parameter for most setups.</para>
4799 <para>Default: <emphasis><parameter>pam password change</parameter> = no
4803 </listitem></varlistentry>
4805 <indexterm significance="preferred"><primary>panic action</primary></indexterm><term><anchor id="PANICACTION"/>panic action (G)</term><listitem>
4806 <para>This is a Samba developer option that allows a
4807 system command to be called when either <citerefentry><refentrytitle>smbd</refentrytitle>
4808 <manvolnum>8</manvolnum></citerefentry> or <citerefentry><refentrytitle>smbd</refentrytitle>
4809 <manvolnum>8</manvolnum></citerefentry> crashes. This is usually used to
4810 draw attention to the fact that a problem occurred.</para>
4812 <para>Default: <emphasis><parameter>panic action</parameter> =
4815 <para>Example: <emphasis><parameter>panic action</parameter> = "/bin/sleep 90000"
4818 </listitem></varlistentry>
4820 <indexterm significance="preferred"><primary>paranoid server security</primary></indexterm><term><anchor id="PARANOIDSERVERSECURITY"/>paranoid server security (G)</term><listitem>
4821 <para>Some version of NT 4.x allow non-guest
4822 users with a bad passowrd. When this option is enabled, samba will not
4823 use a broken NT 4.x server as password server, but instead complain
4824 to the logs and exit.
4827 <para>Disabling this option prevents Samba from making
4828 this check, which involves deliberatly attempting a
4829 bad logon to the remote server.</para>
4831 <para>Default: <emphasis><parameter>paranoid server security</parameter> = yes
4835 </listitem></varlistentry>
4837 <indexterm significance="preferred"><primary>passdb backend</primary></indexterm><term><anchor id="PASSDBBACKEND"/>passdb backend (G)</term><listitem>
4839 <para>This option allows the administrator to chose which backends
4840 to retrieve and store passwords with. This allows (for example) both
4841 smbpasswd and tdbsam to be used without a recompile. Multiple
4842 backends can be specified, separated by spaces. The backends will be
4843 searched in the order they are specified. New users are always added
4844 to the first backend specified. </para>
4846 <para>This parameter is in two parts, the backend's name, and a 'location'
4847 string that has meaning only to that particular backed. These are separated
4848 by a : character.</para>
4850 <para>Available backends can include:
4853 <para><command moreinfo="none">smbpasswd</command> - The default smbpasswd
4854 backend. Takes a path to the smbpasswd file as an optional argument.
4859 <para><command moreinfo="none">tdbsam</command> - The TDB based password storage
4860 backend. Takes a path to the TDB as an optional argument (defaults to passdb.tdb
4861 in the <link linkend="PRIVATEDIR">
4862 <parameter moreinfo="none">private dir</parameter></link> directory.</para>
4866 <para><command moreinfo="none">ldapsam</command> - The LDAP based passdb
4867 backend. Takes an LDAP URL as an optional argument (defaults to
4868 <command moreinfo="none">ldap://localhost</command>)</para>
4870 <para>LDAP connections should be secured where possible. This may be done using either
4871 Start-TLS (see <link linkend="LDAPSSL"><parameter moreinfo="none">ldap ssl</parameter></link>) or by
4872 specifying <parameter moreinfo="none">ldaps://</parameter> in
4873 the URL argument. </para>
4875 <para>Multiple servers may also be specified in double-quotes, if your
4876 LDAP libraries supports the LDAP URL notation.
4883 <para><command moreinfo="none">nisplussam</command> -
4884 The NIS+ based passdb backend. Takes name NIS domain as
4885 an optional argument. Only works with sun NIS+ servers.
4890 <para><command moreinfo="none">mysql</command> -
4891 The MySQL based passdb backend. Takes an identifier as
4892 argument. Read the Samba HOWTO Collection for configuration
4899 <para>Default: <emphasis><parameter>passdb backend</parameter> = smbpasswd
4902 <para>Example: <emphasis><parameter>passdb backend</parameter> = tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd
4904 </para><para>Example: <emphasis><parameter>passdb backend</parameter> = ldapsam:ldaps://ldap.example.com
4906 </para><para>Example: <emphasis><parameter>passdb backend</parameter> = ldapsam:"ldap://ldap-1.example.com ldap://ldap-2.example.com"
4908 </para><para>Example: <emphasis><parameter>passdb backend</parameter> = mysql:my_plugin_args tdbsam
4911 </listitem></varlistentry>
4913 <indexterm significance="preferred"><primary>passwd chat</primary></indexterm><term><anchor id="PASSWDCHAT"/>passwd chat (G)</term><listitem>
4914 <para>This string controls the <emphasis>"chat"</emphasis>
4915 conversation that takes places between <citerefentry><refentrytitle>smbd</refentrytitle>
4916 <manvolnum>8</manvolnum></citerefentry> and the local password changing
4917 program to change the user's password. The string describes a
4918 sequence of response-receive pairs that <citerefentry><refentrytitle>smbd</refentrytitle>
4919 <manvolnum>8</manvolnum></citerefentry> uses to determine what to send to the
4920 <link linkend="PASSWDPROGRAM"><parameter moreinfo="none">passwd program</parameter>
4921 </link> and what to expect back. If the expected output is not
4922 received then the password is not changed.</para>
4924 <para>This chat sequence is often quite site specific, depending
4925 on what local methods are used for password control (such as NIS
4928 <para>Note that this parameter only is only used if the <link linkend="UNIXPASSWORDSYNC"> <parameter moreinfo="none">unix password sync</parameter>
4929 </link> parameter is set to <constant>yes</constant>. This sequence is
4930 then called <emphasis>AS ROOT</emphasis> when the SMB password in the
4931 smbpasswd file is being changed, without access to the old password
4932 cleartext. This means that root must be able to reset the user's password without
4933 knowing the text of the previous password. In the presence of
4934 NIS/YP, this means that the <link linkend="PASSWDPROGRAM">passwd program</link> must
4935 be executed on the NIS master.
4939 <para>The string can contain the macro <parameter moreinfo="none">%n</parameter> which is substituted
4940 for the new password. The chat sequence can also contain the standard
4941 macros \n, \r, \t and \s to
4942 give line-feed, carriage-return, tab and space. The chat sequence string can also contain
4943 a '*' which matches any sequence of characters. Double quotes can be used to collect strings with spaces
4944 in them into a single string.</para>
4946 <para>If the send string in any part of the chat sequence is a full
4947 stop ".", then no string is sent. Similarly, if the
4948 expect string is a full stop then no string is expected.</para>
4950 <para>If the <link linkend="PAMPASSWORDCHANGE"><parameter moreinfo="none">pam
4951 password change</parameter></link> parameter is set to <constant>yes</constant>, the chat pairs
4952 may be matched in any order, and success is determined by the PAM result,
4953 not any particular output. The \n macro is ignored for PAM conversions.
4957 <para>Default: <emphasis><parameter>passwd chat</parameter> = *new*password* %n\n*new*password* %n\n *changed*
4960 <para>Example: <emphasis><parameter>passwd chat</parameter> = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n "*Reenter NEW password*" %n\n "*Password changed*"
4963 </listitem></varlistentry>
4965 <indexterm significance="preferred"><primary>passwd chat debug</primary></indexterm><term><anchor id="PASSWDCHATDEBUG"/>passwd chat debug (G)</term><listitem>
4966 <para>This boolean specifies if the passwd chat script
4967 parameter is run in <emphasis>debug</emphasis> mode. In this mode the
4968 strings passed to and received from the passwd chat are printed
4969 in the <citerefentry><refentrytitle>smbd</refentrytitle>
4970 <manvolnum>8</manvolnum></citerefentry> log with a
4971 <link linkend="DEBUGLEVEL"><parameter moreinfo="none">debug level</parameter></link>
4972 of 100. This is a dangerous option as it will allow plaintext passwords
4973 to be seen in the <command moreinfo="none">smbd</command> log. It is available to help
4974 Samba admins debug their <parameter moreinfo="none">passwd chat</parameter> scripts
4975 when calling the <parameter moreinfo="none">passwd program</parameter> and should
4976 be turned off after this has been done. This option has no effect if the
4977 <link linkend="PAMPASSWORDCHANGE"><parameter moreinfo="none">pam password change</parameter></link>
4978 paramter is set. This parameter is off by default.</para>
4980 <para>Default: <emphasis><parameter>passwd chat debug</parameter> = no
4984 </listitem></varlistentry>
4986 <indexterm significance="preferred"><primary>passwd chat timeout</primary></indexterm><term><anchor id="PASSWDCHATTIMEOUT"/>passwd chat timeout (G)</term><listitem>
4987 <para>This integer specifies the number of seconds smbd will wait for an initial
4988 answer from a passwd chat script being run. Once the initial answer is received
4989 the subsequent answers must be received in one tenth of this time. The default it
4992 <para>Default: <emphasis><parameter>passwd chat timeout</parameter> = 2
4996 </listitem></varlistentry>
4998 <indexterm significance="preferred"><primary>passwd program</primary></indexterm><term><anchor id="PASSWDPROGRAM"/>passwd program (G)</term><listitem>
4999 <para>The name of a program that can be used to set
5000 UNIX user passwords. Any occurrences of <parameter moreinfo="none">%u</parameter>
5001 will be replaced with the user name. The user name is checked for
5002 existence before calling the password changing program.</para>
5004 <para>Also note that many passwd programs insist in <emphasis>reasonable
5005 </emphasis> passwords, such as a minimum length, or the inclusion
5006 of mixed case chars and digits. This can pose a problem as some clients
5007 (such as Windows for Workgroups) uppercase the password before sending
5010 <para><emphasis>Note</emphasis> that if the <parameter moreinfo="none">unix
5011 password sync</parameter> parameter is set to <constant>yes
5012 </constant> then this program is called <emphasis>AS ROOT</emphasis>
5013 before the SMB password in the smbpasswd
5014 file is changed. If this UNIX password change fails, then
5015 <command moreinfo="none">smbd</command> will fail to change the SMB password also
5016 (this is by design).</para>
5018 <para>If the <parameter moreinfo="none">unix password sync</parameter> parameter
5019 is set this parameter <emphasis>MUST USE ABSOLUTE PATHS</emphasis>
5020 for <emphasis>ALL</emphasis> programs called, and must be examined
5021 for security implications. Note that by default <parameter moreinfo="none">unix
5022 password sync</parameter> is set to <constant>no</constant>.</para>
5024 <para>Default: <emphasis><parameter>passwd program</parameter> =
5027 <para>Example: <emphasis><parameter>passwd program</parameter> = /bin/passwd %u
5030 </listitem></varlistentry>
5032 <indexterm significance="preferred"><primary>password level</primary></indexterm><term><anchor id="PASSWORDLEVEL"/>password level (G)</term><listitem>
5033 <para>Some client/server combinations have difficulty
5034 with mixed-case passwords. One offending client is Windows for
5035 Workgroups, which for some reason forces passwords to upper
5036 case when using the LANMAN1 protocol, but leaves them alone when
5037 using COREPLUS! Another problem child is the Windows 95/98
5038 family of operating systems. These clients upper case clear
5039 text passwords even when NT LM 0.12 selected by the protocol
5040 negotiation request/response.</para>
5042 <para>This parameter defines the maximum number of characters
5043 that may be upper case in passwords.</para>
5045 <para>For example, say the password given was "FRED". If <parameter moreinfo="none">
5046 password level</parameter> is set to 1, the following combinations
5047 would be tried if "FRED" failed:</para>
5049 <para>"Fred", "fred", "fRed", "frEd","freD"</para>
5051 <para>If <parameter moreinfo="none">password level</parameter> was set to 2,
5052 the following combinations would also be tried: </para>
5054 <para>"FRed", "FrEd", "FreD", "fREd", "fReD", "frED", ..</para>
5056 <para>And so on.</para>
5058 <para>The higher value this parameter is set to the more likely
5059 it is that a mixed case password will be matched against a single
5060 case password. However, you should be aware that use of this
5061 parameter reduces security and increases the time taken to
5062 process a new connection.</para>
5064 <para>A value of zero will cause only two attempts to be
5065 made - the password as is and the password in all-lower case.</para>
5067 <para>This parameter is used only when using plain-text passwords. It is
5068 not at all used when encrypted passwords as in use (that is the default
5069 since samba-3.0.0). Use this only when <link linkend="ENCRYPTPASSWORDS">
5070 encrypt passwords = No</link>.</para>
5072 <para>Default: <emphasis><parameter>password level</parameter> = 0
5075 <para>Example: <emphasis><parameter>password level</parameter> = 4
5078 </listitem></varlistentry>
5080 <indexterm significance="preferred"><primary>password server</primary></indexterm><term><anchor id="PASSWORDSERVER"/>password server (G)</term><listitem>
5081 <para>By specifying the name of another SMB server
5082 or Active Directory domain controller with this option,
5083 and using <command moreinfo="none">security = [ads|domain|server]</command>
5084 it is possible to get Samba to
5085 to do all its username/password validation using a specific remote server.</para>
5087 <para>This option sets the name or IP address of the password server to use.
5088 New syntax has been added to support defining the port to use when connecting
5089 to the server the case of an ADS realm. To define a port other than the
5090 default LDAP port of 389, add the port number using a colon after the
5091 name or IP address (e.g. 192.168.1.100:389). If you do not specify a port,
5092 Samba will use the standard LDAP port of tcp/389. Note that port numbers
5093 have no effect on password servers for Windows NT 4.0 domains or netbios
5096 <para>If parameter is a name, it is looked up using the
5097 parameter <link linkend="NAMERESOLVEORDER"><parameter moreinfo="none">name
5098 resolve order</parameter></link> and so may resolved
5099 by any method and order described in that parameter.</para>
5101 <para>The password server must be a machine capable of using
5102 the "LM1.2X002" or the "NT LM 0.12" protocol, and it must be in
5103 user level security mode.</para>
5105 <note><para>Using a password server means your UNIX box (running
5106 Samba) is only as secure as your password server. <emphasis>DO NOT
5107 CHOOSE A PASSWORD SERVER THAT YOU DON'T COMPLETELY TRUST</emphasis>.
5110 <para>Never point a Samba server at itself for password serving.
5111 This will cause a loop and could lock up your Samba server!</para>
5113 <para>The name of the password server takes the standard
5114 substitutions, but probably the only useful one is <parameter moreinfo="none">%m
5115 </parameter>, which means the Samba server will use the incoming
5116 client as the password server. If you use this then you better
5117 trust your clients, and you had better restrict them with hosts allow!</para>
5119 <para>If the <parameter moreinfo="none">security</parameter> parameter is set to
5120 <constant>domain</constant> or <constant>ads</constant>, then the list of machines in this
5121 option must be a list of Primary or Backup Domain controllers for the
5122 Domain or the character '*', as the Samba server is effectively
5123 in that domain, and will use cryptographically authenticated RPC calls
5124 to authenticate the user logging on. The advantage of using <command moreinfo="none">
5125 security = domain</command> is that if you list several hosts in the
5126 <parameter moreinfo="none">password server</parameter> option then <command moreinfo="none">smbd
5127 </command> will try each in turn till it finds one that responds. This
5128 is useful in case your primary server goes down.</para>
5130 <para>If the <parameter moreinfo="none">password server</parameter> option is set
5131 to the character '*', then Samba will attempt to auto-locate the
5132 Primary or Backup Domain controllers to authenticate against by
5133 doing a query for the name <constant>WORKGROUP<1C></constant>
5134 and then contacting each server returned in the list of IP
5135 addresses from the name resolution source. </para>
5137 <para>If the list of servers contains both names/IP's and the '*'
5138 character, the list is treated as a list of preferred
5139 domain controllers, but an auto lookup of all remaining DC's
5140 will be added to the list as well. Samba will not attempt to optimize
5141 this list by locating the closest DC.</para>
5143 <para>If the <parameter moreinfo="none">security</parameter> parameter is
5144 set to <constant>server</constant>, then there are different
5145 restrictions that <command moreinfo="none">security = domain</command> doesn't
5150 <para>You may list several password servers in
5151 the <parameter moreinfo="none">password server</parameter> parameter, however if an
5152 <command moreinfo="none">smbd</command> makes a connection to a password server,
5153 and then the password server fails, no more users will be able
5154 to be authenticated from this <command moreinfo="none">smbd</command>. This is a
5155 restriction of the SMB/CIFS protocol when in <command moreinfo="none">security = server
5156 </command> mode and cannot be fixed in Samba.</para>
5160 <para>If you are using a Windows NT server as your
5161 password server then you will have to ensure that your users
5162 are able to login from the Samba server, as when in <command moreinfo="none">
5163 security = server</command> mode the network logon will appear to
5164 come from there rather than from the users workstation.</para>
5168 <para>Default: <emphasis><parameter>password server</parameter> =
5171 <para>Example: <emphasis><parameter>password server</parameter> = NT-PDC, NT-BDC1, NT-BDC2, *
5173 </para><para>Example: <emphasis><parameter>password server</parameter> = windc.mydomain.com:389 192.168.1.101 *
5175 </para><para>Example: <emphasis><parameter>password server</parameter> = *
5178 </listitem></varlistentry>
5180 <indexterm significance="preferred"><primary>directory</primary><see>path</see></indexterm><term><anchor id="DIRECTORY"/>directory</term><listitem><para>This parameter is a synonym for path.</para></listitem></varlistentry><varlistentry>
5181 <indexterm significance="preferred"><primary>path</primary></indexterm><term><anchor id="PATH"/>path (S)</term><listitem>
5182 <para>This parameter specifies a directory to which
5183 the user of the service is to be given access. In the case of
5184 printable services, this is where print data will spool prior to
5185 being submitted to the host for printing.</para>
5187 <para>For a printable service offering guest access, the service
5188 should be readonly and the path should be world-writeable and
5189 have the sticky bit set. This is not mandatory of course, but
5190 you probably won't get the results you expect if you do
5193 <para>Any occurrences of <parameter moreinfo="none">%u</parameter> in the path
5194 will be replaced with the UNIX username that the client is using
5195 on this connection. Any occurrences of <parameter moreinfo="none">%m</parameter>
5196 will be replaced by the NetBIOS name of the machine they are
5197 connecting from. These replacements are very useful for setting
5198 up pseudo home directories for users.</para>
5200 <para>Note that this path will be based on <link linkend="ROOTDIR">
5201 <parameter moreinfo="none">root dir</parameter></link> if one was specified.</para>
5203 <para>Default: <emphasis><parameter>path</parameter> =
5206 <para>Example: <emphasis><parameter>path</parameter> = /home/fred
5209 </listitem></varlistentry>
5211 <indexterm significance="preferred"><primary>pid directory</primary></indexterm><term><anchor id="PIDDIRECTORY"/>pid directory (G)</term><listitem>
5212 <para>This option specifies the directory where pid
5213 files will be placed. </para>
5215 <para>Default: <emphasis><parameter>pid directory</parameter> = ${prefix}/var/locks
5218 <para>Example: <emphasis><parameter>pid directory</parameter> = pid directory = /var/run/
5221 </listitem></varlistentry>
5223 <indexterm significance="preferred"><primary>posix locking</primary></indexterm><term><anchor id="POSIXLOCKING"/>posix locking (S)</term><listitem>
5224 <para>The <citerefentry><refentrytitle>smbd</refentrytitle>
5225 <manvolnum>8</manvolnum></citerefentry>
5226 daemon maintains an database of file locks obtained by SMB clients.
5227 The default behavior is to map this internal database to POSIX
5228 locks. This means that file locks obtained by SMB clients are
5229 consistent with those seen by POSIX compliant applications accessing
5230 the files via a non-SMB method (e.g. NFS or local file access).
5231 You should never need to disable this parameter.</para>
5233 <para>Default: <emphasis><parameter>posix locking</parameter> = yes
5237 </listitem></varlistentry>
5239 <indexterm significance="preferred"><primary>postexec</primary></indexterm><term><anchor id="POSTEXEC"/>postexec (S)</term><listitem>
5240 <para>This option specifies a command to be run
5241 whenever the service is disconnected. It takes the usual
5242 substitutions. The command may be run as the root on some
5245 <para>An interesting example may be to unmount server
5248 <para><command moreinfo="none">postexec = /etc/umount /cdrom</command></para>
5250 <para>Default: <emphasis><parameter>postexec</parameter> =
5253 <para>Example: <emphasis><parameter>postexec</parameter> = echo \"%u disconnected from %S from %m (%I)\" >> /tmp/log
5256 </listitem></varlistentry>
5258 <indexterm significance="preferred"><primary>exec</primary><see>preexec</see></indexterm><term><anchor id="EXEC"/>exec</term><listitem><para>This parameter is a synonym for preexec.</para></listitem></varlistentry><varlistentry>
5259 <indexterm significance="preferred"><primary>preexec</primary></indexterm><term><anchor id="PREEXEC"/>preexec (S)</term><listitem>
5260 <para>This option specifies a command to be run whenever
5261 the service is connected to. It takes the usual substitutions.</para>
5263 <para>An interesting example is to send the users a welcome
5264 message every time they log in. Maybe a message of the day? Here
5265 is an example:</para>
5267 <para><command moreinfo="none">preexec = csh -c 'echo \"Welcome to %S!\" | /usr/local/samba/bin/smbclient -M %m -I %I' & </command></para>
5269 <para>Of course, this could get annoying after a while :-)</para>
5271 <para>See also <link linkend="PREEXECCLOSE"><parameter moreinfo="none">preexec close</parameter></link> and <link linkend="POSTEXEC"><parameter moreinfo="none">postexec
5272 </parameter></link>.</para>
5274 <para>Default: <emphasis><parameter>preexec</parameter> =
5277 <para>Example: <emphasis><parameter>preexec</parameter> = echo \"%u connected to %S from %m (%I)\" >> /tmp/log
5280 </listitem></varlistentry>
5282 <indexterm significance="preferred"><primary>preexec close</primary></indexterm><term><anchor id="PREEXECCLOSE"/>preexec close (S)</term><listitem>
5283 <para>This boolean option controls whether a non-zero
5284 return code from <link linkend="PREEXEC"><parameter moreinfo="none">preexec
5285 </parameter></link> should close the service being connected to.</para>
5287 <para>Default: <emphasis><parameter>preexec close</parameter> = no
5291 </listitem></varlistentry>
5293 <indexterm significance="preferred"><primary>prefered master</primary><see>preferred master</see></indexterm><term><anchor id="PREFEREDMASTER"/>prefered master</term><listitem><para>This parameter is a synonym for preferred master.</para></listitem></varlistentry><varlistentry>
5294 <indexterm significance="preferred"><primary>preferred master</primary></indexterm><term><anchor id="PREFERREDMASTER"/>preferred master (G)</term><listitem>
5295 <para>This boolean parameter controls if
5296 <citerefentry><refentrytitle>nmbd</refentrytitle>
5297 <manvolnum>8</manvolnum></citerefentry> is a preferred master
5298 browser for its workgroup.</para>
5300 <para>If this is set to <constant>yes</constant>, on startup, <command moreinfo="none">nmbd</command>
5301 will force an election, and it will have a slight advantage in
5302 winning the election. It is recommended that this parameter is
5303 used in conjunction with <command moreinfo="none"><link linkend="DOMAINMASTER">
5304 <parameter moreinfo="none">domain master</parameter></link> = yes</command>, so
5305 that <command moreinfo="none">nmbd</command> can guarantee becoming a domain master.</para>
5307 <para>Use this option with caution, because if there are several
5308 hosts (whether Samba servers, Windows 95 or NT) that are
5309 preferred master browsers on the same subnet, they will each
5310 periodically and continuously attempt to become the local
5311 master browser. This will result in unnecessary broadcast
5312 traffic and reduced browsing capabilities.</para>
5314 <para>Default: <emphasis><parameter>preferred master</parameter> = auto
5318 </listitem></varlistentry>
5320 <indexterm significance="preferred"><primary>auto services</primary><see>preload</see></indexterm><term><anchor id="AUTOSERVICES"/>auto services</term><listitem><para>This parameter is a synonym for preload.</para></listitem></varlistentry><varlistentry>
5321 <indexterm significance="preferred"><primary>preload</primary></indexterm><term><anchor id="PRELOAD"/>preload (G)</term><listitem>
5322 <para>This is a list of services that you want to be
5323 automatically added to the browse lists. This is most useful
5324 for homes and printers services that would otherwise not be
5327 <para>Note that if you just want all printers in your
5328 printcap file loaded then the <link linkend="LOADPRINTERS">
5329 <parameter moreinfo="none">load printers</parameter></link> option is easier.</para>
5331 <para>Default: <emphasis><parameter>preload</parameter> =
5334 <para>Example: <emphasis><parameter>preload</parameter> = fred lp colorlp
5337 </listitem></varlistentry>
5339 <indexterm significance="preferred"><primary>preload modules</primary></indexterm><term><anchor id="PRELOADMODULES"/>preload modules (G)</term><listitem>
5340 <para>This is a list of paths to modules that should
5341 be loaded into smbd before a client connects. This improves
5342 the speed of smbd when reacting to new connections somewhat. </para>
5344 <para>Default: <emphasis><parameter>preload modules</parameter> =
5347 <para>Example: <emphasis><parameter>preload modules</parameter> = /usr/lib/samba/passdb/mysql.so
5350 </listitem></varlistentry>
5352 <indexterm significance="preferred"><primary>preserve case</primary></indexterm><term><anchor id="PRESERVECASE"/>preserve case (S)</term><listitem>
5353 <para> This controls if new filenames are created
5354 with the case that the client passes, or if they are forced to
5355 be the <link linkend="DEFAULTCASE"><parameter moreinfo="none">default case
5356 </parameter></link>.</para>
5357 <para>See the section on <link linkend="NAMEMANGLINGSECT">NAME MANGLING</link> for a fuller discussion.</para>
5359 <para>Default: <emphasis><parameter>preserve case</parameter> = yes
5363 </listitem></varlistentry>
5365 <indexterm significance="preferred"><primary>print ok</primary><see>printable</see></indexterm><term><anchor id="PRINTOK"/>print ok</term><listitem><para>This parameter is a synonym for printable.</para></listitem></varlistentry><varlistentry>
5366 <indexterm significance="preferred"><primary>printable</primary></indexterm><term><anchor id="PRINTABLE"/>printable (S)</term><listitem>
5367 <para>If this parameter is <constant>yes</constant>, then
5368 clients may open, write to and submit spool files on the directory
5369 specified for the service. </para>
5371 <para>Note that a printable service will ALWAYS allow writing
5372 to the service path (user privileges permitting) via the spooling
5373 of print data. The <link linkend="READONLY"><parameter moreinfo="none">read only
5374 </parameter></link> parameter controls only non-printing access to
5375 the resource.</para>
5377 <para>Default: <emphasis><parameter>printable</parameter> = no
5381 </listitem></varlistentry>
5383 <indexterm significance="preferred"><primary>printcap cache time</primary></indexterm><term><anchor id="PRINTCAPCACHETIME"/>printcap cache time (G)</term><listitem>
5384 <para>This option specifies the number of seconds before the printing
5385 subsystem is again asked for the known printers. If the value
5386 is greater than 60 the initial waiting time is set to 60 seconds
5387 to allow an earlier first rescan of the printing subsystem.
5390 <para>Setting this parameter to 0 (the default) disables any
5391 rescanning for new or removed printers after the initial startup.
5394 <para>Default: <emphasis><parameter>printcap cache time</parameter> = 0
5397 <para>Example: <emphasis><parameter>printcap cache time</parameter> = 600
5400 </listitem></varlistentry>
5402 <indexterm significance="preferred"><primary>printcap</primary><see>printcap name</see></indexterm><term><anchor id="PRINTCAP"/>printcap</term><listitem><para>This parameter is a synonym for printcap name.</para></listitem></varlistentry><varlistentry>
5403 <indexterm significance="preferred"><primary>printcap name</primary></indexterm><term><anchor id="PRINTCAPNAME"/>printcap name (S)</term><listitem>
5404 <para>This parameter may be used to override the
5405 compiled-in default printcap name used by the server (usually <filename moreinfo="none">
5406 /etc/printcap</filename>). See the discussion of the <link linkend="PRINTERSSECT">[printers]</link> section above for reasons
5407 why you might want to do this.</para>
5409 <para>To use the CUPS printing interface set <command moreinfo="none">printcap name = cups
5410 </command>. This should be supplemented by an addtional setting
5411 <link linkend="PRINTING">printing = cups</link> in the [global]
5412 section. <command moreinfo="none">printcap name = cups</command> will use the
5413 "dummy" printcap created by CUPS, as specified in your CUPS
5417 <para>On System V systems that use <command moreinfo="none">lpstat</command> to
5418 list available printers you can use <command moreinfo="none">printcap name = lpstat
5419 </command> to automatically obtain lists of available printers. This
5420 is the default for systems that define SYSV at configure time in
5421 Samba (this includes most System V based systems). If <parameter moreinfo="none">
5422 printcap name</parameter> is set to <command moreinfo="none">lpstat</command> on
5423 these systems then Samba will launch <command moreinfo="none">lpstat -v</command> and
5424 attempt to parse the output to obtain a printer list.</para>
5426 <para>A minimal printcap file would look something like this:</para>
5428 <para><programlisting format="linespecific">
5434 </programlisting></para>
5436 <para>where the '|' separates aliases of a printer. The fact
5437 that the second alias has a space in it gives a hint to Samba
5438 that it's a comment.</para>
5440 <note><para>Under AIX the default printcap
5441 name is <filename moreinfo="none">/etc/qconfig</filename>. Samba will assume the
5442 file is in AIX <filename moreinfo="none">qconfig</filename> format if the string
5443 <filename moreinfo="none">qconfig</filename> appears in the printcap filename.</para></note>
5445 <para>Default: <emphasis><parameter>printcap name</parameter> = /etc/printcap
5448 <para>Example: <emphasis><parameter>printcap name</parameter> = /etc/myprintcap
5451 </listitem></varlistentry>
5453 <indexterm significance="preferred"><primary>print command</primary></indexterm><term><anchor id="PRINTCOMMAND"/>print command (S)</term><listitem>
5454 <para>After a print job has finished spooling to
5455 a service, this command will be used via a <command moreinfo="none">system()</command>
5456 call to process the spool file. Typically the command specified will
5457 submit the spool file to the host's printing subsystem, but there
5458 is no requirement that this be the case. The server will not remove
5459 the spool file, so whatever command you specify should remove the
5460 spool file when it has been processed, otherwise you will need to
5461 manually remove old spool files.</para>
5463 <para>The print command is simply a text string. It will be used
5464 verbatim after macro substitutions have been made:</para>
5466 <para>%s, %f - the path to the spool
5469 <para>%p - the appropriate printer
5473 name as transmitted by the client.</para>
5475 <para>%c - The number of printed pages
5476 of the spooled job (if known).</para>
5478 <para>%z - the size of the spooled
5479 print job (in bytes)</para>
5481 <para>The print command <emphasis>MUST</emphasis> contain at least
5482 one occurrence of <parameter moreinfo="none">%s</parameter> or <parameter moreinfo="none">%f
5483 </parameter> - the <parameter moreinfo="none">%p</parameter> is optional. At the time
5484 a job is submitted, if no printer name is supplied the <parameter moreinfo="none">%p
5485 </parameter> will be silently removed from the printer command.</para>
5487 <para>If specified in the [global] section, the print command given
5488 will be used for any printable service that does not have its own
5489 print command specified.</para>
5491 <para>If there is neither a specified print command for a
5492 printable service nor a global print command, spool files will
5493 be created but not processed and (most importantly) not removed.</para>
5495 <para>Note that printing may fail on some UNIXes from the
5496 <constant>nobody</constant> account. If this happens then create
5497 an alternative guest account that can print and set the <link linkend="GUESTACCOUNT">
5498 <parameter moreinfo="none">guest account</parameter></link>
5499 in the [global] section.</para>
5501 <para>You can form quite complex print commands by realizing
5502 that they are just passed to a shell. For example the following
5503 will log a print job, print the file, then remove it. Note that
5504 ';' is the usual separator for command in shell scripts.</para>
5506 <para><command moreinfo="none">print command = echo Printing %s >>
5507 /tmp/print.log; lpr -P %p %s; rm %s</command></para>
5509 <para>You may have to vary this command considerably depending
5510 on how you normally print files on your system. The default for
5511 the parameter varies depending on the setting of the <link linkend="PRINTING">
5512 <parameter moreinfo="none">printing</parameter></link> parameter.</para>
5514 <para>Default: For <command moreinfo="none">printing = BSD, AIX, QNX, LPRNG
5515 or PLP :</command></para>
5516 <para><command moreinfo="none">print command = lpr -r -P%p %s</command></para>
5518 <para>For <command moreinfo="none">printing = SYSV or HPUX :</command></para>
5519 <para><command moreinfo="none">print command = lp -c -d%p %s; rm %s</command></para>
5521 <para>For <command moreinfo="none">printing = SOFTQ :</command></para>
5522 <para><command moreinfo="none">print command = lp -d%p -s %s; rm %s</command></para>
5524 <para>For printing = CUPS : If SAMBA is compiled against
5525 libcups, then <link linkend="PRINTING">printcap = cups</link>
5526 uses the CUPS API to
5527 submit jobs, etc. Otherwise it maps to the System V
5528 commands with the -oraw option for printing, i.e. it
5529 uses <command moreinfo="none">lp -c -d%p -oraw; rm %s</command>.
5530 With <command moreinfo="none">printing = cups</command>,
5531 and if SAMBA is compiled against libcups, any manually
5532 set print command will be ignored.</para>
5534 <para><emphasis>No default</emphasis></para>
5535 <para>Example: <emphasis><parameter>print command</parameter> = /usr/local/samba/bin/myprintscript %p %s
5538 </listitem></varlistentry>
5540 <indexterm significance="preferred"><primary>printer admin</primary></indexterm><term><anchor id="PRINTERADMIN"/>printer admin (S)</term><listitem>
5542 This lists users who can do anything to printers
5543 via the remote administration interfaces offered
5544 by MS-RPC (usually using a NT workstation).
5545 This parameter can be set per-share or globally.
5546 Note: The root user always has admin rights. Use
5547 caution with use in the global stanza as this can
5551 <para>Default: <emphasis><parameter>printer admin</parameter> =
5554 <para>Example: <emphasis><parameter>printer admin</parameter> = admin, @staff
5557 </listitem></varlistentry>
5559 <indexterm significance="preferred"><primary>printer</primary><see>printer name</see></indexterm><term><anchor id="PRINTER"/>printer</term><listitem><para>This parameter is a synonym for printer name.</para></listitem></varlistentry><varlistentry>
5560 <indexterm significance="preferred"><primary>printer name</primary></indexterm><term><anchor id="PRINTERNAME"/>printer name (S)</term><listitem>
5561 <para>This parameter specifies the name of the printer
5562 to which print jobs spooled through a printable service will be sent.</para>
5564 <para>If specified in the [global] section, the printer
5565 name given will be used for any printable service that does
5566 not have its own printer name specified.</para>
5568 <para>Default: <emphasis><parameter>printer name</parameter> =
5569 # none (but may be <constant>lp</constant> on many systems)
5572 <para>Example: <emphasis><parameter>printer name</parameter> = laserwriter
5575 </listitem></varlistentry>
5577 <indexterm significance="preferred"><primary>printing</primary></indexterm><term><anchor id="PRINTING"/>printing (S)</term><listitem>
5578 <para>This parameters controls how printer status information is
5579 interpreted on your system. It also affects the default values for
5580 the <parameter moreinfo="none">print command</parameter>, <parameter moreinfo="none">lpq command</parameter>, <parameter moreinfo="none">lppause command </parameter>, <parameter moreinfo="none">lpresume command</parameter>, and <parameter moreinfo="none">lprm command</parameter> if specified in the
5581 [global] section.</para>
5583 <para>Currently nine printing styles are supported. They are
5584 <constant>BSD</constant>, <constant>AIX</constant>,
5585 <constant>LPRNG</constant>, <constant>PLP</constant>,
5586 <constant>SYSV</constant>, <constant>HPUX</constant>,
5587 <constant>QNX</constant>, <constant>SOFTQ</constant>,
5588 and <constant>CUPS</constant>.</para>
5590 <para>To see what the defaults are for the other print
5591 commands when using the various options use the <citerefentry><refentrytitle>testparm</refentrytitle>
5592 <manvolnum>1</manvolnum></citerefentry> program.</para>
5594 <para>This option can be set on a per printer basis. Please be
5595 aware however, that you must place any of the various printing
5596 commands (e.g. print command, lpq command, etc...) after defining
5597 the value for the <parameter>printing</parameter> option since it will
5598 reset the printing commands to default values.</para>
5600 <para>See also the discussion in the <link linkend="PRINTERSSECT">
5601 [printers]</link> section.</para>
5603 <para><emphasis>No default</emphasis></para>
5605 </listitem></varlistentry>
5607 <indexterm significance="preferred"><primary>private dir</primary></indexterm><term><anchor id="PRIVATEDIR"/>private dir (G)</term><listitem>
5608 <para>This parameters defines the directory
5609 smbd will use for storing such files as <filename moreinfo="none">smbpasswd</filename>
5610 and <filename moreinfo="none">secrets.tdb</filename>.
5613 <para>Default: <emphasis><parameter>private dir</parameter> = ${prefix}/private
5617 </listitem></varlistentry>
5619 <indexterm significance="preferred"><primary>profile acls</primary></indexterm><term><anchor id="PROFILEACLS"/>profile acls (S)</term><listitem>
5621 This boolean parameter was added to fix the problems that people have been
5622 having with storing user profiles on Samba shares from Windows 2000 or
5623 Windows XP clients. New versions of Windows 2000 or Windows XP service
5624 packs do security ACL checking on the owner and ability to write of the
5625 profile directory stored on a local workstation when copied from a Samba
5629 <para>When not in domain mode with winbindd then the security info copied
5630 onto the local workstation has no meaning to the logged in user (SID) on
5631 that workstation so the profile storing fails. Adding this parameter
5632 onto a share used for profile storage changes two things about the
5633 returned Windows ACL. Firstly it changes the owner and group owner
5634 of all reported files and directories to be BUILTIN\\Administrators,
5635 BUILTIN\\Users respectively (SIDs S-1-5-32-544, S-1-5-32-545). Secondly
5636 it adds an ACE entry of "Full Control" to the SID BUILTIN\\Users to
5637 every returned ACL. This will allow any Windows 2000 or XP workstation
5638 user to access the profile.</para>
5640 <para>Note that if you have multiple users logging
5641 on to a workstation then in order to prevent them from being able to access
5642 each others profiles you must remove the "Bypass traverse checking" advanced
5643 user right. This will prevent access to other users profile directories as
5644 the top level profile directory (named after the user) is created by the
5645 workstation profile code and has an ACL restricting entry to the directory
5646 tree to the owning user.
5649 <para>Default: <emphasis><parameter>profile acls</parameter> = no
5653 </listitem></varlistentry>
5655 <indexterm significance="preferred"><primary>queuepause command</primary></indexterm><term><anchor id="QUEUEPAUSECOMMAND"/>queuepause command (S)</term><listitem>
5656 <para>This parameter specifies the command to be
5657 executed on the server host in order to pause the printer queue.</para>
5659 <para>This command should be a program or script which takes
5660 a printer name as its only parameter and stops the printer queue,
5661 such that no longer jobs are submitted to the printer.</para>
5663 <para>This command is not supported by Windows for Workgroups,
5664 but can be issued from the Printers window under Windows 95
5667 <para>If a <parameter moreinfo="none">%p</parameter> is given then the printer name
5668 is put in its place. Otherwise it is placed at the end of the command.
5671 <para>Note that it is good practice to include the absolute
5672 path in the command as the PATH may not be available to the
5675 <para><emphasis>No default</emphasis></para>
5676 <para>Example: <emphasis><parameter>queuepause command</parameter> = disable %p
5679 </listitem></varlistentry>
5681 <indexterm significance="preferred"><primary>queueresume command</primary></indexterm><term><anchor id="QUEUERESUMECOMMAND"/>queueresume command (S)</term><listitem>
5682 <para>This parameter specifies the command to be
5683 executed on the server host in order to resume the printer queue. It
5684 is the command to undo the behavior that is caused by the
5685 previous parameter (<link linkend="QUEUEPAUSECOMMAND"><parameter moreinfo="none">
5686 queuepause command</parameter></link>).</para>
5688 <para>This command should be a program or script which takes
5689 a printer name as its only parameter and resumes the printer queue,
5690 such that queued jobs are resubmitted to the printer.</para>
5692 <para>This command is not supported by Windows for Workgroups,
5693 but can be issued from the Printers window under Windows 95
5696 <para>If a <parameter moreinfo="none">%p</parameter> is given then the printer name
5697 is put in its place. Otherwise it is placed at the end of the
5700 <para>Note that it is good practice to include the absolute
5701 path in the command as the PATH may not be available to the
5704 <para>Default: <emphasis><parameter>queueresume command</parameter> =
5707 <para>Example: <emphasis><parameter>queueresume command</parameter> = enable %p
5710 </listitem></varlistentry>
5712 <indexterm significance="preferred"><primary>read bmpx</primary></indexterm><term><anchor id="READBMPX"/>read bmpx (G)</term><listitem>
5713 <para>This boolean parameter controls whether
5714 <citerefentry><refentrytitle>smbd</refentrytitle>
5715 <manvolnum>8</manvolnum></citerefentry> will support the "Read
5716 Block Multiplex" SMB. This is now rarely used and defaults to
5717 <constant>no</constant>. You should never need to set this
5720 <para>Default: <emphasis><parameter>read bmpx</parameter> = no
5724 </listitem></varlistentry>
5726 <indexterm significance="preferred"><primary>read list</primary></indexterm><term><anchor id="READLIST"/>read list (S)</term><listitem>
5727 <para>This is a list of users that are given read-only
5728 access to a service. If the connecting user is in this list then
5729 they will not be given write access, no matter what the <link linkend="READONLY">
5730 <parameter moreinfo="none">read only</parameter></link>
5731 option is set to. The list can include group names using the
5732 syntax described in the <link linkend="INVALIDUSERS"><parameter moreinfo="none">
5733 invalid users</parameter></link> parameter.</para>
5735 <para>This parameter will not work with the <link linkend="SECURITY">
5736 <parameter moreinfo="none">security = share</parameter></link> in
5737 Samba 3.0. This is by design.</para>
5739 <para>Default: <emphasis><parameter>read list</parameter> =
5742 <para>Example: <emphasis><parameter>read list</parameter> = mary, @students
5745 </listitem></varlistentry>
5747 <indexterm significance="preferred"><primary>read only</primary></indexterm><term><anchor id="READONLY"/>read only (S)</term><listitem>
5748 <para>An inverted synonym is <link linkend="WRITEABLE">
5749 <parameter moreinfo="none">writeable</parameter></link>.</para>
5751 <para>If this parameter is <constant>yes</constant>, then users
5752 of a service may not create or modify files in the service's
5755 <para>Note that a printable service (<command moreinfo="none">printable = yes</command>)
5756 will <emphasis>ALWAYS</emphasis> allow writing to the directory
5757 (user privileges permitting), but only via spooling operations.</para>
5759 <para>Default: <emphasis><parameter>read only</parameter> = yes
5763 </listitem></varlistentry>
5765 <indexterm significance="preferred"><primary>read raw</primary></indexterm><term><anchor id="READRAW"/>read raw (G)</term><listitem>
5766 <para>This parameter controls whether or not the server
5767 will support the raw read SMB requests when transferring data
5770 <para>If enabled, raw reads allow reads of 65535 bytes in
5771 one packet. This typically provides a major performance benefit.
5774 <para>However, some clients either negotiate the allowable
5775 block size incorrectly or are incapable of supporting larger block
5776 sizes, and for these clients you may need to disable raw reads.</para>
5778 <para>In general this parameter should be viewed as a system tuning
5779 tool and left severely alone.</para>
5781 <para>Default: <emphasis><parameter>read raw</parameter> = yes
5785 </listitem></varlistentry>
5787 <indexterm significance="preferred"><primary>realm</primary></indexterm><term><anchor id="REALM"/>realm (G)</term><listitem>
5788 <para>This option specifies the kerberos realm to use. The realm is
5789 used as the ADS equivalent of the NT4 <command moreinfo="none">domain</command>. It
5790 is usually set to the DNS name of the kerberos server.
5793 <para>Default: <emphasis><parameter>realm</parameter> =
5796 <para>Example: <emphasis><parameter>realm</parameter> = mysambabox.mycompany.com
5799 </listitem></varlistentry>
5801 <indexterm significance="preferred"><primary>remote announce</primary></indexterm><term><anchor id="REMOTEANNOUNCE"/>remote announce (G)</term><listitem>
5802 <para>This option allows you to setup <citerefentry><refentrytitle>nmbd</refentrytitle>
5803 <manvolnum>8</manvolnum></citerefentry>to periodically announce itself
5804 to arbitrary IP addresses with an arbitrary workgroup name.</para>
5806 <para>This is useful if you want your Samba server to appear
5807 in a remote workgroup for which the normal browse propagation
5808 rules don't work. The remote workgroup can be anywhere that you
5809 can send IP packets to.</para>
5811 <para>For example:</para>
5813 <para><command moreinfo="none">remote announce = 192.168.2.255/SERVERS
5814 192.168.4.255/STAFF</command></para>
5816 <para>the above line would cause <command moreinfo="none">nmbd</command> to announce itself
5817 to the two given IP addresses using the given workgroup names.
5818 If you leave out the workgroup name then the one given in
5819 the <link linkend="WORKGROUP"><parameter moreinfo="none">workgroup</parameter></link>
5820 parameter is used instead.</para>
5822 <para>The IP addresses you choose would normally be the broadcast
5823 addresses of the remote networks, but can also be the IP addresses
5824 of known browse masters if your network config is that stable.</para>
5826 <para>See <link linkend="NetworkBrowsing"/>.</para>
5828 <para>Default: <emphasis><parameter>remote announce</parameter> =
5832 </listitem></varlistentry>
5834 <indexterm significance="preferred"><primary>remote browse sync</primary></indexterm><term><anchor id="REMOTEBROWSESYNC"/>remote browse sync (G)</term><listitem>
5835 <para>This option allows you to setup <citerefentry><refentrytitle>nmbd</refentrytitle>
5836 <manvolnum>8</manvolnum></citerefentry> to periodically request
5837 synchronization of browse lists with the master browser of a Samba
5838 server that is on a remote segment. This option will allow you to
5839 gain browse lists for multiple workgroups across routed networks. This
5840 is done in a manner that does not work with any non-Samba servers.</para>
5842 <para>This is useful if you want your Samba server and all local
5843 clients to appear in a remote workgroup for which the normal browse
5844 propagation rules don't work. The remote workgroup can be anywhere
5845 that you can send IP packets to.</para>
5847 <para>For example:</para>
5849 <para><command moreinfo="none">remote browse sync = 192.168.2.255 192.168.4.255</command></para>
5851 <para>the above line would cause <command moreinfo="none">nmbd</command> to request
5852 the master browser on the specified subnets or addresses to
5853 synchronize their browse lists with the local server.</para>
5855 <para>The IP addresses you choose would normally be the broadcast
5856 addresses of the remote networks, but can also be the IP addresses
5857 of known browse masters if your network config is that stable. If
5858 a machine IP address is given Samba makes NO attempt to validate
5859 that the remote machine is available, is listening, nor that it
5860 is in fact the browse master on its segment.</para>
5862 <para>Default: <emphasis><parameter>remote browse sync</parameter> =
5866 </listitem></varlistentry>
5868 <indexterm significance="preferred"><primary>restrict anonymous</primary></indexterm><term><anchor id="RESTRICTANONYMOUS"/>restrict anonymous (G)</term><listitem>
5869 <para>The setting of this parameter determines whether user and
5870 group list information is returned for an anonymous connection.
5871 and mirrors the effects of the
5872 <constant>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\RestrictAnonymous</constant> registry key in Windows
5873 2000 and Windows NT. When set to 0, user and group list
5874 information is returned to anyone who asks. When set
5875 to 1, only an authenticated user can retrive user and
5876 group list information. For the value 2, supported by
5877 Windows 2000/XP and Samba, no anonymous connections are allowed at
5878 all. This can break third party and Microsoft
5879 applications which expect to be allowed to perform
5880 operations anonymously.</para>
5883 The security advantage of using restrict anonymous = 1 is dubious,
5884 as user and group list information can be obtained using other
5890 The security advantage of using restrict anonymous = 2 is removed
5891 by setting <link linkend="GUESTOK"><parameter moreinfo="none">guest
5892 ok</parameter> = yes</link> on any share.
5896 <para>Default: <emphasis><parameter>restrict anonymous</parameter> = 0
5900 </listitem></varlistentry>
5902 <indexterm significance="preferred"><primary>root</primary><see>root directory</see></indexterm><term><anchor id="ROOT"/>root</term><listitem><para>This parameter is a synonym for root directory.</para></listitem></varlistentry><varlistentry>
5903 <indexterm significance="preferred"><primary>root dir</primary><see>root directory</see></indexterm><term><anchor id="ROOTDIR"/>root dir</term><listitem><para>This parameter is a synonym for root directory.</para></listitem></varlistentry><varlistentry>
5904 <indexterm significance="preferred"><primary>root directory</primary></indexterm><term><anchor id="ROOTDIRECTORY"/>root directory (G)</term><listitem>
5905 <para>The server will <command moreinfo="none">chroot()</command> (i.e.
5906 Change its root directory) to this directory on startup. This is
5907 not strictly necessary for secure operation. Even without it the
5908 server will deny access to files not in one of the service entries.
5909 It may also check for, and deny access to, soft links to other
5910 parts of the filesystem, or attempts to use ".." in file names
5911 to access other directories (depending on the setting of the <link linkend="WIDELINKS">
5912 <parameter moreinfo="none">wide links</parameter></link>
5916 <para>Adding a <parameter moreinfo="none">root directory</parameter> entry other
5917 than "/" adds an extra level of security, but at a price. It
5918 absolutely ensures that no access is given to files not in the
5919 sub-tree specified in the <parameter moreinfo="none">root directory</parameter>
5920 option, <emphasis>including</emphasis> some files needed for
5921 complete operation of the server. To maintain full operability
5922 of the server you will need to mirror some system files
5923 into the <parameter moreinfo="none">root directory</parameter> tree. In particular
5924 you will need to mirror <filename moreinfo="none">/etc/passwd</filename> (or a
5925 subset of it), and any binaries or configuration files needed for
5926 printing (if required). The set of files that must be mirrored is
5927 operating system dependent.</para>
5929 <para>Default: <emphasis><parameter>root directory</parameter> = /
5932 <para>Example: <emphasis><parameter>root directory</parameter> = /homes/smb
5935 </listitem></varlistentry>
5937 <indexterm significance="preferred"><primary>root postexec</primary></indexterm><term><anchor id="ROOTPOSTEXEC"/>root postexec (S)</term><listitem>
5938 <para>This is the same as the <parameter moreinfo="none">postexec</parameter>
5939 parameter except that the command is run as root. This
5940 is useful for unmounting filesystems
5941 (such as CDROMs) after a connection is closed.</para>
5943 <para>Default: <emphasis><parameter>root postexec</parameter> =
5947 </listitem></varlistentry>
5949 <indexterm significance="preferred"><primary>root preexec</primary></indexterm><term><anchor id="ROOTPREEXEC"/>root preexec (S)</term><listitem>
5950 <para>This is the same as the <parameter moreinfo="none">preexec</parameter>
5951 parameter except that the command is run as root. This
5952 is useful for mounting filesystems (such as CDROMs) when a
5953 connection is opened.</para>
5955 <para>Default: <emphasis><parameter>root preexec</parameter> =
5959 </listitem></varlistentry>
5961 <indexterm significance="preferred"><primary>root preexec close</primary></indexterm><term><anchor id="ROOTPREEXECCLOSE"/>root preexec close (S)</term><listitem>
5962 <para>This is the same as the <parameter moreinfo="none">preexec close
5963 </parameter> parameter except that the command is run as root.</para>
5965 <para>Default: <emphasis><parameter>root preexec close</parameter> = no
5969 </listitem></varlistentry>
5971 <indexterm significance="preferred"><primary>security</primary></indexterm><term><anchor id="SECURITY"/>security (G)</term><listitem>
5972 <para>This option affects how clients respond to
5973 Samba and is one of the most important settings in the <filename moreinfo="none">
5974 smb.conf</filename> file.</para>
5976 <para>The option sets the "security mode bit" in replies to
5977 protocol negotiations with <citerefentry><refentrytitle>smbd</refentrytitle>
5978 <manvolnum>8</manvolnum></citerefentry> to turn share level security on or off. Clients decide
5979 based on this bit whether (and how) to transfer user and password
5980 information to the server.</para>
5983 <para>The default is <command moreinfo="none">security = user</command>, as this is
5984 the most common setting needed when talking to Windows 98 and
5987 <para>The alternatives are <command moreinfo="none">security = share</command>,
5988 <command moreinfo="none">security = server</command> or <command moreinfo="none">security = domain
5991 <para>In versions of Samba prior to 2.0.0, the default was
5992 <command moreinfo="none">security = share</command> mainly because that was
5993 the only option at one stage.</para>
5995 <para>There is a bug in WfWg that has relevance to this
5996 setting. When in user or server level security a WfWg client
5997 will totally ignore the password you type in the "connect
5998 drive" dialog box. This makes it very difficult (if not impossible)
5999 to connect to a Samba service as anyone except the user that
6000 you are logged into WfWg as.</para>
6002 <para>If your PCs use usernames that are the same as their
6003 usernames on the UNIX machine then you will want to use
6004 <command moreinfo="none">security = user</command>. If you mostly use usernames
6005 that don't exist on the UNIX box then use <command moreinfo="none">security =
6006 share</command>.</para>
6008 <para>You should also use <command moreinfo="none">security = share</command> if you
6009 want to mainly setup shares without a password (guest shares). This
6010 is commonly used for a shared printer server. It is more difficult
6011 to setup guest shares with <command moreinfo="none">security = user</command>, see
6012 the <link linkend="MAPTOGUEST"><parameter moreinfo="none">map to guest</parameter>
6013 </link>parameter for details.</para>
6015 <para>It is possible to use <command moreinfo="none">smbd</command> in a <emphasis>
6016 hybrid mode</emphasis> where it is offers both user and share
6017 level security under different <link linkend="NETBIOSALIASES">
6018 <parameter moreinfo="none">NetBIOS aliases</parameter></link>. </para>
6020 <para>The different settings will now be explained.</para>
6023 <para><anchor id="SECURITYEQUALSSHARE"/><emphasis>SECURITY = SHARE</emphasis></para>
6025 <para>When clients connect to a share level security server they
6026 need not log onto the server with a valid username and password before
6027 attempting to connect to a shared resource (although modern clients
6028 such as Windows 95/98 and Windows NT will send a logon request with
6029 a username but no password when talking to a <command moreinfo="none">security = share
6030 </command> server). Instead, the clients send authentication information
6031 (passwords) on a per-share basis, at the time they attempt to connect
6032 to that share.</para>
6034 <para>Note that <command moreinfo="none">smbd</command> <emphasis>ALWAYS</emphasis>
6035 uses a valid UNIX user to act on behalf of the client, even in
6036 <command moreinfo="none">security = share</command> level security.</para>
6038 <para>As clients are not required to send a username to the server
6039 in share level security, <command moreinfo="none">smbd</command> uses several
6040 techniques to determine the correct UNIX user to use on behalf
6041 of the client.</para>
6043 <para>A list of possible UNIX usernames to match with the given
6044 client password is constructed using the following methods :</para>
6048 <para>If the <link linkend="GUESTONLY"><parameter moreinfo="none">guest
6049 only</parameter></link> parameter is set, then all the other
6050 stages are missed and only the <link linkend="GUESTACCOUNT">
6051 <parameter moreinfo="none">guest account</parameter></link> username is checked.
6056 <para>Is a username is sent with the share connection
6057 request, then this username (after mapping - see <link linkend="USERNAMEMAP">
6058 <parameter moreinfo="none">username map</parameter></link>),
6059 is added as a potential username.
6064 <para>If the client did a previous <emphasis>logon
6065 </emphasis> request (the SessionSetup SMB call) then the
6066 username sent in this SMB will be added as a potential username.
6071 <para>The name of the service the client requested is
6072 added as a potential username.
6077 <para>The NetBIOS name of the client is added to
6078 the list as a potential username.
6083 <para>Any users on the <link linkend="USER"><parameter moreinfo="none">
6084 user</parameter></link> list are added as potential usernames.
6089 <para>If the <parameter moreinfo="none">guest only</parameter> parameter is
6090 not set, then this list is then tried with the supplied password.
6091 The first user for whom the password matches will be used as the
6094 <para>If the <parameter moreinfo="none">guest only</parameter> parameter is
6095 set, or no username can be determined then if the share is marked
6096 as available to the <parameter moreinfo="none">guest account</parameter>, then this
6097 guest user will be used, otherwise access is denied.</para>
6099 <para>Note that it can be <emphasis>very</emphasis> confusing
6100 in share-level security as to which UNIX username will eventually
6101 be used in granting access.</para>
6103 <para>See also the section <link linkend="VALIDATIONSECT">
6104 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6106 <para><anchor id="SECURITYEQUALSUSER"/><emphasis>SECURITY = USER</emphasis></para>
6108 <para>This is the default security setting in Samba 3.0.
6109 With user-level security a client must first "log-on" with a
6110 valid username and password (which can be mapped using the <link linkend="USERNAMEMAP">
6111 <parameter moreinfo="none">username map</parameter></link>
6112 parameter). Encrypted passwords (see the <link linkend="ENCRYPTPASSWORDS">
6113 <parameter moreinfo="none">encrypted passwords</parameter></link> parameter) can also
6114 be used in this security mode. Parameters such as <link linkend="USER">
6115 <parameter moreinfo="none">user</parameter></link> and <link linkend="GUESTONLY">
6116 <parameter moreinfo="none">guest only</parameter></link> if set are then applied and
6117 may change the UNIX user to use on this connection, but only after
6118 the user has been successfully authenticated.</para>
6120 <para><emphasis>Note</emphasis> that the name of the resource being
6121 requested is <emphasis>not</emphasis> sent to the server until after
6122 the server has successfully authenticated the client. This is why
6123 guest shares don't work in user level security without allowing
6124 the server to automatically map unknown users into the <link linkend="GUESTACCOUNT">
6125 <parameter moreinfo="none">guest account</parameter></link>.
6126 See the <link linkend="MAPTOGUEST"><parameter moreinfo="none">map to guest</parameter>
6127 </link> parameter for details on doing this.</para>
6129 <para>See also the section <link linkend="VALIDATIONSECT">
6130 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6132 <para><anchor id="SECURITYEQUALSDOMAIN"/><emphasis>SECURITY = DOMAIN</emphasis></para>
6134 <para>This mode will only work correctly if <citerefentry><refentrytitle>net</refentrytitle>
6135 <manvolnum>8</manvolnum></citerefentry> has been used to add this
6136 machine into a Windows NT Domain. It expects the <link linkend="ENCRYPTPASSWORDS">
6137 <parameter moreinfo="none">encrypted passwords</parameter>
6138 </link> parameter to be set to <constant>yes</constant>. In this
6139 mode Samba will try to validate the username/password by passing
6140 it to a Windows NT Primary or Backup Domain Controller, in exactly
6141 the same way that a Windows NT Server would do.</para>
6143 <para><emphasis>Note</emphasis> that a valid UNIX user must still
6144 exist as well as the account on the Domain Controller to allow
6145 Samba to have a valid UNIX account to map file access to.</para>
6147 <para><emphasis>Note</emphasis> that from the client's point
6148 of view <command moreinfo="none">security = domain</command> is the same
6149 as <command moreinfo="none">security = user</command>. It only
6150 affects how the server deals with the authentication,
6151 it does not in any way affect what the client sees.</para>
6153 <para><emphasis>Note</emphasis> that the name of the resource being
6154 requested is <emphasis>not</emphasis> sent to the server until after
6155 the server has successfully authenticated the client. This is why
6156 guest shares don't work in user level security without allowing
6157 the server to automatically map unknown users into the <link linkend="GUESTACCOUNT">
6158 <parameter moreinfo="none">guest account</parameter></link>.
6159 See the <link linkend="MAPTOGUEST"><parameter moreinfo="none">map to guest</parameter>
6160 </link> parameter for details on doing this.</para>
6162 <para>See also the section <link linkend="VALIDATIONSECT">
6163 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6165 <para>See also the <link linkend="PASSWORDSERVER"><parameter moreinfo="none">password
6166 server</parameter></link> parameter and the <link linkend="ENCRYPTPASSWORDS">
6167 <parameter moreinfo="none">encrypted passwords</parameter>
6168 </link> parameter.</para>
6170 <para><anchor id="SECURITYEQUALSSERVER"/><emphasis>SECURITY = SERVER</emphasis></para>
6172 <para>In this mode Samba will try to validate the username/password
6173 by passing it to another SMB server, such as an NT box. If this
6174 fails it will revert to <command moreinfo="none">security =
6175 user</command>. It expects the <link linkend="ENCRYPTPASSWORDS">
6176 <parameter moreinfo="none">encrypted passwords</parameter></link> parameter
6177 to be set to <constant>yes</constant>, unless the remote server
6178 does not support them. However note that if encrypted passwords have been
6179 negotiated then Samba cannot revert back to checking the UNIX password file,
6180 it must have a valid <filename moreinfo="none">smbpasswd</filename> file to check
6181 users against. See the chapter about the User Database in the Samba HOWTO Collection for details on how to set this up.</para>
6183 <note><para>This mode of operation has
6184 significant pitfalls, due to the fact that is activly initiates a
6185 man-in-the-middle attack on the remote SMB server. In particular,
6186 this mode of operation can cause significant resource consuption on
6187 the PDC, as it must maintain an active connection for the duration
6188 of the user's session. Furthermore, if this connection is lost,
6189 there is no way to reestablish it, and futher authenticaions to the
6190 Samba server may fail. (From a single client, till it disconnects).
6193 <note><para>From the client's point of
6194 view <command moreinfo="none">security = server</command> is the
6195 same as <command moreinfo="none">security = user</command>. It
6196 only affects how the server deals with the authentication, it does
6197 not in any way affect what the client sees.</para></note>
6199 <para><emphasis>Note</emphasis> that the name of the resource being
6200 requested is <emphasis>not</emphasis> sent to the server until after
6201 the server has successfully authenticated the client. This is why
6202 guest shares don't work in user level security without allowing
6203 the server to automatically map unknown users into the <link linkend="GUESTACCOUNT">
6204 <parameter moreinfo="none">guest account</parameter></link>.
6205 See the <link linkend="MAPTOGUEST"><parameter moreinfo="none">map to guest</parameter>
6206 </link> parameter for details on doing this.</para>
6208 <para>See also the section <link linkend="VALIDATIONSECT">
6209 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6211 <para>See also the <link linkend="PASSWORDSERVER"><parameter moreinfo="none">password
6212 server</parameter></link> parameter and the <link linkend="ENCRYPTPASSWORDS">
6213 <parameter moreinfo="none">encrypted passwords</parameter></link> parameter.</para>
6215 <para><anchor id="SECURITYEQUALSADS"/><emphasis>SECURITY = ADS</emphasis></para>
6217 <para>In this mode, Samba will act as a domain member in an ADS realm. To operate
6218 in this mode, the machine running Samba will need to have Kerberos installed
6219 and configured and Samba will need to be joined to the ADS realm using the
6220 net utility. </para>
6222 <para>Note that this mode does NOT make Samba operate as a Active Directory Domain
6225 <para>Read the chapter about Domain Membership in the HOWTO for details.</para>
6227 <para>Default: <emphasis><parameter>security</parameter> = USER
6230 <para>Example: <emphasis><parameter>security</parameter> = DOMAIN
6233 </listitem></varlistentry>
6235 <indexterm significance="preferred"><primary>security mask</primary></indexterm><term><anchor id="SECURITYMASK"/>security mask (S)</term><listitem>
6236 <para>This parameter controls what UNIX permission
6237 bits can be modified when a Windows NT client is manipulating
6238 the UNIX permission on a file using the native NT security
6241 <para>This parameter is applied as a mask (AND'ed with) to
6242 the changed permission bits, thus preventing any bits not in
6243 this mask from being modified. Essentially, zero bits in this
6244 mask may be treated as a set of bits the user is not allowed
6247 <para>If not set explicitly this parameter is 0777, allowing
6248 a user to modify all the user/group/world permissions on a file.
6251 <para><emphasis>Note</emphasis> that users who can access the
6252 Samba server through other means can easily bypass this
6253 restriction, so it is primarily useful for standalone
6254 "appliance" systems. Administrators of most normal systems will
6255 probably want to leave it set to <constant>0777</constant>.</para>
6257 <para>Default: <emphasis><parameter>security mask</parameter> = 0777
6260 <para>Example: <emphasis><parameter>security mask</parameter> = 0770
6263 </listitem></varlistentry>
6265 <indexterm significance="preferred"><primary>server schannel</primary></indexterm><term><anchor id="SERVERSCHANNEL"/>server schannel (G)</term><listitem>
6266 <para>This controls whether the server offers or even
6267 demands the use of the netlogon schannel.
6268 <parameter>server schannel = no</parameter> does not
6269 offer the schannel, <parameter>server schannel =
6270 auto</parameter> offers the schannel but does not
6271 enforce it, and <parameter>server schannel =
6272 yes</parameter> denies access if the client is not
6273 able to speak netlogon schannel. This is only the case
6274 for Windows NT4 before SP4.</para>
6276 <para>Please note that with this set to
6277 <parameter>no</parameter> you will have to apply the
6278 WindowsXP requireSignOrSeal-Registry patch found in
6279 the docs/Registry subdirectory.</para>
6281 <para>Default: <emphasis><parameter>server schannel</parameter> = auto
6284 <para>Example: <emphasis><parameter>server schannel</parameter> = yes
6287 </listitem></varlistentry>
6289 <indexterm significance="preferred"><primary>server signing</primary></indexterm><term><anchor id="SERVERSIGNING"/>server signing (G)</term><listitem>
6291 <para>This controls whether the server offers or requires
6292 the client it talks to to use SMB signing. Possible values
6293 are <emphasis>auto</emphasis>, <emphasis>mandatory</emphasis>
6294 and <emphasis>disabled</emphasis>.
6297 <para>When set to auto, SMB signing is offered, but not enforced.
6298 When set to mandatory, SMB signing is required and if set
6299 to disabled, SMB signing is not offered either.</para>
6301 <para>Default: <emphasis><parameter>server signing</parameter> = Disabled
6305 </listitem></varlistentry>
6307 <indexterm significance="preferred"><primary>server string</primary></indexterm><term><anchor id="SERVERSTRING"/>server string (G)</term><listitem>
6308 <para>This controls what string will show up in the printer comment box in print
6309 manager and next to the IPC connection in <command moreinfo="none">net view</command>. It
6310 can be any string that you wish to show to your users.</para>
6312 <para>It also sets what will appear in browse lists next
6313 to the machine name.</para>
6315 <para>A <parameter moreinfo="none">%v</parameter> will be replaced with the Samba
6316 version number.</para>
6318 <para>A <parameter moreinfo="none">%h</parameter> will be replaced with the
6321 <para>Default: <emphasis><parameter>server string</parameter> = Samba %v
6324 <para>Example: <emphasis><parameter>server string</parameter> = University of GNUs Samba Server
6327 </listitem></varlistentry>
6329 <indexterm significance="preferred"><primary>set directory</primary></indexterm><term><anchor id="SETDIRECTORY"/>set directory (S)</term><listitem>
6330 <para>If <command moreinfo="none">set directory = no</command>, then
6331 users of the service may not use the setdir command to change
6334 <para>The <command moreinfo="none">setdir</command> command is only implemented
6335 in the Digital Pathworks client. See the Pathworks documentation
6338 <para>Default: <emphasis><parameter>set directory</parameter> = no
6342 </listitem></varlistentry>
6344 <indexterm significance="preferred"><primary>set primary group script</primary></indexterm><term><anchor id="SETPRIMARYGROUPSCRIPT"/>set primary group script (G)</term><listitem>
6346 <para>Thanks to the Posix subsystem in NT a Windows User has a
6347 primary group in addition to the auxiliary groups. This script
6348 sets the primary group in the unix userdatase when an
6349 administrator sets the primary group from the windows user
6350 manager or when fetching a SAM with <command>net rpc
6351 vampire</command>. <parameter>%u</parameter> will be replaced
6352 with the user whose primary group is to be set.
6353 <parameter>%g</parameter> will be replaced with the group to
6356 <para>Default: <emphasis><parameter>set primary group script</parameter> =
6359 <para>Example: <emphasis><parameter>set primary group script</parameter> = /usr/sbin/usermod -g '%g' '%u'
6362 </listitem></varlistentry>
6364 <indexterm significance="preferred"><primary>set quota command</primary></indexterm><term><anchor id="SETQUOTACOMMAND"/>set quota command (G)</term><listitem>
6365 <para>The <command>set quota command</command> should only be used
6366 whenever there is no operating system API available from the OS that
6367 samba can use.</para>
6369 <para>This option is only available if Samba was configured with the argument <command>--with-sys-quotas</command> or
6370 on linux when <command>./configure --with-quotas</command> was used and a working quota api
6371 was found in the system. Most packages are configured with these options already.</para>
6373 <para>This parameter should specify the path to a script that
6374 can set quota for the specified arguments.</para>
6376 <para>The specified script should take the following arguments:</para>
6379 <listitem><para>1 - quota type
6381 <listitem><para>1 - user quotas</para></listitem>
6382 <listitem><para>2 - user default quotas (uid = -1)</para></listitem>
6383 <listitem><para>3 - group quotas</para></listitem>
6384 <listitem><para>4 - group default quotas (gid = -1)</para></listitem>
6387 <listitem><para>2 - id (uid for user, gid for group, -1 if N/A)</para></listitem>
6388 <listitem><para>3 - quota state (0 = disable, 1 = enable, 2 = enable and enforce)</para></listitem>
6389 <listitem><para>4 - block softlimit</para></listitem>
6390 <listitem><para>5 - block hardlimit</para></listitem>
6391 <listitem><para>6 - inode softlimit</para></listitem>
6392 <listitem><para>7 - inode hardlimit</para></listitem>
6393 <listitem><para>8(optional) - block size, defaults to 1024</para></listitem>
6396 <para>The script should output at least one line of data on success. And nothing on failure.</para>
6398 <para>Default: <emphasis><parameter>set quota command</parameter> =
6401 <para>Example: <emphasis><parameter>set quota command</parameter> = /usr/local/sbin/set_quota
6404 </listitem></varlistentry>
6406 <indexterm significance="preferred"><primary>share modes</primary></indexterm><term><anchor id="SHAREMODES"/>share modes (S)</term><listitem>
6407 <para>This enables or disables the honoring of
6408 the <parameter moreinfo="none">share modes</parameter> during a file open. These
6409 modes are used by clients to gain exclusive read or write access
6412 <para>These open modes are not directly supported by UNIX, so
6413 they are simulated using shared memory, or lock files if your
6414 UNIX doesn't support shared memory (almost all do).</para>
6416 <para>The share modes that are enabled by this option are
6417 <constant>DENY_DOS</constant>, <constant>DENY_ALL</constant>,
6418 <constant>DENY_READ</constant>, <constant>DENY_WRITE</constant>,
6419 <constant>DENY_NONE</constant> and <constant>DENY_FCB</constant>.
6422 <para>This option gives full share compatibility and enabled
6425 <para>You should <emphasis>NEVER</emphasis> turn this parameter
6426 off as many Windows applications will break if you do so.</para>
6428 <para>Default: <emphasis><parameter>share modes</parameter> = yes
6432 </listitem></varlistentry>
6434 <indexterm significance="preferred"><primary>short preserve case</primary></indexterm><term><anchor id="SHORTPRESERVECASE"/>short preserve case (S)</term><listitem>
6435 <para>This boolean parameter controls if new files
6436 which conform to 8.3 syntax, that is all in upper case and of
6437 suitable length, are created upper case, or if they are forced
6438 to be the <link linkend="DEFAULTCASE"><parameter moreinfo="none">default case
6439 </parameter></link>. This option can be use with <link linkend="PRESERVECASE"><command moreinfo="none">preserve case = yes</command>
6440 </link> to permit long filenames to retain their case, while short
6441 names are lowered. </para>
6443 <para>See the section on <link linkend="NAMEMANGLINGSECT">NAME MANGLING</link>.</para>
6445 <para>Default: <emphasis><parameter>short preserve case</parameter> = yes
6449 </listitem></varlistentry>
6451 <indexterm significance="preferred"><primary>show add printer wizard</primary></indexterm><term><anchor id="SHOWADDPRINTERWIZARD"/>show add printer wizard (G)</term><listitem>
6452 <para>With the introduction of MS-RPC based printing support
6453 for Windows NT/2000 client in Samba 2.2, a "Printers..." folder will
6454 appear on Samba hosts in the share listing. Normally this folder will
6455 contain an icon for the MS Add Printer Wizard (APW). However, it is
6456 possible to disable this feature regardless of the level of privilege
6457 of the connected user.</para>
6459 <para>Under normal circumstances, the Windows NT/2000 client will
6460 open a handle on the printer server with OpenPrinterEx() asking for
6461 Administrator privileges. If the user does not have administrative
6462 access on the print server (i.e is not root or a member of the
6463 <parameter moreinfo="none">printer admin</parameter> group), the OpenPrinterEx()
6464 call fails and the client makes another open call with a request for
6465 a lower privilege level. This should succeed, however the APW
6466 icon will not be displayed.</para>
6468 <para>Disabling the <parameter moreinfo="none">show add printer wizard</parameter>
6469 parameter will always cause the OpenPrinterEx() on the server
6470 to fail. Thus the APW icon will never be displayed.
6472 <note><para>This does not prevent the same user from having
6473 administrative privilege on an individual printer.</para></note>
6475 <para>Default: <emphasis><parameter>show add printer wizard</parameter> = yes
6479 </listitem></varlistentry>
6481 <indexterm significance="preferred"><primary>shutdown script</primary></indexterm><term><anchor id="SHUTDOWNSCRIPT"/>shutdown script (G)</term><listitem>
6482 <para>This a full path name to a script called by
6483 <citerefentry><refentrytitle>smbd</refentrytitle>
6484 <manvolnum>8</manvolnum></citerefentry> that should
6485 start a shutdown procedure.</para>
6487 <para>If the connected user posseses the <constant>SeRemoteShutdownPrivilege</constant>,
6488 right, this command will be run as user.</para>
6490 <para>The %z %t %r %f variables are expanded as follows:</para>
6494 <para><parameter moreinfo="none">%z</parameter> will be substituted with the
6495 shutdown message sent to the server.</para>
6499 <para><parameter moreinfo="none">%t</parameter> will be substituted with the
6500 number of seconds to wait before effectively starting the
6501 shutdown procedure.</para>
6505 <para><parameter moreinfo="none">%r</parameter> will be substituted with the
6506 switch <emphasis>-r</emphasis>. It means reboot after shutdown
6511 <para><parameter moreinfo="none">%f</parameter> will be substituted with the
6512 switch <emphasis>-f</emphasis>. It means force the shutdown
6513 even if applications do not respond for NT.</para>
6517 <para>Shutdown script example:
6518 <programlisting format="linespecific">
6525 /sbin/shutdown $3 $4 +$time $1 &
6527 Shutdown does not return so we need to launch it in background.
6530 <para>Default: <emphasis><parameter>shutdown script</parameter> =
6533 <para>Example: <emphasis><parameter>shutdown script</parameter> = /usr/local/samba/sbin/shutdown %m %t %r %f
6536 </listitem></varlistentry>
6538 <indexterm significance="preferred"><primary>smb passwd file</primary></indexterm><term><anchor id="SMBPASSWDFILE"/>smb passwd file (G)</term><listitem>
6539 <para>This option sets the path to the encrypted smbpasswd file. By
6540 default the path to the smbpasswd file is compiled into Samba.</para>
6542 <para>Default: <emphasis><parameter>smb passwd file</parameter> = ${prefix}/private/smbpasswd
6545 <para>Example: <emphasis><parameter>smb passwd file</parameter> = /etc/samba/smbpasswd
6548 </listitem></varlistentry>
6550 <indexterm significance="preferred"><primary>smb ports</primary></indexterm><term><anchor id="SMBPORTS"/>smb ports (G)</term><listitem>
6551 <para>Specifies which ports the server should listen on for SMB traffic.</para>
6553 <para>Default: <emphasis><parameter>smb ports</parameter> = 445 139
6557 </listitem></varlistentry>
6559 <indexterm significance="preferred"><primary>socket address</primary></indexterm><term><anchor id="SOCKETADDRESS"/>socket address (G)</term><listitem>
6560 <para>This option allows you to control what
6561 address Samba will listen for connections on. This is used to
6562 support multiple virtual interfaces on the one server, each
6563 with a different configuration.</para>
6565 <para>By default Samba will accept connections on any
6568 <para>Default: <emphasis><parameter>socket address</parameter> =
6571 <para>Example: <emphasis><parameter>socket address</parameter> = 192.168.2.20
6574 </listitem></varlistentry>
6576 <indexterm significance="preferred"><primary>socket options</primary></indexterm><term><anchor id="SOCKETOPTIONS"/>socket options (G)</term><listitem>
6577 <para>This option allows you to set socket options
6578 to be used when talking with the client.</para>
6580 <para>Socket options are controls on the networking layer
6581 of the operating systems which allow the connection to be
6584 <para>This option will typically be used to tune your Samba server
6585 for optimal performance for your local network. There is no way
6586 that Samba can know what the optimal parameters are for your net,
6587 so you must experiment and choose them yourself. We strongly
6588 suggest you read the appropriate documentation for your operating
6589 system first (perhaps <command moreinfo="none">man
6590 setsockopt</command> will help).</para>
6592 <para>You may find that on some systems Samba will say
6593 "Unknown socket option" when you supply an option. This means you
6594 either incorrectly typed it or you need to add an include file
6595 to includes.h for your OS. If the latter is the case please
6596 send the patch to <ulink url="mailto:samba-technical@samba.org">
6597 samba-technical@samba.org</ulink>.</para>
6599 <para>Any of the supported socket options may be combined
6600 in any way you like, as long as your OS allows it.</para>
6602 <para>This is the list of socket options currently settable
6603 using this option:</para>
6606 <listitem><para>SO_KEEPALIVE</para></listitem>
6607 <listitem><para>SO_REUSEADDR</para></listitem>
6608 <listitem><para>SO_BROADCAST</para></listitem>
6609 <listitem><para>TCP_NODELAY</para></listitem>
6610 <listitem><para>IPTOS_LOWDELAY</para></listitem>
6611 <listitem><para>IPTOS_THROUGHPUT</para></listitem>
6612 <listitem><para>SO_SNDBUF *</para></listitem>
6613 <listitem><para>SO_RCVBUF *</para></listitem>
6614 <listitem><para>SO_SNDLOWAT *</para></listitem>
6615 <listitem><para>SO_RCVLOWAT *</para></listitem>
6618 <para>Those marked with a <emphasis>'*'</emphasis> take an integer
6619 argument. The others can optionally take a 1 or 0 argument to enable
6620 or disable the option, by default they will be enabled if you
6621 don't specify 1 or 0.</para>
6623 <para>To specify an argument use the syntax SOME_OPTION = VALUE
6624 for example <command moreinfo="none">SO_SNDBUF = 8192</command>. Note that you must
6625 not have any spaces before or after the = sign.</para>
6627 <para>If you are on a local network then a sensible option
6630 <para><command moreinfo="none">socket options = IPTOS_LOWDELAY</command></para>
6632 <para>If you have a local network then you could try:</para>
6634 <para><command moreinfo="none">socket options = IPTOS_LOWDELAY TCP_NODELAY</command></para>
6636 <para>If you are on a wide area network then perhaps try
6637 setting IPTOS_THROUGHPUT. </para>
6639 <para>Note that several of the options may cause your Samba
6640 server to fail completely. Use these options with caution!</para>
6642 <para>Default: <emphasis><parameter>socket options</parameter> = TCP_NODELAY
6645 <para>Example: <emphasis><parameter>socket options</parameter> = IPTOS_LOWDELAY
6648 </listitem></varlistentry>
6650 <indexterm significance="preferred"><primary>stat cache</primary></indexterm><term><anchor id="STATCACHE"/>stat cache (G)</term><listitem>
6651 <para>This parameter determines if <citerefentry><refentrytitle>smbd</refentrytitle>
6652 <manvolnum>8</manvolnum></citerefentry> will use a cache in order to
6653 speed up case insensitive name mappings. You should never need
6654 to change this parameter.</para>
6656 <para>Default: <emphasis><parameter>stat cache</parameter> = yes
6660 </listitem></varlistentry>
6662 <indexterm significance="preferred"><primary>store dos attributes</primary></indexterm><term><anchor id="STOREDOSATTRIBUTES"/>store dos attributes (S)</term><listitem>
6663 <para>If this parameter is set Samba no longer attempts to
6664 map DOS attributes like SYSTEM, HIDDEN, ARCHIVE or READ-ONLY
6665 to UNIX permission bits (such as the <link linkend="MAPHIDDEN"><parameter moreinfo="none">map hidden</parameter></link>. Instead, DOS attributes will be stored onto an extended
6666 attribute in the UNIX filesystem, associated with the file or directory.
6667 For this to operate correctly, the parameters <link linkend="MAPHIDDEN"><parameter moreinfo="none">map hidden</parameter></link>, <link linkend="MAPSYSTEM"><parameter moreinfo="none">map system</parameter></link>, <link linkend="MAPARCHIVE"><parameter moreinfo="none">map archive</parameter></link> must be set to off.
6668 This parameter writes the DOS attributes as a string into the
6669 extended attribute named "user.DOSATTRIB". This extended attribute
6670 is explicitly hidden from smbd clients requesting an EA list.
6671 On Linux the filesystem must have been mounted with the mount
6672 option user_xattr in order for extended attributes to work, also
6673 extended attributes must be compiled into the Linux kernel.
6676 <para>Default: <emphasis><parameter>store dos attributes</parameter> = no
6680 </listitem></varlistentry>
6682 <indexterm significance="preferred"><primary>strict allocate</primary></indexterm><term><anchor id="STRICTALLOCATE"/>strict allocate (S)</term><listitem>
6683 <para>This is a boolean that controls the handling of
6684 disk space allocation in the server. When this is set to <constant>yes</constant>
6685 the server will change from UNIX behaviour of not committing real
6686 disk storage blocks when a file is extended to the Windows behaviour
6687 of actually forcing the disk system to allocate real storage blocks
6688 when a file is created or extended to be a given size. In UNIX
6689 terminology this means that Samba will stop creating sparse files.
6690 This can be slow on some systems.</para>
6692 <para>When strict allocate is <constant>no</constant> the server does sparse
6693 disk block allocation when a file is extended.</para>
6695 <para>Setting this to <constant>yes</constant> can help Samba return
6696 out of quota messages on systems that are restricting the disk quota
6699 <para>Default: <emphasis><parameter>strict allocate</parameter> = no
6703 </listitem></varlistentry>
6705 <indexterm significance="preferred"><primary>strict locking</primary></indexterm><term><anchor id="STRICTLOCKING"/>strict locking (S)</term><listitem>
6706 <para>This is a boolean that controls the handling of
6707 file locking in the server. When this is set to <constant>yes</constant>,
6708 the server will check every read and write access for file locks, and
6709 deny access if locks exist. This can be slow on some systems.</para>
6711 <para>When strict locking is disabled, the server performs file
6712 lock checks only when the client explicitly asks for them.</para>
6714 <para>Well-behaved clients always ask for lock checks when it
6715 is important. So in the vast majority of cases, <command moreinfo="none">strict
6716 locking = no</command> is acceptable.</para>
6718 <para>Default: <emphasis><parameter>strict locking</parameter> = yes
6722 </listitem></varlistentry>
6724 <indexterm significance="preferred"><primary>strict sync</primary></indexterm><term><anchor id="STRICTSYNC"/>strict sync (S)</term><listitem>
6725 <para>Many Windows applications (including the Windows 98 explorer
6726 shell) seem to confuse flushing buffer contents to disk with doing
6727 a sync to disk. Under UNIX, a sync call forces the process to be
6728 suspended until the kernel has ensured that all outstanding data in
6729 kernel disk buffers has been safely stored onto stable storage.
6730 This is very slow and should only be done rarely. Setting this
6731 parameter to <constant>no</constant> (the default) means that
6732 <citerefentry><refentrytitle>smbd</refentrytitle>
6733 <manvolnum>8</manvolnum></citerefentry> ignores the Windows
6734 applications requests for a sync call. There is only a possibility
6735 of losing data if the operating system itself that Samba is running
6736 on crashes, so there is little danger in this default setting. In
6737 addition, this fixes many performance problems that people have
6738 reported with the new Windows98 explorer shell file copies.</para>
6740 <para>Default: <emphasis><parameter>strict sync</parameter> = no
6744 </listitem></varlistentry>
6746 <indexterm significance="preferred"><primary>sync always</primary></indexterm><term><anchor id="SYNCALWAYS"/>sync always (S)</term><listitem>
6747 <para>This is a boolean parameter that controls
6748 whether writes will always be written to stable storage before
6749 the write call returns. If this is <constant>no</constant> then the server will be
6750 guided by the client's request in each write call (clients can
6751 set a bit indicating that a particular write should be synchronous).
6752 If this is <constant>yes</constant> then every write will be followed by a <command moreinfo="none">fsync()
6753 </command> call to ensure the data is written to disk. Note that
6754 the <parameter moreinfo="none">strict sync</parameter> parameter must be set to
6755 <constant>yes</constant> in order for this parameter to have
6758 <para>Default: <emphasis><parameter>sync always</parameter> = no
6762 </listitem></varlistentry>
6764 <indexterm significance="preferred"><primary>syslog</primary></indexterm><term><anchor id="SYSLOG"/>syslog (G)</term><listitem>
6765 <para>This parameter maps how Samba debug messages
6766 are logged onto the system syslog logging levels. Samba debug
6767 level zero maps onto syslog <constant>LOG_ERR</constant>, debug
6768 level one maps onto <constant>LOG_WARNING</constant>, debug level
6769 two maps onto <constant>LOG_NOTICE</constant>, debug level three
6770 maps onto LOG_INFO. All higher levels are mapped to <constant>
6771 LOG_DEBUG</constant>.</para>
6773 <para>This parameter sets the threshold for sending messages
6774 to syslog. Only messages with debug level less than this value
6775 will be sent to syslog.</para>
6777 <para>Default: <emphasis><parameter>syslog</parameter> = 1
6781 </listitem></varlistentry>
6783 <indexterm significance="preferred"><primary>syslog only</primary></indexterm><term><anchor id="SYSLOGONLY"/>syslog only (G)</term><listitem>
6784 <para>If this parameter is set then Samba debug
6785 messages are logged into the system syslog only, and not to
6786 the debug log files.</para>
6788 <para>Default: <emphasis><parameter>syslog only</parameter> = no
6792 </listitem></varlistentry>
6794 <indexterm significance="preferred"><primary>template homedir</primary></indexterm><term><anchor id="TEMPLATEHOMEDIR"/>template homedir (G)</term><listitem>
6795 <para>When filling out the user information for a Windows NT
6796 user, the <citerefentry><refentrytitle>winbindd</refentrytitle>
6797 <manvolnum>8</manvolnum></citerefentry> daemon uses this
6798 parameter to fill in the home directory for that user. If the
6799 string <parameter moreinfo="none">%D</parameter> is present it
6800 is substituted with the user's Windows NT domain name. If the
6801 string <parameter moreinfo="none">%U</parameter> is present it
6802 is substituted with the user's Windows NT user name.</para>
6804 <para>Default: <emphasis><parameter>template homedir</parameter> = /home/%D/%U
6808 </listitem></varlistentry>
6810 <indexterm significance="preferred"><primary>template primary group</primary></indexterm><term><anchor id="TEMPLATEPRIMARYGROUP"/>template primary group (G)</term><listitem>
6811 <para>This option defines the default primary group for
6812 each user created by <citerefentry><refentrytitle>winbindd</refentrytitle>
6813 <manvolnum>8</manvolnum></citerefentry>'s local account management
6814 functions (similar to the 'add user script').
6817 <para>Default: <emphasis><parameter>template primary group</parameter> = nobody
6821 </listitem></varlistentry>
6823 <indexterm significance="preferred"><primary>template shell</primary></indexterm><term><anchor id="TEMPLATESHELL"/>template shell (G)</term><listitem>
6824 <para>When filling out the user information for a Windows NT
6825 user, the <citerefentry><refentrytitle>winbindd</refentrytitle>
6826 <manvolnum>8</manvolnum></citerefentry> daemon uses this
6827 parameter to fill in the login shell for that user.</para>
6829 <para><emphasis>No default</emphasis></para>
6831 </listitem></varlistentry>
6833 <indexterm significance="preferred"><primary>time offset</primary></indexterm><term><anchor id="TIMEOFFSET"/>time offset (G)</term><listitem>
6834 <para>This parameter is a setting in minutes to add
6835 to the normal GMT to local time conversion. This is useful if
6836 you are serving a lot of PCs that have incorrect daylight
6837 saving time handling.</para>
6839 <para>Default: <emphasis><parameter>time offset</parameter> = 0
6842 <para>Example: <emphasis><parameter>time offset</parameter> = 60
6845 </listitem></varlistentry>
6847 <indexterm significance="preferred"><primary>time server</primary></indexterm><term><anchor id="TIMESERVER"/>time server (G)</term><listitem>
6848 <para>This parameter determines if <citerefentry><refentrytitle>nmbd</refentrytitle>
6849 <manvolnum>8</manvolnum></citerefentry> advertises itself as a time server to Windows
6852 <para>Default: <emphasis><parameter>time server</parameter> = no
6856 </listitem></varlistentry>
6858 <indexterm significance="preferred"><primary>unix charset</primary></indexterm><term><anchor id="UNIXCHARSET"/>unix charset (G)</term><listitem>
6859 <para>Specifies the charset the unix machine
6860 Samba runs on uses. Samba needs to know this in order to be able to
6861 convert text to the charsets other SMB clients use.
6864 <para>This is also the charset Samba will use when specifying arguments
6865 to scripts that it invokes.
6868 <para>Default: <emphasis><parameter>unix charset</parameter> = UTF8
6871 <para>Example: <emphasis><parameter>unix charset</parameter> = ASCII
6874 </listitem></varlistentry>
6876 <indexterm significance="preferred"><primary>unix extensions</primary></indexterm><term><anchor id="UNIXEXTENSIONS"/>unix extensions (G)</term><listitem>
6877 <para>This boolean parameter controls whether Samba
6878 implments the CIFS UNIX extensions, as defined by HP.
6879 These extensions enable Samba to better serve UNIX CIFS clients
6880 by supporting features such as symbolic links, hard links, etc...
6881 These extensions require a similarly enabled client, and are of
6882 no current use to Windows clients.</para>
6884 <para>Default: <emphasis><parameter>unix extensions</parameter> = yes
6888 </listitem></varlistentry>
6890 <indexterm significance="preferred"><primary>unix password sync</primary></indexterm><term><anchor id="UNIXPASSWORDSYNC"/>unix password sync (G)</term><listitem>
6891 <para>This boolean parameter controls whether Samba
6892 attempts to synchronize the UNIX password with the SMB password
6893 when the encrypted SMB password in the smbpasswd file is changed.
6894 If this is set to <constant>yes</constant> the program specified in the <parameter moreinfo="none">passwd
6895 program</parameter>parameter is called <emphasis>AS ROOT</emphasis> -
6896 to allow the new UNIX password to be set without access to the
6897 old UNIX password (as the SMB password change code has no
6898 access to the old password cleartext, only the new).</para>
6900 <para>Default: <emphasis><parameter>unix password sync</parameter> = no
6904 </listitem></varlistentry>
6906 <indexterm significance="preferred"><primary>update encrypted</primary></indexterm><term><anchor id="UPDATEENCRYPTED"/>update encrypted (G)</term><listitem>
6908 <para>This boolean parameter allows a user logging on with
6909 a plaintext password to have their encrypted (hashed) password in
6910 the smbpasswd file to be updated automatically as they log
6911 on. This option allows a site to migrate from plaintext
6912 password authentication (users authenticate with plaintext
6913 password over the wire, and are checked against a UNIX account
6914 database) to encrypted password authentication (the SMB
6915 challenge/response authentication mechanism) without forcing all
6916 users to re-enter their passwords via smbpasswd at the time the
6917 change is made. This is a convenience option to allow the change
6918 over to encrypted passwords to be made over a longer period.
6919 Once all users have encrypted representations of their passwords
6920 in the smbpasswd file this parameter should be set to
6921 <constant>no</constant>.</para>
6923 <para>In order for this parameter to work correctly the <link linkend="ENCRYPTPASSWORDS">
6924 <parameter moreinfo="none">encrypt passwords</parameter></link> parameter must
6925 be set to <constant>no</constant> when this parameter is set to <constant>yes</constant>.</para>
6927 <para>Note that even when this parameter is set a user
6928 authenticating to <command moreinfo="none">smbd</command> must still enter a valid
6929 password in order to connect correctly, and to update their hashed
6930 (smbpasswd) passwords.</para>
6932 <para>Default: <emphasis><parameter>update encrypted</parameter> = no
6936 </listitem></varlistentry>
6938 <indexterm significance="preferred"><primary>use client driver</primary></indexterm><term><anchor id="USECLIENTDRIVER"/>use client driver (S)</term><listitem>
6939 <para>This parameter applies only to Windows NT/2000
6940 clients. It has no effect on Windows 95/98/ME clients. When
6941 serving a printer to Windows NT/2000 clients without first installing
6942 a valid printer driver on the Samba host, the client will be required
6943 to install a local printer driver. From this point on, the client
6944 will treat the print as a local printer and not a network printer
6945 connection. This is much the same behavior that will occur
6946 when <command moreinfo="none">disable spoolss = yes</command>.
6949 <para>The differentiating factor is that under normal
6950 circumstances, the NT/2000 client will attempt to open the network
6951 printer using MS-RPC. The problem is that because the client
6952 considers the printer to be local, it will attempt to issue the
6953 OpenPrinterEx() call requesting access rights associated with the
6954 logged on user. If the user possesses local administator rights but
6955 not root privilegde on the Samba host (often the case), the
6956 OpenPrinterEx() call will fail. The result is that the client will
6957 now display an "Access Denied; Unable to connect" message
6958 in the printer queue window (even though jobs may successfully be
6961 <para>If this parameter is enabled for a printer, then any attempt
6962 to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped
6963 to PRINTER_ACCESS_USE instead. Thus allowing the OpenPrinterEx()
6964 call to succeed. <emphasis>This parameter MUST not be able enabled
6965 on a print share which has valid print driver installed on the Samba
6966 server.</emphasis></para>
6968 <para>Default: <emphasis><parameter>use client driver</parameter> = no
6972 </listitem></varlistentry>
6974 <indexterm significance="preferred"><primary>use kerberos keytab</primary></indexterm><term><anchor id="USEKERBEROSKEYTAB"/>use kerberos keytab (G)</term><listitem>
6976 Specifies whether Samba should attempt to maintain service principals in the systems
6977 keytab file for <constant>host/FQDN</constant> and <constant>cifs/FQDN</constant>.
6980 <para>When you are using the heimdal Kerberos libraries, you must also
6981 specify the following in <filename>/etc/krb5.conf</filename>:</para>
6985 default_keytab_name = FILE:/etc/krb5.keytab
6988 <para>Default: <emphasis><parameter>use kerberos keytab</parameter> = False
6992 </listitem></varlistentry>
6994 <indexterm significance="preferred"><primary>use mmap</primary></indexterm><term><anchor id="USEMMAP"/>use mmap (G)</term><listitem>
6995 <para>This global parameter determines if the tdb internals of Samba can
6996 depend on mmap working correctly on the running system. Samba requires a coherent
6997 mmap/read-write system memory cache. Currently only HPUX does not have such a
6998 coherent cache, and so this parameter is set to <constant>no</constant> by
6999 default on HPUX. On all other systems this parameter should be left alone. This
7000 parameter is provided to help the Samba developers track down problems with
7001 the tdb internal code.
7004 <para>Default: <emphasis><parameter>use mmap</parameter> = yes
7008 </listitem></varlistentry>
7010 <indexterm significance="preferred"><primary>user</primary><see>username</see></indexterm><term><anchor id="USER"/>user</term><listitem><para>This parameter is a synonym for username.</para></listitem></varlistentry><varlistentry>
7011 <indexterm significance="preferred"><primary>users</primary><see>username</see></indexterm><term><anchor id="USERS"/>users</term><listitem><para>This parameter is a synonym for username.</para></listitem></varlistentry><varlistentry>
7012 <indexterm significance="preferred"><primary>username</primary></indexterm><term><anchor id="USERNAME"/>username (S)</term><listitem>
7013 <para>Multiple users may be specified in a comma-delimited
7014 list, in which case the supplied password will be tested against
7015 each username in turn (left to right).</para>
7017 <para>The <parameter moreinfo="none">username</parameter> line is needed only when
7018 the PC is unable to supply its own username. This is the case
7019 for the COREPLUS protocol or where your users have different WfWg
7020 usernames to UNIX usernames. In both these cases you may also be
7021 better using the \\server\share%user syntax instead.</para>
7023 <para>The <parameter moreinfo="none">username</parameter> line is not a great
7024 solution in many cases as it means Samba will try to validate
7025 the supplied password against each of the usernames in the
7026 <parameter moreinfo="none">username</parameter> line in turn. This is slow and
7027 a bad idea for lots of users in case of duplicate passwords.
7028 You may get timeouts or security breaches using this parameter
7031 <para>Samba relies on the underlying UNIX security. This
7032 parameter does not restrict who can login, it just offers hints
7033 to the Samba server as to what usernames might correspond to the
7034 supplied password. Users can login as whoever they please and
7035 they will be able to do no more damage than if they started a
7036 telnet session. The daemon runs as the user that they log in as,
7037 so they cannot do anything that user cannot do.</para>
7039 <para>To restrict a service to a particular set of users you
7040 can use the <link linkend="VALIDUSERS"><parameter moreinfo="none">valid users
7041 </parameter></link> parameter.</para>
7043 <para>If any of the usernames begin with a '@' then the name
7044 will be looked up first in the NIS netgroups list (if Samba
7045 is compiled with netgroup support), followed by a lookup in
7046 the UNIX groups database and will expand to a list of all users
7047 in the group of that name.</para>
7049 <para>If any of the usernames begin with a '+' then the name
7050 will be looked up only in the UNIX groups database and will
7051 expand to a list of all users in the group of that name.</para>
7053 <para>If any of the usernames begin with a '&' then the name
7054 will be looked up only in the NIS netgroups database (if Samba
7055 is compiled with netgroup support) and will expand to a list
7056 of all users in the netgroup group of that name.</para>
7058 <para>Note that searching though a groups database can take
7059 quite some time, and some clients may time out during the
7062 <para>See the section <link linkend="VALIDATIONSECT">NOTE ABOUT
7063 USERNAME/PASSWORD VALIDATION</link> for more information on how
7064 this parameter determines access to the services.</para>
7066 <para>Default: <emphasis><parameter>username</parameter> =
7067 # The guest account if a guest service,
7068 else <empty string>.
7071 <para>Example: <emphasis><parameter>username</parameter> = fred, mary, jack, jane, @users, @pcgroup
7074 </listitem></varlistentry>
7076 <indexterm significance="preferred"><primary>username level</primary></indexterm><term><anchor id="USERNAMELEVEL"/>username level (G)</term><listitem>
7077 <para>This option helps Samba to try and 'guess' at
7078 the real UNIX username, as many DOS clients send an all-uppercase
7079 username. By default Samba tries all lowercase, followed by the
7080 username with the first letter capitalized, and fails if the
7081 username is not found on the UNIX machine.</para>
7083 <para>If this parameter is set to non-zero the behavior changes.
7084 This parameter is a number that specifies the number of uppercase
7085 combinations to try while trying to determine the UNIX user name. The
7086 higher the number the more combinations will be tried, but the slower
7087 the discovery of usernames will be. Use this parameter when you have
7088 strange usernames on your UNIX machine, such as <constant>AstrangeUser
7091 <para>This parameter is needed only on UNIX systems that have case
7092 sensitive usernames.</para>
7094 <para>Default: <emphasis><parameter>username level</parameter> = 0
7097 <para>Example: <emphasis><parameter>username level</parameter> = 5
7100 </listitem></varlistentry>
7102 <indexterm significance="preferred"><primary>username map</primary></indexterm><term><anchor id="USERNAMEMAP"/>username map (G)</term><listitem>
7103 <para>This option allows you to specify a file containing
7104 a mapping of usernames from the clients to the server. This can be
7105 used for several purposes. The most common is to map usernames
7106 that users use on DOS or Windows machines to those that the UNIX
7107 box uses. The other is to map multiple users to a single username
7108 so that they can more easily share files.</para>
7110 <para>The map file is parsed line by line. Each line should
7111 contain a single UNIX username on the left then a '=' followed
7112 by a list of usernames on the right. The list of usernames on the
7113 right may contain names of the form @group in which case they
7114 will match any UNIX username in that group. The special client
7115 name '*' is a wildcard and matches any name. Each line of the
7116 map file may be up to 1023 characters long.</para>
7118 <para>The file is processed on each line by taking the
7119 supplied username and comparing it with each username on the right
7120 hand side of the '=' signs. If the supplied name matches any of
7121 the names on the right hand side then it is replaced with the name
7122 on the left. Processing then continues with the next line.</para>
7124 <para>If any line begins with a '#' or a ';' then it is ignored</para>
7126 <para>If any line begins with an '!' then the processing
7127 will stop after that line if a mapping was done by the line.
7128 Otherwise mapping continues with every line being processed.
7129 Using '!' is most useful when you have a wildcard mapping line
7130 later in the file.</para>
7132 <para>For example to map from the name <constant>admin</constant>
7133 or <constant>administrator</constant> to the UNIX name <constant>
7134 root</constant> you would use:</para>
7136 <para><command moreinfo="none">root = admin administrator</command></para>
7138 <para>Or to map anyone in the UNIX group <constant>system</constant>
7139 to the UNIX name <constant>sys</constant> you would use:</para>
7141 <para><command moreinfo="none">sys = @system</command></para>
7143 <para>You can have as many mappings as you like in a username map file.</para>
7146 <para>If your system supports the NIS NETGROUP option then
7147 the netgroup database is checked before the <filename moreinfo="none">/etc/group
7148 </filename> database for matching groups.</para>
7150 <para>You can map Windows usernames that have spaces in them
7151 by using double quotes around the name. For example:</para>
7153 <para><command moreinfo="none">tridge = "Andrew Tridgell"</command></para>
7155 <para>would map the windows username "Andrew Tridgell" to the
7156 unix username "tridge".</para>
7158 <para>The following example would map mary and fred to the
7159 unix user sys, and map the rest to guest. Note the use of the
7160 '!' to tell Samba to stop processing if it gets a match on
7163 <para><programlisting format="linespecific">
7166 </programlisting></para>
7168 <para>Note that the remapping is applied to all occurrences
7169 of usernames. Thus if you connect to \\server\fred and <constant>
7170 fred</constant> is remapped to <constant>mary</constant> then you
7171 will actually be connecting to \\server\mary and will need to
7172 supply a password suitable for <constant>mary</constant> not
7173 <constant>fred</constant>. The only exception to this is the
7174 username passed to the <link linkend="PASSWORDSERVER"><parameter moreinfo="none">
7175 password server</parameter></link> (if you have one). The password
7176 server will receive whatever username the client supplies without
7177 modification.</para>
7179 <para>Also note that no reverse mapping is done. The main effect
7180 this has is with printing. Users who have been mapped may have
7181 trouble deleting print jobs as PrintManager under WfWg will think
7182 they don't own the print job.</para>
7185 Samba versions prior to 3.0.8 would only support reading the fully qualified
7186 username (e.g.: DOMAIN\user) from the username map when performing a
7187 kerberos login from a client. However, when looking up a map
7188 entry for a user authenticated by NTLM[SSP], only the login name would be
7189 used for matches. This resulted in inconsistent behavior sometimes
7190 even on the same server.
7194 The following functionality is obeyed in version 3.0.8 and later:
7198 When performing local authentication, the username map is
7199 applied to the login name before attempting to authenticate
7204 When relying upon a external domain controller for validating
7205 authentication requests, smbd will apply the username map
7206 to the fully qualified username (i.e. DOMAIN\user) only
7207 after the user has been successfully authenticated.
7210 <para>Default: <emphasis><parameter>username map</parameter> =
7214 <para>Example: <emphasis><parameter>username map</parameter> = /usr/local/samba/lib/users.map
7217 </listitem></varlistentry>
7219 <indexterm significance="preferred"><primary>use sendfile</primary></indexterm><term><anchor id="USESENDFILE"/>use sendfile (S)</term><listitem>
7220 <para>If this parameter is <constant>yes</constant>, and the <constant>sendfile()</constant> system call is supported by the underlying operating system, then some SMB read calls (mainly ReadAndX
7221 and ReadRaw) will use the more efficient sendfile system call for files that
7222 are exclusively oplocked. This may make more efficient use of the system CPU's
7223 and cause Samba to be faster. Samba automatically turns this off for clients
7224 that use protocol levels lower than NT LM 0.12 and when it detects a client is
7225 Windows 9x (using sendfile from Linux will cause these clients to fail).
7228 <para>Default: <emphasis><parameter>use sendfile</parameter> = yes
7232 </listitem></varlistentry>
7234 <indexterm significance="preferred"><primary>use spnego</primary></indexterm><term><anchor id="USESPNEGO"/>use spnego (G)</term><listitem>
7235 <para>This variable controls controls whether samba will try
7236 to use Simple and Protected NEGOciation (as specified by rfc2478) with
7237 WindowsXP and Windows2000 clients to agree upon an authentication mechanism.
7241 Unless further issues are discovered with our SPNEGO
7242 implementation, there is no reason this should ever be
7245 <para>Default: <emphasis><parameter>use spnego</parameter> = yes
7249 </listitem></varlistentry>
7251 <indexterm significance="preferred"><primary>utmp</primary></indexterm><term><anchor id="UTMP"/>utmp (G)</term><listitem>
7252 <para>This boolean parameter is only available if
7253 Samba has been configured and compiled with the option <command moreinfo="none">
7254 --with-utmp</command>. If set to <constant>yes</constant> then Samba will attempt
7255 to add utmp or utmpx records (depending on the UNIX system) whenever a
7256 connection is made to a Samba server. Sites may use this to record the
7257 user connecting to a Samba share.</para>
7259 <para>Due to the requirements of the utmp record, we
7260 are required to create a unique identifier for the
7261 incoming user. Enabling this option creates an n^2
7262 algorithm to find this number. This may impede
7263 performance on large installations. </para>
7265 <para>Default: <emphasis><parameter>utmp</parameter> = no
7269 </listitem></varlistentry>
7271 <indexterm significance="preferred"><primary>utmp directory</primary></indexterm><term><anchor id="UTMPDIRECTORY"/>utmp directory (G)</term><listitem>
7272 <para>This parameter is only available if Samba has
7273 been configured and compiled with the option <command moreinfo="none">
7274 --with-utmp</command>. It specifies a directory pathname that is
7275 used to store the utmp or utmpx files (depending on the UNIX system) that
7276 record user connections to a Samba server. By default this is
7277 not set, meaning the system will use whatever utmp file the
7278 native system is set to use (usually
7279 <filename moreinfo="none">/var/run/utmp</filename> on Linux).</para>
7281 <para>Default: <emphasis><parameter>utmp directory</parameter> =
7282 # Determined automatically
7285 <para>Example: <emphasis><parameter>utmp directory</parameter> = /var/run/utmp
7288 </listitem></varlistentry>
7290 <indexterm significance="preferred"><primary>-valid</primary></indexterm><term><anchor id="-VALID"/>-valid (S)</term><listitem>
7291 <para> This parameter indicates whether a share is
7292 valid and thus can be used. When this parameter is set to false,
7293 the share will be in no way visible nor accessible.
7297 This option should not be
7298 used by regular users but might be of help to developers.
7299 Samba uses this option internally to mark shares as deleted.
7302 <para>Default: <emphasis><parameter>-valid</parameter> = yes
7306 </listitem></varlistentry>
7308 <indexterm significance="preferred"><primary>valid users</primary></indexterm><term><anchor id="VALIDUSERS"/>valid users (S)</term><listitem>
7309 <para>This is a list of users that should be allowed
7310 to login to this service. Names starting with '@', '+' and '&'
7311 are interpreted using the same rules as described in the
7312 <parameter moreinfo="none">invalid users</parameter> parameter.</para>
7314 <para>If this is empty (the default) then any user can login.
7315 If a username is in both this list and the <parameter moreinfo="none">invalid
7316 users</parameter> list then access is denied for that user.</para>
7318 <para>The current servicename is substituted for <parameter moreinfo="none">%S
7319 </parameter>. This is useful in the [homes] section.</para>
7321 <para>Default: <emphasis><parameter>valid users</parameter> =
7322 # No valid users list (anyone can login)
7325 <para>Example: <emphasis><parameter>valid users</parameter> = greg, @pcusers
7328 </listitem></varlistentry>
7330 <indexterm significance="preferred"><primary>veto files</primary></indexterm><term><anchor id="VETOFILES"/>veto files (S)</term><listitem>
7331 <para>This is a list of files and directories that
7332 are neither visible nor accessible. Each entry in the list must
7333 be separated by a '/', which allows spaces to be included
7334 in the entry. '*' and '?' can be used to specify multiple files
7335 or directories as in DOS wildcards.</para>
7337 <para>Each entry must be a unix path, not a DOS path and
7338 must <emphasis>not</emphasis> include the unix directory
7339 separator '/'.</para>
7341 <para>Note that the <parameter moreinfo="none">case sensitive</parameter> option
7342 is applicable in vetoing files.</para>
7344 <para>One feature of the veto files parameter that it
7345 is important to be aware of is Samba's behaviour when
7346 trying to delete a directory. If a directory that is
7347 to be deleted contains nothing but veto files this
7348 deletion will <emphasis>fail</emphasis> unless you also set
7349 the <parameter moreinfo="none">delete veto files</parameter> parameter to
7350 <parameter moreinfo="none">yes</parameter>.</para>
7352 <para>Setting this parameter will affect the performance
7353 of Samba, as it will be forced to check all files and directories
7354 for a match as they are scanned.</para>
7356 <para>Default: <emphasis><parameter>veto files</parameter> =
7357 # No files or directories are vetoed.
7360 <para>Example: <emphasis><parameter>veto files</parameter> =
7361 ; Veto any files containing the word Security,
7362 ; any ending in .tmp, and any directory containing the
7364 veto files = /*Security*/*.tmp/*root*/
7366 ; Veto the Apple specific files that a NetAtalk server
7368 veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
7372 </listitem></varlistentry>
7374 <indexterm significance="preferred"><primary>veto oplock files</primary></indexterm><term><anchor id="VETOOPLOCKFILES"/>veto oplock files (S)</term><listitem>
7375 <para>This parameter is only valid when the <link linkend="OPLOCKS">
7376 <parameter moreinfo="none">oplocks</parameter></link>
7377 parameter is turned on for a share. It allows the Samba administrator
7378 to selectively turn off the granting of oplocks on selected files that
7379 match a wildcarded list, similar to the wildcarded list used in the
7380 <link linkend="VETOFILES"><parameter moreinfo="none">veto files</parameter></link>
7384 <para>You might want to do this on files that you know will
7385 be heavily contended for by clients. A good example of this
7386 is in the NetBench SMB benchmark program, which causes heavy
7387 client contention for files ending in <filename moreinfo="none">.SEM</filename>.
7388 To cause Samba not to grant oplocks on these files you would use
7389 the line (either in the [global] section or in the section for
7390 the particular NetBench share :</para>
7392 <para>Default: <emphasis><parameter>veto oplock files</parameter> =
7393 # No files are vetoed for oplock grants
7396 <para>Example: <emphasis><parameter>veto oplock files</parameter> = /.*SEM/
7399 </listitem></varlistentry>
7401 <indexterm significance="preferred"><primary>vfs object</primary><see>vfs objects</see></indexterm><term><anchor id="VFSOBJECT"/>vfs object</term><listitem><para>This parameter is a synonym for vfs objects.</para></listitem></varlistentry><varlistentry>
7402 <indexterm significance="preferred"><primary>vfs objects</primary></indexterm><term><anchor id="VFSOBJECTS"/>vfs objects (S)</term><listitem>
7403 <para>This parameter specifies the backend names which
7404 are used for Samba VFS I/O operations. By default, normal
7405 disk I/O operations are used but these can be overloaded
7406 with one or more VFS objects. </para>
7408 <para>Default: <emphasis><parameter>vfs objects</parameter> =
7411 <para>Example: <emphasis><parameter>vfs objects</parameter> = extd_audit recycle
7414 </listitem></varlistentry>
7416 <indexterm significance="preferred"><primary>volume</primary></indexterm><term><anchor id="VOLUME"/>volume (S)</term><listitem>
7417 <para>This allows you to override the volume label
7418 returned for a share. Useful for CDROMs with installation programs
7419 that insist on a particular volume label.</para>
7421 <para>Default: <emphasis><parameter>volume</parameter> =
7422 # the name of the share
7426 </listitem></varlistentry>
7428 <indexterm significance="preferred"><primary>wide links</primary></indexterm><term><anchor id="WIDELINKS"/>wide links (S)</term><listitem>
7429 <para>This parameter controls whether or not links
7430 in the UNIX file system may be followed by the server. Links
7431 that point to areas within the directory tree exported by the
7432 server are always allowed; this parameter controls access only
7433 to areas that are outside the directory tree being exported.</para>
7435 <para>Note that setting this parameter can have a negative
7436 effect on your server performance due to the extra system calls
7437 that Samba has to do in order to perform the link checks.</para>
7439 <para>Default: <emphasis><parameter>wide links</parameter> = yes
7443 </listitem></varlistentry>
7445 <indexterm significance="preferred"><primary>winbind cache time</primary></indexterm><term><anchor id="WINBINDCACHETIME"/>winbind cache time (G)</term><listitem>
7446 <para>This parameter specifies the number of
7447 seconds the <citerefentry><refentrytitle>winbindd</refentrytitle>
7448 <manvolnum>8</manvolnum></citerefentry> daemon will cache
7449 user and group information before querying a Windows NT server
7451 <note><para>This does not apply to authentication requests,
7452 these are always evaluated in real time.</para></note>
7454 <para>Default: <emphasis><parameter>winbind cache time</parameter> = 300
7458 </listitem></varlistentry>
7460 <indexterm significance="preferred"><primary>winbind enable local accounts</primary></indexterm><term><anchor id="WINBINDENABLELOCALACCOUNTS"/>winbind enable local accounts (G)</term><listitem>
7461 <para>This parameter controls whether or not winbindd
7462 will act as a stand in replacement for the various account
7463 management hooks in smb.conf (e.g. 'add user script').
7464 If enabled, winbindd will support the creation of local
7465 users and groups as another source of UNIX account information
7466 available via getpwnam() or getgrgid(), etc...
7469 <para>Default: <emphasis><parameter>winbind enable local accounts</parameter> = no
7473 </listitem></varlistentry>
7475 <indexterm significance="preferred"><primary>winbind enum groups</primary></indexterm><term><anchor id="WINBINDENUMGROUPS"/>winbind enum groups (G)</term><listitem>
7476 <para>On large installations using <citerefentry><refentrytitle>winbindd</refentrytitle>
7477 <manvolnum>8</manvolnum></citerefentry> it may be necessary to suppress
7478 the enumeration of groups through the <command moreinfo="none">setgrent()</command>,
7479 <command moreinfo="none">getgrent()</command> and
7480 <command moreinfo="none">endgrent()</command> group of system calls. If
7481 the <parameter moreinfo="none">winbind enum groups</parameter> parameter is
7482 <constant>no</constant>, calls to the <command moreinfo="none">getgrent()</command> system
7483 call will not return any data. </para>
7485 <warning><para>Turning off group enumeration may cause some programs to behave oddly. </para></warning>
7487 <para>Default: <emphasis><parameter>winbind enum groups</parameter> = yes
7491 </listitem></varlistentry>
7493 <indexterm significance="preferred"><primary>winbind enum users</primary></indexterm><term><anchor id="WINBINDENUMUSERS"/>winbind enum users (G)</term><listitem>
7494 <para>On large installations using <citerefentry><refentrytitle>winbindd</refentrytitle>
7495 <manvolnum>8</manvolnum></citerefentry> it may be
7496 necessary to suppress the enumeration of users through the <command moreinfo="none">setpwent()</command>,
7497 <command moreinfo="none">getpwent()</command> and
7498 <command moreinfo="none">endpwent()</command> group of system calls. If
7499 the <parameter moreinfo="none">winbind enum users</parameter> parameter is
7500 <constant>no</constant>, calls to the <command moreinfo="none">getpwent</command> system call
7501 will not return any data. </para>
7503 <warning><para>Turning off user
7504 enumeration may cause some programs to behave oddly. For
7505 example, the finger program relies on having access to the
7506 full user list when searching for matching
7507 usernames. </para></warning>
7509 <para>Default: <emphasis><parameter>winbind enum users</parameter> = yes
7513 </listitem></varlistentry>
7515 <indexterm significance="preferred"><primary>winbind nested groups</primary></indexterm><term><anchor id="WINBINDNESTEDGROUPS"/>winbind nested groups (G)</term><listitem>
7516 <para>If set to yes, this parameter activates the support for nested
7517 groups. Nested groups are also called local groups or
7518 aliases. They work like their counterparts in Windows: Nested
7519 groups are defined locally on any machine (they are shared
7520 between DC's through their SAM) and can contain users and
7521 global groups from any trusted SAM. To be able to use nested
7522 groups, you need to run nss_winbind.</para>
7523 <para>Please note that per 3.0.3 this is a new feature, so
7524 handle with care.</para>
7526 <para>Default: <emphasis><parameter>winbind nested groups</parameter> = no
7530 </listitem></varlistentry>
7532 <indexterm significance="preferred"><primary>winbind separator</primary></indexterm><term><anchor id="WINBINDSEPARATOR"/>winbind separator (G)</term><listitem>
7533 <para>This parameter allows an admin to define the character
7534 used when listing a username of the form of <replaceable>DOMAIN
7535 </replaceable>\<replaceable>user</replaceable>. This parameter
7536 is only applicable when using the <filename moreinfo="none">pam_winbind.so</filename>
7537 and <filename moreinfo="none">nss_winbind.so</filename> modules for UNIX services.
7540 <para>Please note that setting this parameter to + causes problems
7541 with group membership at least on glibc systems, as the character +
7542 is used as a special character for NIS in /etc/group.</para>
7544 <para>Default: <emphasis><parameter>winbind separator</parameter> = '\'
7547 <para>Example: <emphasis><parameter>winbind separator</parameter> = +
7550 </listitem></varlistentry>
7552 <indexterm significance="preferred"><primary>winbind trusted domains only</primary></indexterm><term><anchor id="WINBINDTRUSTEDDOMAINSONLY"/>winbind trusted domains only (G)</term><listitem>
7553 <para>This parameter is designed to allow Samba servers that
7554 are members of a Samba controlled domain to use UNIX accounts
7555 distributed via NIS, rsync, or LDAP as the uid's for winbindd users
7556 in the hosts primary domain. Therefore, the user DOMAIN\user1 would
7557 be mapped to the account user1 in /etc/passwd instead of allocating
7558 a new uid for him or her.
7561 <para>Default: <emphasis><parameter>winbind trusted domains only</parameter> = no
7565 </listitem></varlistentry>
7567 <indexterm significance="preferred"><primary>winbind use default domain</primary></indexterm><term><anchor id="WINBINDUSEDEFAULTDOMAIN"/>winbind use default domain (G)</term><listitem>
7568 <para>This parameter specifies whether the
7569 <citerefentry><refentrytitle>winbindd</refentrytitle>
7570 <manvolnum>8</manvolnum></citerefentry> daemon should operate on users
7571 without domain component in their username. Users without a domain
7572 component are treated as is part of the winbindd server's own
7573 domain. While this does not benifit Windows users, it makes SSH, FTP and
7574 e-mail function in a way much closer to the way they
7575 would in a native unix system.</para>
7577 <para>Default: <emphasis><parameter>winbind use default domain</parameter> = no
7580 <para>Example: <emphasis><parameter>winbind use default domain</parameter> = yes
7583 </listitem></varlistentry>
7585 <indexterm significance="preferred"><primary>wins hook</primary></indexterm><term><anchor id="WINSHOOK"/>wins hook (G)</term><listitem>
7586 <para>When Samba is running as a WINS server this
7587 allows you to call an external program for all changes to the
7588 WINS database. The primary use for this option is to allow the
7589 dynamic update of external name resolution databases such as
7592 <para>The wins hook parameter specifies the name of a script
7593 or executable that will be called as follows:</para>
7595 <para><command moreinfo="none">wins_hook operation name nametype ttl IP_list</command></para>
7599 <para>The first argument is the operation and is
7600 one of "add", "delete", or
7601 "refresh". In most cases the operation
7602 can be ignored as the rest of the parameters
7603 provide sufficient information. Note that
7604 "refresh" may sometimes be called when
7605 the name has not previously been added, in that
7606 case it should be treated as an add.</para>
7610 <para>The second argument is the NetBIOS name. If the
7611 name is not a legal name then the wins hook is not called.
7612 Legal names contain only letters, digits, hyphens, underscores
7617 <para>The third argument is the NetBIOS name
7618 type as a 2 digit hexadecimal number. </para>
7622 <para>The fourth argument is the TTL (time to live)
7623 for the name in seconds.</para>
7627 <para>The fifth and subsequent arguments are the IP
7628 addresses currently registered for that name. If this list is
7629 empty then the name should be deleted.</para>
7633 <para>An example script that calls the BIND dynamic DNS update
7634 program <command moreinfo="none">nsupdate</command> is provided in the examples
7635 directory of the Samba source code. </para>
7637 <para><emphasis>No default</emphasis></para>
7639 </listitem></varlistentry>
7641 <indexterm significance="preferred"><primary>wins proxy</primary></indexterm><term><anchor id="WINSPROXY"/>wins proxy (G)</term><listitem>
7642 <para>This is a boolean that controls if <citerefentry><refentrytitle>nmbd</refentrytitle>
7643 <manvolnum>8</manvolnum></citerefentry> will respond to broadcast name
7644 queries on behalf of other hosts. You may need to set this
7645 to <constant>yes</constant> for some older clients.</para>
7647 <para>Default: <emphasis><parameter>wins proxy</parameter> = no
7651 </listitem></varlistentry>
7653 <indexterm significance="preferred"><primary>wins server</primary></indexterm><term><anchor id="WINSSERVER"/>wins server (G)</term><listitem>
7654 <para>This specifies the IP address (or DNS name: IP
7655 address for preference) of the WINS server that <citerefentry><refentrytitle>nmbd</refentrytitle>
7656 <manvolnum>8</manvolnum></citerefentry> should register with. If you have a WINS server on
7657 your network then you should set this to the WINS server's IP.</para>
7659 <para>You should point this at your WINS server if you have a
7660 multi-subnetted network.</para>
7662 <para>If you want to work in multiple namespaces, you can
7663 give every wins server a 'tag'. For each tag, only one
7664 (working) server will be queried for a name. The tag should be
7665 separated from the ip address by a colon.
7668 <note><para>You need to set up Samba to point
7669 to a WINS server if you have multiple subnets and wish cross-subnet
7670 browsing to work correctly.</para></note>
7671 <para>See the <link linkend="NetworkBrowsing"/>.</para>
7673 <para>Default: <emphasis><parameter>wins server</parameter> =
7676 <para>Example: <emphasis><parameter>wins server</parameter> = mary:192.9.200.1 fred:192.168.3.199 mary:192.168.2.61
7678 # For this example when querying a certain name, 192.19.200.1 will
7679 be asked first and if that doesn't respond 192.168.2.61. If either
7680 of those doesn't know the name 192.168.3.199 will be queried.
7682 </para><para>Example: <emphasis><parameter>wins server</parameter> = 192.9.200.1 192.168.2.61
7685 </listitem></varlistentry>
7687 <indexterm significance="preferred"><primary>wins support</primary></indexterm><term><anchor id="WINSSUPPORT"/>wins support (G)</term><listitem>
7688 <para>This boolean controls if the <citerefentry><refentrytitle>nmbd</refentrytitle>
7689 <manvolnum>8</manvolnum></citerefentry> process in Samba will act as a WINS server. You should
7690 not set this to <constant>yes</constant> unless you have a multi-subnetted network and
7691 you wish a particular <command moreinfo="none">nmbd</command> to be your WINS server.
7692 Note that you should <emphasis>NEVER</emphasis> set this to <constant>yes</constant>
7693 on more than one machine in your network.</para>
7696 <para>Default: <emphasis><parameter>wins support</parameter> = no
7700 </listitem></varlistentry>
7702 <indexterm significance="preferred"><primary>workgroup</primary></indexterm><term><anchor id="WORKGROUP"/>workgroup (G)</term><listitem>
7703 <para>This controls what workgroup your server will
7704 appear to be in when queried by clients. Note that this parameter
7705 also controls the Domain name used with
7706 the <link linkend="SECURITYEQUALSDOMAIN"><command moreinfo="none">security = domain</command></link>
7709 <para>Default: <emphasis><parameter>workgroup</parameter> = WORKGROUP
7712 <para>Example: <emphasis><parameter>workgroup</parameter> = MYGROUP
7715 </listitem></varlistentry>
7717 <indexterm significance="preferred"><primary>writable</primary><see>writeable</see></indexterm><term><anchor id="WRITABLE"/>writable</term><listitem><para>This parameter is a synonym for writeable.</para></listitem></varlistentry><varlistentry>
7718 <indexterm significance="preferred"><primary>writeable</primary></indexterm><term><anchor id="WRITEABLE"/>writeable (S)</term><listitem>
7719 <para>Inverted synonym for <link linkend="READONLY">
7720 <parameter moreinfo="none">read only</parameter></link>.</para>
7722 <para><emphasis>No default</emphasis></para>
7724 </listitem></varlistentry>
7726 <indexterm significance="preferred"><primary>write cache size</primary></indexterm><term><anchor id="WRITECACHESIZE"/>write cache size (S)</term><listitem>
7727 <para>If this integer parameter is set to non-zero value,
7728 Samba will create an in-memory cache for each oplocked file
7729 (it does <emphasis>not</emphasis> do this for
7730 non-oplocked files). All writes that the client does not request
7731 to be flushed directly to disk will be stored in this cache if possible.
7732 The cache is flushed onto disk when a write comes in whose offset
7733 would not fit into the cache or when the file is closed by the client.
7734 Reads for the file are also served from this cache if the data is stored
7737 <para>This cache allows Samba to batch client writes into a more
7738 efficient write size for RAID disks (i.e. writes may be tuned to
7739 be the RAID stripe size) and can improve performance on systems
7740 where the disk subsystem is a bottleneck but there is free
7741 memory for userspace programs.</para>
7743 <para>The integer parameter specifies the size of this cache
7744 (per oplocked file) in bytes.</para>
7746 <para>Default: <emphasis><parameter>write cache size</parameter> = 0
7749 <para>Example: <emphasis><parameter>write cache size</parameter> = 262144
7750 # for a 256k cache size per file
7753 </listitem></varlistentry>
7755 <indexterm significance="preferred"><primary>write list</primary></indexterm><term><anchor id="WRITELIST"/>write list (S)</term><listitem>
7756 <para>This is a list of users that are given read-write
7757 access to a service. If the connecting user is in this list then
7758 they will be given write access, no matter what the <link linkend="READONLY">
7759 <parameter moreinfo="none">read only</parameter></link>
7760 option is set to. The list can include group names using the
7761 @group syntax.</para>
7763 <para>Note that if a user is in both the read list and the
7764 write list then they will be given write access.</para>
7766 <para>This parameter will not work with the <link linkend="SECURITY">
7767 <parameter moreinfo="none">security = share</parameter></link> in
7768 Samba 3.0. This is by design.</para>
7771 <para>Default: <emphasis><parameter>write list</parameter> =
7774 <para>Example: <emphasis><parameter>write list</parameter> = admin, root, @staff
7777 </listitem></varlistentry>
7779 <indexterm significance="preferred"><primary>write raw</primary></indexterm><term><anchor id="WRITERAW"/>write raw (G)</term><listitem>
7780 <para>This parameter controls whether or not the server
7781 will support raw write SMB's when transferring data from clients.
7782 You should never need to change this parameter.</para>
7784 <para>Default: <emphasis><parameter>write raw</parameter> = yes
7788 </listitem></varlistentry>
7790 <indexterm significance="preferred"><primary>wtmp directory</primary></indexterm><term><anchor id="WTMPDIRECTORY"/>wtmp directory (G)</term><listitem>
7791 <para>This parameter is only available if Samba has
7792 been configured and compiled with the option <command moreinfo="none">
7793 --with-utmp</command>. It specifies a directory pathname that is
7794 used to store the wtmp or wtmpx files (depending on the UNIX system) that
7795 record user connections to a Samba server. The difference with
7796 the utmp directory is the fact that user info is kept after a user
7797 has logged out.</para>
7801 not set, meaning the system will use whatever utmp file the
7802 native system is set to use (usually
7803 <filename moreinfo="none">/var/run/wtmp</filename> on Linux).</para>
7805 <para>Default: <emphasis><parameter>wtmp directory</parameter> =
7808 <para>Example: <emphasis><parameter>wtmp directory</parameter> = /var/log/wtmp
7811 </listitem></varlistentry>