apply fixes from Herb to do with synonyms in smb.conf(5)
[Samba.git] / docs / docbook / manpages / smb.conf.5.sgml
blobe29985a56c1a9c90ed982db67c63384dc64a73d1
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="smb.conf">
4 <refmeta>
5 <refentrytitle>smb.conf</refentrytitle>
6 <manvolnum>5</manvolnum>
7 </refmeta>
10 <refnamediv>
11 <refname>smb.conf</refname>
12 <refpurpose>The configuration file for the Samba suite</refpurpose>
13 </refnamediv>
15 <refsect1>
16 <title>SYNOPSIS</title>
18 <para>The <filename>smb.conf</filename> file is a configuration
19 file for the Samba suite. <filename>smb.conf</filename> contains
20 runtime configuration information for the Samba programs. The
21 <filename>smb.conf</filename> file is designed to be configured and
22 administered by the <ulink url="swat.8.html"><command>swat(8)</command>
23 </ulink> program. The complete description of the file format and
24 possible parameters held within are here for reference purposes.</para>
25 </refsect1>
27 <refsect1>
28 <title id="FILEFORMATSECT">FILE FORMAT</title>
30 <para>The file consists of sections and parameters. A section
31 begins with the name of the section in square brackets and continues
32 until the next section begins. Sections contain parameters of the
33 form</para>
35 <para><replaceable>name</replaceable> = <replaceable>value
36 </replaceable></para>
38 <para>The file is line-based - that is, each newline-terminated
39 line represents either a comment, a section name or a parameter.</para>
41 <para>Section and parameter names are not case sensitive.</para>
43 <para>Only the first equals sign in a parameter is significant.
44 Whitespace before or after the first equals sign is discarded.
45 Leading, trailing and internal whitespace in section and parameter
46 names is irrelevant. Leading and trailing whitespace in a parameter
47 value is discarded. Internal whitespace within a parameter value
48 is retained verbatim.</para>
50 <para>Any line beginning with a semicolon (';') or a hash ('#')
51 character is ignored, as are lines containing only whitespace.</para>
53 <para>Any line ending in a '\' is continued
54 on the next line in the customary UNIX fashion.</para>
56 <para>The values following the equals sign in parameters are all
57 either a string (no quotes needed) or a boolean, which may be given
58 as yes/no, 0/1 or true/false. Case is not significant in boolean
59 values, but is preserved in string values. Some items such as
60 create modes are numeric.</para>
61 </refsect1>
63 <refsect1>
64 <title>SECTION DESCRIPTIONS</title>
66 <para>Each section in the configuration file (except for the
67 [global] section) describes a shared resource (known
68 as a "share"). The section name is the name of the
69 shared resource and the parameters within the section define
70 the shares attributes.</para>
72 <para>There are three special sections, [global],
73 [homes] and [printers], which are
74 described under <emphasis>special sections</emphasis>. The
75 following notes apply to ordinary section descriptions.</para>
77 <para>A share consists of a directory to which access is being
78 given plus a description of the access rights which are granted
79 to the user of the service. Some housekeeping options are
80 also specifiable.</para>
82 <para>Sections are either file share services (used by the
83 client as an extension of their native file systems) or
84 printable services (used by the client to access print services
85 on the host running the server).</para>
87 <para>Sections may be designated <emphasis>guest</emphasis> services,
88 in which case no password is required to access them. A specified
89 UNIX <emphasis>guest account</emphasis> is used to define access
90 privileges in this case.</para>
92 <para>Sections other than guest services will require a password
93 to access them. The client provides the username. As older clients
94 only provide passwords and not usernames, you may specify a list
95 of usernames to check against the password using the "user ="
96 option in the share definition. For modern clients such as
97 Windows 95/98/ME/NT/2000, this should not be necessary.</para>
99 <para>Note that the access rights granted by the server are
100 masked by the access rights granted to the specified or guest
101 UNIX user by the host system. The server does not grant more
102 access than the host system grants.</para>
104 <para>The following sample section defines a file space share.
105 The user has write access to the path <filename>/home/bar</filename>.
106 The share is accessed via the share name "foo":</para>
108 <screen>
109 <computeroutput>
110 [foo]
111 path = /home/bar
112 read only = no
113 </computeroutput>
114 </screen>
116 <para>The following sample section defines a printable share.
117 The share is readonly, but printable. That is, the only write
118 access permitted is via calls to open, write to and close a
119 spool file. The <emphasis>guest ok</emphasis> parameter means
120 access will be permitted as the default guest user (specified
121 elsewhere):</para>
123 <screen>
124 <computeroutput>
125 [aprinter]
126 path = /usr/spool/public
127 read only = yes
128 printable = yes
129 guest ok = yes
130 </computeroutput>
131 </screen>
132 </refsect1>
134 <refsect1>
135 <title>SPECIAL SECTIONS</title>
137 <refsect2>
138 <title>The [global] section</title>
140 <para>parameters in this section apply to the server
141 as a whole, or are defaults for sections which do not
142 specifically define certain items. See the notes
143 under PARAMETERS for more information.</para>
144 </refsect2>
146 <refsect2>
147 <title id="HOMESECT">The [homes] section</title>
149 <para>If a section called homes is included in the
150 configuration file, services connecting clients to their
151 home directories can be created on the fly by the server.</para>
153 <para>When the connection request is made, the existing
154 sections are scanned. If a match is found, it is used. If no
155 match is found, the requested section name is treated as a
156 user name and looked up in the local password file. If the
157 name exists and the correct password has been given, a share is
158 created by cloning the [homes] section.</para>
160 <para>Some modifications are then made to the newly
161 created share:</para>
163 <itemizedlist>
164 <listitem><para>The share name is changed from homes to
165 the located username.</para></listitem>
167 <listitem><para>If no path was given, the path is set to
168 the user's home directory.</para></listitem>
169 </itemizedlist>
171 <para>If you decide to use a <emphasis>path =</emphasis> line
172 in your [homes] section then you may find it useful
173 to use the %S macro. For example :</para>
175 <para><userinput>path = /data/pchome/%S</userinput></para>
177 <para>would be useful if you have different home directories
178 for your PCs than for UNIX access.</para>
180 <para>This is a fast and simple way to give a large number
181 of clients access to their home directories with a minimum
182 of fuss.</para>
184 <para>A similar process occurs if the requested section
185 name is "homes", except that the share name is not
186 changed to that of the requesting user. This method of using
187 the [homes] section works well if different users share
188 a client PC.</para>
190 <para>The [homes] section can specify all the parameters
191 a normal service section can specify, though some make more sense
192 than others. The following is a typical and suitable [homes]
193 section:</para>
195 <screen>
196 <computeroutput>
197 [homes]
198 read only = no
199 </computeroutput>
200 </screen>
202 <para>An important point is that if guest access is specified
203 in the [homes] section, all home directories will be
204 visible to all clients <emphasis>without a password</emphasis>.
205 In the very unlikely event that this is actually desirable, it
206 would be wise to also specify <emphasis>read only
207 access</emphasis>.</para>
209 <para>Note that the <emphasis>browseable</emphasis> flag for
210 auto home directories will be inherited from the global browseable
211 flag, not the [homes] browseable flag. This is useful as
212 it means setting <emphasis>browseable = no</emphasis> in
213 the [homes] section will hide the [homes] share but make
214 any auto home directories visible.</para>
215 </refsect2>
217 <refsect2>
218 <title id="PRINTERSSECT">The [printers] section</title>
220 <para>This section works like [homes],
221 but for printers.</para>
223 <para>If a [printers] section occurs in the
224 configuration file, users are able to connect to any printer
225 specified in the local host's printcap file.</para>
227 <para>When a connection request is made, the existing sections
228 are scanned. If a match is found, it is used. If no match is found,
229 but a [homes] section exists, it is used as described
230 above. Otherwise, the requested section name is treated as a
231 printer name and the appropriate printcap file is scanned to see
232 if the requested section name is a valid printer share name. If
233 a match is found, a new printer share is created by cloning
234 the [printers] section.</para>
236 <para>A few modifications are then made to the newly created
237 share:</para>
239 <itemizedlist>
240 <listitem><para>The share name is set to the located printer
241 name</para></listitem>
243 <listitem><para>If no printer name was given, the printer name
244 is set to the located printer name</para></listitem>
246 <listitem><para>If the share does not permit guest access and
247 no username was given, the username is set to the located
248 printer name.</para></listitem>
249 </itemizedlist>
251 <para>Note that the [printers] service MUST be
252 printable - if you specify otherwise, the server will refuse
253 to load the configuration file.</para>
255 <para>Typically the path specified would be that of a
256 world-writeable spool directory with the sticky bit set on
257 it. A typical [printers] entry would look like
258 this:</para>
260 <screen><computeroutput>
261 [printers]
262 path = /usr/spool/public
263 guest ok = yes
264 printable = yes
265 </computeroutput></screen>
267 <para>All aliases given for a printer in the printcap file
268 are legitimate printer names as far as the server is concerned.
269 If your printing subsystem doesn't work like that, you will have
270 to set up a pseudo-printcap. This is a file consisting of one or
271 more lines like this:</para>
273 <screen>
274 <computeroutput>
275 alias|alias|alias|alias...
276 </computeroutput>
277 </screen>
279 <para>Each alias should be an acceptable printer name for
280 your printing subsystem. In the [global] section, specify
281 the new file as your printcap. The server will then only recognize
282 names found in your pseudo-printcap, which of course can contain
283 whatever aliases you like. The same technique could be used
284 simply to limit access to a subset of your local printers.</para>
286 <para>An alias, by the way, is defined as any component of the
287 first entry of a printcap record. Records are separated by newlines,
288 components (if there are more than one) are separated by vertical
289 bar symbols ('|').</para>
291 <para>NOTE: On SYSV systems which use lpstat to determine what
292 printers are defined on the system you may be able to use
293 "printcap name = lpstat" to automatically obtain a list
294 of printers. See the "printcap name" option
295 for more details.</para>
296 </refsect2>
297 </refsect1>
299 <refsect1>
300 <title>PARAMETERS</title>
302 <para>parameters define the specific attributes of sections.</para>
304 <para>Some parameters are specific to the [global] section
305 (e.g., <emphasis>security</emphasis>). Some parameters are usable
306 in all sections (e.g., <emphasis>create mode</emphasis>). All others
307 are permissible only in normal sections. For the purposes of the
308 following descriptions the [homes] and [printers]
309 sections will be considered normal. The letter <emphasis>G</emphasis>
310 in parentheses indicates that a parameter is specific to the
311 [global] section. The letter <emphasis>S</emphasis>
312 indicates that a parameter can be specified in a service specific
313 section. Note that all <emphasis>S</emphasis> parameters can also be specified in
314 the [global] section - in which case they will define
315 the default behavior for all services.</para>
317 <para>parameters are arranged here in alphabetical order - this may
318 not create best bedfellows, but at least you can find them! Where
319 there are synonyms, the preferred synonym is described, others refer
320 to the preferred synonym.</para>
321 </refsect1>
323 <refsect1>
324 <title>VARIABLE SUBSTITUTIONS</title>
326 <para>Many of the strings that are settable in the config file
327 can take substitutions. For example the option "path =
328 /tmp/%u" would be interpreted as "path =
329 /tmp/john" if the user connected with the username john.</para>
331 <para>These substitutions are mostly noted in the descriptions below,
332 but there are some general substitutions which apply whenever they
333 might be relevant. These are:</para>
335 <variablelist>
336 <varlistentry>
337 <term>%S</term>
338 <listitem><para>the name of the current service, if any.</para>
339 </listitem>
340 </varlistentry>
342 <varlistentry>
343 <term>%P</term>
344 <listitem><para>the root directory of the current service,
345 if any.</para></listitem>
346 </varlistentry>
348 <varlistentry>
349 <term>%u</term>
350 <listitem><para>user name of the current service, if any.</para>
351 </listitem>
352 </varlistentry>
354 <varlistentry>
355 <term>%g</term>
356 <listitem><para>primary group name of %u.</para></listitem>
357 </varlistentry>
359 <varlistentry>
360 <term>%U</term>
361 <listitem><para>session user name (the user name that the client
362 wanted, not necessarily the same as the one they got).</para></listitem>
363 </varlistentry>
365 <varlistentry>
366 <term>%G</term>
367 <listitem><para>primary group name of %U.</para></listitem>
368 </varlistentry>
370 <varlistentry>
371 <term>%H</term>
372 <listitem><para>the home directory of the user given
373 by %u.</para></listitem>
374 </varlistentry>
376 <varlistentry>
377 <term>%v</term>
378 <listitem><para>the Samba version.</para></listitem>
379 </varlistentry>
381 <varlistentry>
382 <term>%h</term>
383 <listitem><para>the Internet hostname that Samba is running
384 on.</para></listitem>
385 </varlistentry>
387 <varlistentry>
388 <term>%m</term>
389 <listitem><para>the NetBIOS name of the client machine
390 (very useful).</para></listitem>
391 </varlistentry>
393 <varlistentry>
394 <term>%L</term>
395 <listitem><para>the NetBIOS name of the server. This allows you
396 to change your config based on what the client calls you. Your
397 server can have a "dual personality".</para>
399 <para>Note that this paramater is not available when Samba listens
400 on port 445, as clients no longer send this information </para>
401 </listitem>
403 </varlistentry>
405 <varlistentry>
406 <term>%M</term>
407 <listitem><para>the Internet name of the client machine.
408 </para></listitem>
409 </varlistentry>
411 <varlistentry>
412 <term>%N</term>
413 <listitem><para>the name of your NIS home directory server.
414 This is obtained from your NIS auto.map entry. If you have
415 not compiled Samba with the <emphasis>--with-automount</emphasis>
416 option then this value will be the same as %L.</para>
417 </listitem>
418 </varlistentry>
420 <varlistentry>
421 <term>%p</term>
422 <listitem><para>the path of the service's home directory,
423 obtained from your NIS auto.map entry. The NIS auto.map entry
424 is split up as "%N:%p".</para></listitem>
425 </varlistentry>
427 <varlistentry>
428 <term>%R</term>
429 <listitem><para>the selected protocol level after
430 protocol negotiation. It can be one of CORE, COREPLUS,
431 LANMAN1, LANMAN2 or NT1.</para></listitem>
432 </varlistentry>
434 <varlistentry>
435 <term>%d</term>
436 <listitem><para>The process id of the current server
437 process.</para></listitem>
438 </varlistentry>
440 <varlistentry>
441 <term>%a</term>
442 <listitem><para>the architecture of the remote
443 machine. Only some are recognized, and those may not be
444 100% reliable. It currently recognizes Samba, WfWg, Win95,
445 WinNT and Win2k. Anything else will be known as
446 "UNKNOWN". If it gets it wrong then sending a level
447 3 log to <ulink url="mailto:samba@samba.org">samba@samba.org
448 </ulink> should allow it to be fixed.</para></listitem>
449 </varlistentry>
451 <varlistentry>
452 <term>%I</term>
453 <listitem><para>The IP address of the client machine.</para>
454 </listitem>
455 </varlistentry>
457 <varlistentry>
458 <term>%T</term>
459 <listitem><para>the current date and time.</para></listitem>
460 </varlistentry>
462 <varlistentry>
463 <term>%$(<replaceable>envvar</replaceable>)</term>
464 <listitem><para>The value of the environment variable
465 <replaceable>envar</replaceable>.</para></listitem>
466 </varlistentry>
467 </variablelist>
469 <para>There are some quite creative things that can be done
470 with these substitutions and other smb.conf options.</para
471 </refsect1>
473 <refsect1>
474 <title id="NAMEMANGLINGSECT">NAME MANGLING</title>
476 <para>Samba supports "name mangling" so that DOS and
477 Windows clients can use files that don't conform to the 8.3 format.
478 It can also be set to adjust the case of 8.3 format filenames.</para>
480 <para>There are several options that control the way mangling is
481 performed, and they are grouped here rather than listed separately.
482 For the defaults look at the output of the testparm program. </para>
484 <para>All of these options can be set separately for each service
485 (or globally, of course). </para>
487 <para>The options are: </para>
489 <variablelist>
491 <varlistentry>
492 <term>mangling method</term>
493 <listitem><para> controls the algorithm used for the generating
494 the mangled names. Can take two different values, "hash" and
495 "hash2". "hash" is the default and is the algorithm that has been
496 used in Samba for many years. "hash2" is a newer and considered
497 a better algorithm (generates less collisions) in the names.
498 However, many Win32 applications store the
499 mangled names and so changing to the new algorithm must not be done
500 lightly as these applications may break unless reinstalled.
501 New installations of Samba may set the default to hash2.
502 Default <emphasis>hash</emphasis>.</para></listitem>
503 </varlistentry>
506 <varlistentry>
507 <term>mangle case = yes/no</term>
508 <listitem><para> controls if names that have characters that
509 aren't of the "default" case are mangled. For example,
510 if this is yes then a name like "Mail" would be mangled.
511 Default <emphasis>no</emphasis>.</para></listitem>
512 </varlistentry>
514 <varlistentry>
515 <term>case sensitive = yes/no</term>
516 <listitem><para>controls whether filenames are case sensitive. If
517 they aren't then Samba must do a filename search and match on passed
518 names. Default <emphasis>no</emphasis>.</para></listitem>
519 </varlistentry>
521 <varlistentry>
522 <term>default case = upper/lower</term>
523 <listitem><para>controls what the default case is for new
524 filenames. Default <emphasis>lower</emphasis>.</para></listitem>
525 </varlistentry>
527 <varlistentry>
528 <term>preserve case = yes/no</term>
529 <listitem><para>controls if new files are created with the
530 case that the client passes, or if they are forced to be the
531 "default" case. Default <emphasis>yes</emphasis>.
532 </para></listitem>
533 </varlistentry>
535 <varlistentry>
536 <term>short preserve case = yes/no</term>
537 <listitem><para>controls if new files which conform to 8.3 syntax,
538 that is all in upper case and of suitable length, are created
539 upper case, or if they are forced to be the "default"
540 case. This option can be use with "preserve case = yes"
541 to permit long filenames to retain their case, while short names
542 are lowercased. Default <emphasis>yes</emphasis>.</para></listitem>
543 </varlistentry>
544 </variablelist>
546 <para>By default, Samba 2.2 has the same semantics as a Windows
547 NT server, in that it is case insensitive but case preserving.</para>
549 </refsect1>
551 <refsect1>
552 <title id="VALIDATIONSECT">NOTE ABOUT USERNAME/PASSWORD VALIDATION</title>
554 <para>There are a number of ways in which a user can connect
555 to a service. The server uses the following steps in determining
556 if it will allow a connection to a specified service. If all the
557 steps fail, then the connection request is rejected. However, if one of the
558 steps succeeds, then the following steps are not checked.</para>
560 <para>If the service is marked "guest only = yes" and the
561 server is running with share-level security ("security = share")
562 then steps 1 to 5 are skipped.</para>
565 <orderedlist numeration="Arabic">
566 <listitem><para>If the client has passed a username/password
567 pair and that username/password pair is validated by the UNIX
568 system's password programs then the connection is made as that
569 username. Note that this includes the
570 \\server\service%<replaceable>username</replaceable> method of passing
571 a username.</para></listitem>
573 <listitem><para>If the client has previously registered a username
574 with the system and now supplies a correct password for that
575 username then the connection is allowed.</para></listitem>
577 <listitem><para>The client's NetBIOS name and any previously
578 used user names are checked against the supplied password, if
579 they match then the connection is allowed as the corresponding
580 user.</para></listitem>
582 <listitem><para>If the client has previously validated a
583 username/password pair with the server and the client has passed
584 the validation token then that username is used. </para></listitem>
586 <listitem><para>If a "user = " field is given in the
587 <filename>smb.conf</filename> file for the service and the client
588 has supplied a password, and that password matches (according to
589 the UNIX system's password checking) with one of the usernames
590 from the "user =" field then the connection is made as
591 the username in the "user =" line. If one
592 of the username in the "user =" list begins with a
593 '@' then that name expands to a list of names in
594 the group of the same name.</para></listitem>
596 <listitem><para>If the service is a guest service then a
597 connection is made as the username given in the "guest
598 account =" for the service, irrespective of the
599 supplied password.</para></listitem>
600 </orderedlist>
602 </refsect1>
604 <refsect1>
605 <title>COMPLETE LIST OF GLOBAL PARAMETERS</title>
607 <para>Here is a list of all global parameters. See the section of
608 each parameter for details. Note that some are synonyms.</para>
610 <itemizedlist>
611 <listitem><para><link linkend="ADDPRINTERCOMMAND"><parameter>add printer command</parameter></link></para></listitem>
612 <listitem><para><link linkend="ADDSHARECOMMAND"><parameter>add share command</parameter></link></para></listitem>
613 <listitem><para><link linkend="ADDUSERSCRIPT"><parameter>add user script</parameter></link></para></listitem>
614 <listitem><para><link linkend="ALLOWTRUSTEDDOMAINS"><parameter>allow trusted domains</parameter></link></para></listitem>
615 <listitem><para><link linkend="ANNOUNCEAS"><parameter>announce as</parameter></link></para></listitem>
616 <listitem><para><link linkend="ANNOUNCEVERSION"><parameter>announce version</parameter></link></para></listitem>
617 <listitem><para><link linkend="AUTOSERVICES"><parameter>auto services</parameter></link></para></listitem>
618 <listitem><para><link linkend="BINDINTERFACESONLY"><parameter>bind interfaces only</parameter></link></para></listitem>
619 <listitem><para><link linkend="BROWSELIST"><parameter>browse list</parameter></link></para></listitem>
620 <listitem><para><link linkend="CHANGENOTIFYTIMEOUT"><parameter>change notify timeout</parameter></link></para></listitem>
621 <listitem><para><link linkend="CHANGESHARECOMMAND"><parameter>change share command</parameter></link></para></listitem>
622 <listitem><para><link linkend="CHARACTERSET"><parameter>character set</parameter></link></para></listitem>
623 <listitem><para><link linkend="CLIENTCODEPAGE"><parameter>client code page</parameter></link></para></listitem>
624 <listitem><para><link linkend="CODEPAGEDIRECTORY"><parameter>code page directory</parameter></link></para></listitem>
625 <listitem><para><link linkend="CODINGSYSTEM"><parameter>coding system</parameter></link></para></listitem>
626 <listitem><para><link linkend="CONFIGFILE"><parameter>config file</parameter></link></para></listitem>
627 <listitem><para><link linkend="DEADTIME"><parameter>deadtime</parameter></link></para></listitem>
628 <listitem><para><link linkend="DEBUGHIRESTIMESTAMP"><parameter>debug hires timestamp</parameter></link></para></listitem>
629 <listitem><para><link linkend="DEBUGPID"><parameter>debug pid</parameter></link></para></listitem>
630 <listitem><para><link linkend="DEBUGTIMESTAMP"><parameter>debug timestamp</parameter></link></para></listitem>
631 <listitem><para><link linkend="DEBUGUID"><parameter>debug uid</parameter></link></para></listitem>
632 <listitem><para><link linkend="DEBUGLEVEL"><parameter>debuglevel</parameter></link></para></listitem>
633 <listitem><para><link linkend="DEFAULT"><parameter>default</parameter></link></para></listitem>
634 <listitem><para><link linkend="DEFAULTSERVICE"><parameter>default service</parameter></link></para></listitem>
635 <listitem><para><link linkend="DELETEPRINTERCOMMAND"><parameter>delete printer command</parameter></link></para></listitem>
636 <listitem><para><link linkend="DELETESHARECOMMAND"><parameter>delete share command</parameter></link></para></listitem>
637 <listitem><para><link linkend="DELETEUSERSCRIPT"><parameter>delete user script</parameter></link></para></listitem>
638 <listitem><para><link linkend="DFREECOMMAND"><parameter>dfree command</parameter></link></para></listitem>
639 <listitem><para><link linkend="DISABLESPOOLSS"><parameter>disable spoolss</parameter></link></para></listitem>
640 <listitem><para><link linkend="DNSPROXY"><parameter>dns proxy</parameter></link></para></listitem>
641 <listitem><para><link linkend="DOMAINADMINGROUP"><parameter>domain admin group</parameter></link></para></listitem>
642 <listitem><para><link linkend="DOMAINGUESTGROUP"><parameter>domain guest group</parameter></link></para></listitem>
643 <listitem><para><link linkend="DOMAINLOGONS"><parameter>domain logons</parameter></link></para></listitem>
644 <listitem><para><link linkend="DOMAINMASTER"><parameter>domain master</parameter></link></para></listitem>
645 <listitem><para><link linkend="ENCRYPTPASSWORDS"><parameter>encrypt passwords</parameter></link></para></listitem>
646 <listitem><para><link linkend="ENHANCEDBROWSING"><parameter>enhanced browsing</parameter></link></para></listitem>
647 <listitem><para><link linkend="ENUMPORTSCOMMAND"><parameter>enumports command</parameter></link></para></listitem>
648 <listitem><para><link linkend="GETWDCACHE"><parameter>getwd cache</parameter></link></para></listitem>
649 <listitem><para><link linkend="HIDELOCALUSERS"><parameter>hide local users</parameter></link></para></listitem>
650 <listitem><para><link linkend="HIDEUNREADABLE"><parameter>hide unreadable</parameter></link></para></listitem>
651 <listitem><para><link linkend="HOMEDIRMAP"><parameter>homedir map</parameter></link></para></listitem>
652 <listitem><para><link linkend="HOSTMSDFS"><parameter>host msdfs</parameter></link></para></listitem>
653 <listitem><para><link linkend="HOSTSEQUIV"><parameter>hosts equiv</parameter></link></para></listitem>
654 <listitem><para><link linkend="INTERFACES"><parameter>interfaces</parameter></link></para></listitem>
655 <listitem><para><link linkend="KEEPALIVE"><parameter>keepalive</parameter></link></para></listitem>
656 <listitem><para><link linkend="KERNELOPLOCKS"><parameter>kernel oplocks</parameter></link></para></listitem>
657 <listitem><para><link linkend="LANMANAUTH"><parameter>lanman auth</parameter></link></para></listitem>
658 <listitem><para><link linkend="LARGEREADWRITE"><parameter>large readwrite</parameter></link></para></listitem>
660 <listitem><para><link linkend="LDAPADMINDN"><parameter>ldap admin dn</parameter></link></para></listitem>
661 <listitem><para><link linkend="LDAPFILTER"><parameter>ldap filter</parameter></link></para></listitem>
662 <listitem><para><link linkend="LDAPPORT"><parameter>ldap port</parameter></link></para></listitem>
663 <listitem><para><link linkend="LDAPSERVER"><parameter>ldap server</parameter></link></para></listitem>
664 <listitem><para><link linkend="LDAPSSL"><parameter>ldap ssl</parameter></link></para></listitem>
665 <listitem><para><link linkend="LDAPSUFFIX"><parameter>ldap suffix</parameter></link></para></listitem>
667 <listitem><para><link linkend="LMANNOUNCE"><parameter>lm announce</parameter></link></para></listitem>
668 <listitem><para><link linkend="LMINTERVAL"><parameter>lm interval</parameter></link></para></listitem>
669 <listitem><para><link linkend="LOADPRINTERS"><parameter>load printers</parameter></link></para></listitem>
670 <listitem><para><link linkend="LOCALMASTER"><parameter>local master</parameter></link></para></listitem>
671 <listitem><para><link linkend="LOCKDIR"><parameter>lock dir</parameter></link></para></listitem>
672 <listitem><para><link linkend="LOCKDIRECTORY"><parameter>lock directory</parameter></link></para></listitem>
673 <listitem><para><link linkend="LOCKSPINCOUNT"><parameter>lock spin count</parameter></link></para></listitem>
674 <listitem><para><link linkend="LOCKSPINTIME"><parameter>lock spin time</parameter></link></para></listitem>
675 <listitem><para><link linkend="PIDDIRECTORY"><parameter>pid directory</parameter></link></para></listitem>
676 <listitem><para><link linkend="LOGFILE"><parameter>log file</parameter></link></para></listitem>
677 <listitem><para><link linkend="LOGLEVEL"><parameter>log level</parameter></link></para></listitem>
678 <listitem><para><link linkend="LOGONDRIVE"><parameter>logon drive</parameter></link></para></listitem>
679 <listitem><para><link linkend="LOGONHOME"><parameter>logon home</parameter></link></para></listitem>
680 <listitem><para><link linkend="LOGONPATH"><parameter>logon path</parameter></link></para></listitem>
681 <listitem><para><link linkend="LOGONSCRIPT"><parameter>logon script</parameter></link></para></listitem>
682 <listitem><para><link linkend="LPQCACHETIME"><parameter>lpq cache time</parameter></link></para></listitem>
683 <listitem><para><link linkend="MACHINEPASSWORDTIMEOUT"><parameter>machine password timeout</parameter></link></para></listitem>
684 <listitem><para><link linkend="MANGLEDSTACK"><parameter>mangled stack</parameter></link></para></listitem>
685 <listitem><para><link linkend="MANGLINGMETHOD"><parameter>mangling method</parameter></link></para></listitem>
686 <listitem><para><link linkend="MAPTOGUEST"><parameter>map to guest</parameter></link></para></listitem>
687 <listitem><para><link linkend="MAXDISKSIZE"><parameter>max disk size</parameter></link></para></listitem>
688 <listitem><para><link linkend="MAXLOGSIZE"><parameter>max log size</parameter></link></para></listitem>
689 <listitem><para><link linkend="MAXMUX"><parameter>max mux</parameter></link></para></listitem>
690 <listitem><para><link linkend="MAXOPENFILES"><parameter>max open files</parameter></link></para></listitem>
691 <listitem><para><link linkend="MAXPROTOCOL"><parameter>max protocol</parameter></link></para></listitem>
692 <listitem><para><link linkend="MAXSMBDPROCESSES"><parameter>max smbd processes</parameter></link></para></listitem>
693 <listitem><para><link linkend="MAXTTL"><parameter>max ttl</parameter></link></para></listitem>
694 <listitem><para><link linkend="MAXWINSTTL"><parameter>max wins ttl</parameter></link></para></listitem>
695 <listitem><para><link linkend="MAXXMIT"><parameter>max xmit</parameter></link></para></listitem>
696 <listitem><para><link linkend="MESSAGECOMMAND"><parameter>message command</parameter></link></para></listitem>
697 <listitem><para><link linkend="MINPASSWDLENGTH"><parameter>min passwd length</parameter></link></para></listitem>
698 <listitem><para><link linkend="MINPASSWORDLENGTH"><parameter>min password length</parameter></link></para></listitem>
699 <listitem><para><link linkend="MINPROTOCOL"><parameter>min protocol</parameter></link></para></listitem>
700 <listitem><para><link linkend="MINWINSTTL"><parameter>min wins ttl</parameter></link></para></listitem>
701 <listitem><para><link linkend="NAMERESOLVEORDER"><parameter>name resolve order</parameter></link></para></listitem>
702 <listitem><para><link linkend="NETBIOSALIASES"><parameter>netbios aliases</parameter></link></para></listitem>
703 <listitem><para><link linkend="NETBIOSNAME"><parameter>netbios name</parameter></link></para></listitem>
704 <listitem><para><link linkend="NETBIOSSCOPE"><parameter>netbios scope</parameter></link></para></listitem>
705 <listitem><para><link linkend="NISHOMEDIR"><parameter>nis homedir</parameter></link></para></listitem>
706 <listitem><para><link linkend="NTPIPESUPPORT"><parameter>nt pipe support</parameter></link></para></listitem>
707 <listitem><para><link linkend="NTSMBSUPPORT"><parameter>nt smb support</parameter></link></para></listitem>
708 <listitem><para><link linkend="NTSTATUSSUPPORT"><parameter>nt status support</parameter></link></para></listitem>
709 <listitem><para><link linkend="NULLPASSWORDS"><parameter>null passwords</parameter></link></para></listitem>
710 <listitem><para><link linkend="OBEYPAMRESTRICTIONS"><parameter>obey pam restrictions</parameter></link></para></listitem>
711 <listitem><para><link linkend="OPLOCKBREAKWAITTIME"><parameter>oplock break wait time</parameter></link></para></listitem>
712 <listitem><para><link linkend="OSLEVEL"><parameter>os level</parameter></link></para></listitem>
713 <listitem><para><link linkend="OS2DRIVERMAP"><parameter>os2 driver map</parameter></link></para></listitem>
714 <listitem><para><link linkend="PAMPASSWORDCHANGE"><parameter>pam password change</parameter></link></para></listitem>
715 <listitem><para><link linkend="PANICACTION"><parameter>panic action</parameter></link></para></listitem>
716 <listitem><para><link linkend="PASSWDCHAT"><parameter>passwd chat</parameter></link></para></listitem>
717 <listitem><para><link linkend="PASSWDCHATDEBUG"><parameter>passwd chat debug</parameter></link></para></listitem>
718 <listitem><para><link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter></link></para></listitem>
719 <listitem><para><link linkend="PASSWORDLEVEL"><parameter>password level</parameter></link></para></listitem>
720 <listitem><para><link linkend="PASSWORDSERVER"><parameter>password server</parameter></link></para></listitem>
721 <listitem><para><link linkend="PREFEREDMASTER"><parameter>prefered master</parameter></link></para></listitem>
722 <listitem><para><link linkend="PREFERREDMASTER"><parameter>preferred master</parameter></link></para></listitem>
723 <listitem><para><link linkend="PRELOAD"><parameter>preload</parameter></link></para></listitem>
724 <listitem><para><link linkend="PRINTCAP"><parameter>printcap</parameter></link></para></listitem>
725 <listitem><para><link linkend="PRINTCAPNAME"><parameter>printcap name</parameter></link></para></listitem>
726 <listitem><para><link linkend="PRINTERDRIVERFILE"><parameter>printer driver file</parameter></link></para></listitem>
727 <listitem><para><link linkend="PROTOCOL"><parameter>protocol</parameter></link></para></listitem>
728 <listitem><para><link linkend="READBMPX"><parameter>read bmpx</parameter></link></para></listitem>
729 <listitem><para><link linkend="READRAW"><parameter>read raw</parameter></link></para></listitem>
730 <listitem><para><link linkend="READSIZE"><parameter>read size</parameter></link></para></listitem>
731 <listitem><para><link linkend="REMOTEANNOUNCE"><parameter>remote announce</parameter></link></para></listitem>
732 <listitem><para><link linkend="REMOTEBROWSESYNC"><parameter>remote browse sync</parameter></link></para></listitem>
733 <listitem><para><link linkend="RESTRICTANONYMOUS"><parameter>restrict anonymous</parameter></link></para></listitem>
734 <listitem><para><link linkend="ROOT"><parameter>root</parameter></link></para></listitem>
735 <listitem><para><link linkend="ROOTDIR"><parameter>root dir</parameter></link></para></listitem>
736 <listitem><para><link linkend="ROOTDIRECTORY"><parameter>root directory</parameter></link></para></listitem>
737 <listitem><para><link linkend="SECURITY"><parameter>security</parameter></link></para></listitem>
738 <listitem><para><link linkend="SERVERSTRING"><parameter>server string</parameter></link></para></listitem>
739 <listitem><para><link linkend="SHOWADDPRINTERWIZARD"><parameter>show add printer wizard</parameter></link></para></listitem>
740 <listitem><para><link linkend="SMBPASSWDFILE"><parameter>smb passwd file</parameter></link></para></listitem>
741 <listitem><para><link linkend="SOCKETADDRESS"><parameter>socket address</parameter></link></para></listitem>
742 <listitem><para><link linkend="SOCKETOPTIONS"><parameter>socket options</parameter></link></para></listitem>
743 <listitem><para><link linkend="SOURCEENVIRONMENT"><parameter>source environment</parameter></link></para></listitem>
745 <listitem><para><link linkend="SSL"><parameter>ssl</parameter></link></para></listitem>
746 <listitem><para><link linkend="SSLCACERTDIR"><parameter>ssl CA certDir</parameter></link></para></listitem>
747 <listitem><para><link linkend="SSLCACERTFILE"><parameter>ssl CA certFile</parameter></link></para></listitem>
748 <listitem><para><link linkend="SSLCIPHERS"><parameter>ssl ciphers</parameter></link></para></listitem>
749 <listitem><para><link linkend="SSLCLIENTCERT"><parameter>ssl client cert</parameter></link></para></listitem>
750 <listitem><para><link linkend="SSLCLIENTKEY"><parameter>ssl client key</parameter></link></para></listitem>
751 <listitem><para><link linkend="SSLCOMPATIBILITY"><parameter>ssl compatibility</parameter></link></para></listitem>
752 <listitem><para><link linkend="SSLEGDSOCKET"><parameter>ssl egd socket</parameter></link></para></listitem>
753 <listitem><para><link linkend="SSLENTROPYBYTES"><parameter>ssl entropy bytes</parameter></link></para></listitem>
754 <listitem><para><link linkend="SSLENTROPYFILE"><parameter>ssl entropy file</parameter></link></para></listitem>
755 <listitem><para><link linkend="SSLHOSTS"><parameter>ssl hosts</parameter></link></para></listitem>
756 <listitem><para><link linkend="SSLHOSTSRESIGN"><parameter>ssl hosts resign</parameter></link></para></listitem>
757 <listitem><para><link linkend="SSLREQUIRECLIENTCERT"><parameter>ssl require clientcert</parameter></link></para></listitem>
758 <listitem><para><link linkend="SSLREQUIRESERVERCERT"><parameter>ssl require servercert</parameter></link></para></listitem>
759 <listitem><para><link linkend="SSLSERVERCERT"><parameter>ssl server cert</parameter></link></para></listitem>
760 <listitem><para><link linkend="SSLSERVERKEY"><parameter>ssl server key</parameter></link></para></listitem>
761 <listitem><para><link linkend="SSLVERSION"><parameter>ssl version</parameter></link></para></listitem>
763 <listitem><para><link linkend="STATCACHE"><parameter>stat cache</parameter></link></para></listitem>
764 <listitem><para><link linkend="STATCACHESIZE"><parameter>stat cache size</parameter></link></para></listitem>
765 <listitem><para><link linkend="STRIPDOT"><parameter>strip dot</parameter></link></para></listitem>
766 <listitem><para><link linkend="SYSLOG"><parameter>syslog</parameter></link></para></listitem>
767 <listitem><para><link linkend="SYSLOGONLY"><parameter>syslog only</parameter></link></para></listitem>
768 <listitem><para><link linkend="TEMPLATEHOMEDIR"><parameter>template homedir</parameter></link></para></listitem>
769 <listitem><para><link linkend="TEMPLATESHELL"><parameter>template shell</parameter></link></para></listitem>
770 <listitem><para><link linkend="TIMEOFFSET"><parameter>time offset</parameter></link></para></listitem>
771 <listitem><para><link linkend="TIMESERVER"><parameter>time server</parameter></link></para></listitem>
772 <listitem><para><link linkend="TIMESTAMPLOGS"><parameter>timestamp logs</parameter></link></para></listitem>
773 <listitem><para><link linkend="TOTALPRINTJOBS"><parameter>total print jobs</parameter></link></para></listitem>
774 <listitem><para><link linkend="UNIXEXTENSIONS"><parameter>unix extensions</parameter></link></para></listitem>
775 <listitem><para><link linkend="UNIXPASSWORDSYNC"><parameter>unix password sync</parameter></link></para></listitem>
776 <listitem><para><link linkend="UPDATEENCRYPTED"><parameter>update encrypted</parameter></link></para></listitem>
777 <listitem><para><link linkend="USEMMAP"><parameter>use mmap</parameter></link></para></listitem>
778 <listitem><para><link linkend="USERHOSTS"><parameter>use rhosts</parameter></link></para></listitem>
779 <listitem><para><link linkend="USESENDFILE"><parameter>use sendfile</parameter></link></para></listitem>
780 <listitem><para><link linkend="USERNAMELEVEL"><parameter>username level</parameter></link></para></listitem>
781 <listitem><para><link linkend="USERNAMEMAP"><parameter>username map</parameter></link></para></listitem>
782 <listitem><para><link linkend="UTMP"><parameter>utmp</parameter></link></para></listitem>
783 <listitem><para><link linkend="UTMPDIRECTORY"><parameter>utmp directory</parameter></link></para></listitem>
784 <listitem><para><link linkend="VALIDCHARS"><parameter>valid chars</parameter></link></para></listitem>
785 <listitem><para><link linkend="WINBINDCACHETIME"><parameter>winbind cache time</parameter></link></para></listitem>
786 <listitem><para><link linkend="WINBINDENUMUSERS"><parameter>winbind enum users</parameter></link></para></listitem>
787 <listitem><para><link linkend="WINBINDENUMGROUPS"><parameter>winbind enum groups</parameter></link></para></listitem>
788 <listitem><para><link linkend="WINBINDGID"><parameter>winbind gid</parameter></link></para></listitem>
789 <listitem><para><link linkend="WINBINDSEPARATOR"><parameter>winbind separator</parameter></link></para></listitem>
790 <listitem><para><link linkend="WINBINDUID"><parameter>winbind uid</parameter></link></para></listitem>
791 <listitem><para><link linkend="WINBINDUSEDEFAULTDOMAIN"><parameter>winbind use default domain</parameter></link></para></listitem>
792 <listitem><para><link linkend="WINSHOOK"><parameter>wins hook</parameter></link></para></listitem>
793 <listitem><para><link linkend="WINSPROXY"><parameter>wins proxy</parameter></link></para></listitem>
794 <listitem><para><link linkend="WINSSERVER"><parameter>wins server</parameter></link></para></listitem>
795 <listitem><para><link linkend="WINSSUPPORT"><parameter>wins support</parameter></link></para></listitem>
796 <listitem><para><link linkend="WORKGROUP"><parameter>workgroup</parameter></link></para></listitem>
797 <listitem><para><link linkend="WRITERAW"><parameter>write raw</parameter></link></para></listitem>
798 </itemizedlist>
800 </refsect1>
802 <refsect1>
803 <title>COMPLETE LIST OF SERVICE PARAMETERS</title>
805 <para>Here is a list of all service parameters. See the section on
806 each parameter for details. Note that some are synonyms.</para>
808 <itemizedlist>
809 <listitem><para><link linkend="ADMINUSERS"><parameter>admin users</parameter></link></para></listitem>
810 <listitem><para><link linkend="ALLOWHOSTS"><parameter>allow hosts</parameter></link></para></listitem>
811 <listitem><para><link linkend="AVAILABLE"><parameter>available</parameter></link></para></listitem>
812 <listitem><para><link linkend="BLOCKINGLOCKS"><parameter>blocking locks</parameter></link></para></listitem>
813 <listitem><para><link linkend="BLOCKSIZE"><parameter>block size</parameter></link></para></listitem>
814 <listitem><para><link linkend="BROWSABLE"><parameter>browsable</parameter></link></para></listitem>
815 <listitem><para><link linkend="BROWSEABLE"><parameter>browseable</parameter></link></para></listitem>
816 <listitem><para><link linkend="CASESENSITIVE"><parameter>case sensitive</parameter></link></para></listitem>
817 <listitem><para><link linkend="CASESIGNAMES"><parameter>casesignames</parameter></link></para></listitem>
818 <listitem><para><link linkend="COMMENT"><parameter>comment</parameter></link></para></listitem>
819 <listitem><para><link linkend="COPY"><parameter>copy</parameter></link></para></listitem>
820 <listitem><para><link linkend="CREATEMASK"><parameter>create mask</parameter></link></para></listitem>
821 <listitem><para><link linkend="CREATEMODE"><parameter>create mode</parameter></link></para></listitem>
822 <listitem><para><link linkend="CSCPOLICY"><parameter>csc policy</parameter></link></para></listitem>
824 <listitem><para><link linkend="DEFAULTCASE"><parameter>default case</parameter></link></para></listitem>
825 <listitem><para><link linkend="DEFAULTDEVMODE"><parameter>default devmode</parameter></link></para></listitem>
826 <listitem><para><link linkend="DELETEREADONLY"><parameter>delete readonly</parameter></link></para></listitem>
827 <listitem><para><link linkend="DELETEVETOFILES"><parameter>delete veto files</parameter></link></para></listitem>
828 <listitem><para><link linkend="DENYHOSTS"><parameter>deny hosts</parameter></link></para></listitem>
829 <listitem><para><link linkend="DIRECTORY"><parameter>directory</parameter></link></para></listitem>
830 <listitem><para><link linkend="DIRECTORYMASK"><parameter>directory mask</parameter></link></para></listitem>
831 <listitem><para><link linkend="DIRECTORYMODE"><parameter>directory mode</parameter></link></para></listitem>
832 <listitem><para><link linkend="DIRECTORYSECURITYMASK"><parameter>directory security mask</parameter></link></para></listitem>
833 <listitem><para><link linkend="DONTDESCEND"><parameter>dont descend</parameter></link></para></listitem>
834 <listitem><para><link linkend="DOSFILEMODE"><parameter>dos filemode</parameter></link></para></listitem>
835 <listitem><para><link linkend="DOSFILETIMERESOLUTION"><parameter>dos filetime resolution</parameter></link></para></listitem>
836 <listitem><para><link linkend="DOSFILETIMES"><parameter>dos filetimes</parameter></link></para></listitem>
837 <listitem><para><link linkend="EXEC"><parameter>exec</parameter></link></para></listitem>
838 <listitem><para><link linkend="FAKEDIRECTORYCREATETIMES"><parameter>fake directory create times</parameter></link></para></listitem>
839 <listitem><para><link linkend="FAKEOPLOCKS"><parameter>fake oplocks</parameter></link></para></listitem>
840 <listitem><para><link linkend="FOLLOWSYMLINKS"><parameter>follow symlinks</parameter></link></para></listitem>
841 <listitem><para><link linkend="FORCECREATEMODE"><parameter>force create mode</parameter></link></para></listitem>
842 <listitem><para><link linkend="FORCEDIRECTORYMODE"><parameter>force directory mode</parameter></link></para></listitem>
843 <listitem><para><link linkend="FORCEDIRECTORYSECURITYMODE"><parameter>force directory security mode</parameter></link></para></listitem>
844 <listitem><para><link linkend="FORCEGROUP"><parameter>force group</parameter></link></para></listitem>
845 <listitem><para><link linkend="FORCESECURITYMODE"><parameter>force security mode</parameter></link></para></listitem>
846 <listitem><para><link linkend="FORCEUNKNOWNACLUSER"><parameter>force unknown acl user</parameter></link></para></listitem>
847 <listitem><para><link linkend="FORCEUSER"><parameter>force user</parameter></link></para></listitem>
848 <listitem><para><link linkend="FSTYPE"><parameter>fstype</parameter></link></para></listitem>
849 <listitem><para><link linkend="GROUP"><parameter>group</parameter></link></para></listitem>
850 <listitem><para><link linkend="GUESTACCOUNT"><parameter>guest account</parameter></link></para></listitem>
851 <listitem><para><link linkend="GUESTOK"><parameter>guest ok</parameter></link></para></listitem>
852 <listitem><para><link linkend="GUESTONLY"><parameter>guest only</parameter></link></para></listitem>
853 <listitem><para><link linkend="HIDEDOTFILES"><parameter>hide dot files</parameter></link></para></listitem>
854 <listitem><para><link linkend="HIDEFILES"><parameter>hide files</parameter></link></para></listitem>
855 <listitem><para><link linkend="HOSTSALLOW"><parameter>hosts allow</parameter></link></para></listitem>
856 <listitem><para><link linkend="HOSTSDENY"><parameter>hosts deny</parameter></link></para></listitem>
857 <listitem><para><link linkend="INCLUDE"><parameter>include</parameter></link></para></listitem>
858 <listitem><para><link linkend="INHERITACLS"><parameter>inherit acls</parameter></link></para></listitem>
859 <listitem><para><link linkend="INHERITPERMISSIONS"><parameter>inherit permissions</parameter></link></para></listitem>
860 <listitem><para><link linkend="INVALIDUSERS"><parameter>invalid users</parameter></link></para></listitem>
861 <listitem><para><link linkend="LEVEL2OPLOCKS"><parameter>level2 oplocks</parameter></link></para></listitem>
862 <listitem><para><link linkend="LOCKING"><parameter>locking</parameter></link></para></listitem>
863 <listitem><para><link linkend="LPPAUSECOMMAND"><parameter>lppause command</parameter></link></para></listitem>
864 <listitem><para><link linkend="LPQCOMMAND"><parameter>lpq command</parameter></link></para></listitem>
865 <listitem><para><link linkend="LPRESUMECOMMAND"><parameter>lpresume command</parameter></link></para></listitem>
866 <listitem><para><link linkend="LPRMCOMMAND"><parameter>lprm command</parameter></link></para></listitem>
867 <listitem><para><link linkend="MAGICOUTPUT"><parameter>magic output</parameter></link></para></listitem>
868 <listitem><para><link linkend="MAGICSCRIPT"><parameter>magic script</parameter></link></para></listitem>
869 <listitem><para><link linkend="MANGLECASE"><parameter>mangle case</parameter></link></para></listitem>
870 <listitem><para><link linkend="MANGLEDMAP"><parameter>mangled map</parameter></link></para></listitem>
871 <listitem><para><link linkend="MANGLEDNAMES"><parameter>mangled names</parameter></link></para></listitem>
872 <listitem><para><link linkend="MANGLINGCHAR"><parameter>mangling char</parameter></link></para></listitem>
873 <listitem><para><link linkend="MAPARCHIVE"><parameter>map archive</parameter></link></para></listitem>
874 <listitem><para><link linkend="MAPHIDDEN"><parameter>map hidden</parameter></link></para></listitem>
875 <listitem><para><link linkend="MAPSYSTEM"><parameter>map system</parameter></link></para></listitem>
876 <listitem><para><link linkend="MAXCONNECTIONS"><parameter>max connections</parameter></link></para></listitem>
877 <listitem><para><link linkend="MAXPRINTJOBS"><parameter>max print jobs</parameter></link></para></listitem>
878 <listitem><para><link linkend="MINPRINTSPACE"><parameter>min print space</parameter></link></para></listitem>
879 <listitem><para><link linkend="MSDFSROOT"><parameter>msdfs root</parameter></link></para></listitem>
880 <listitem><para><link linkend="NTACLSUPPORT"><parameter>nt acl support</parameter></link></para></listitem>
881 <listitem><para><link linkend="ONLYGUEST"><parameter>only guest</parameter></link></para></listitem>
882 <listitem><para><link linkend="ONLYUSER"><parameter>only user</parameter></link></para></listitem>
883 <listitem><para><link linkend="OPLOCKCONTENTIONLIMIT"><parameter>oplock contention limit</parameter></link></para></listitem>
884 <listitem><para><link linkend="OPLOCKS"><parameter>oplocks</parameter></link></para></listitem>
885 <listitem><para><link linkend="PATH"><parameter>path</parameter></link></para></listitem>
886 <listitem><para><link linkend="POSIXLOCKING"><parameter>posix locking</parameter></link></para></listitem>
887 <listitem><para><link linkend="POSTEXEC"><parameter>postexec</parameter></link></para></listitem>
888 <listitem><para><link linkend="POSTSCRIPT"><parameter>postscript</parameter></link></para></listitem>
889 <listitem><para><link linkend="PREEXEC"><parameter>preexec</parameter></link></para></listitem>
890 <listitem><para><link linkend="PREEXECCLOSE"><parameter>preexec close</parameter></link></para></listitem>
891 <listitem><para><link linkend="PRESERVECASE"><parameter>preserve case</parameter></link></para></listitem>
892 <listitem><para><link linkend="PRINTCOMMAND"><parameter>print command</parameter></link></para></listitem>
893 <listitem><para><link linkend="PRINTOK"><parameter>print ok</parameter></link></para></listitem>
894 <listitem><para><link linkend="PRINTABLE"><parameter>printable</parameter></link></para></listitem>
895 <listitem><para><link linkend="PRINTER"><parameter>printer</parameter></link></para></listitem>
896 <listitem><para><link linkend="PRINTERADMIN"><parameter>printer admin</parameter></link></para></listitem>
897 <listitem><para><link linkend="PRINTERDRIVER"><parameter>printer driver</parameter></link></para></listitem>
898 <listitem><para><link linkend="PRINTERDRIVERLOCATION"><parameter>printer driver location</parameter></link></para></listitem>
899 <listitem><para><link linkend="PRINTERNAME"><parameter>printer name</parameter></link></para></listitem>
900 <listitem><para><link linkend="PRINTING"><parameter>printing</parameter></link></para></listitem>
901 <listitem><para><link linkend="PUBLIC"><parameter>public</parameter></link></para></listitem>
902 <listitem><para><link linkend="QUEUEPAUSECOMMAND"><parameter>queuepause command</parameter></link></para></listitem>
903 <listitem><para><link linkend="QUEUERESUMECOMMAND"><parameter>queueresume command</parameter></link></para></listitem>
904 <listitem><para><link linkend="READLIST"><parameter>read list</parameter></link></para></listitem>
905 <listitem><para><link linkend="READONLY"><parameter>read only</parameter></link></para></listitem>
906 <listitem><para><link linkend="ROOTPOSTEXEC"><parameter>root postexec</parameter></link></para></listitem>
907 <listitem><para><link linkend="ROOTPREEXEC"><parameter>root preexec</parameter></link></para></listitem>
908 <listitem><para><link linkend="ROOTPREEXECCLOSE"><parameter>root preexec close</parameter></link></para></listitem>
909 <listitem><para><link linkend="SECURITYMASK"><parameter>security mask</parameter></link></para></listitem>
910 <listitem><para><link linkend="SETDIRECTORY"><parameter>set directory</parameter></link></para></listitem>
911 <listitem><para><link linkend="SHAREMODES"><parameter>share modes</parameter></link></para></listitem>
912 <listitem><para><link linkend="SHORTPRESERVECASE"><parameter>short preserve case</parameter></link></para></listitem>
913 <listitem><para><link linkend="STATUS"><parameter>status</parameter></link></para></listitem>
914 <listitem><para><link linkend="STRICTALLOCATE"><parameter>strict allocate</parameter></link></para></listitem>
915 <listitem><para><link linkend="STRICTLOCKING"><parameter>strict locking</parameter></link></para></listitem>
916 <listitem><para><link linkend="STRICTSYNC"><parameter>strict sync</parameter></link></para></listitem>
917 <listitem><para><link linkend="SYNCALWAYS"><parameter>sync always</parameter></link></para></listitem>
918 <listitem><para><link linkend="USECLIENTDRIVER"><parameter>use client driver</parameter></link></para></listitem>
919 <listitem><para><link linkend="USER"><parameter>user</parameter></link></para></listitem>
920 <listitem><para><link linkend="USERNAME"><parameter>username</parameter></link></para></listitem>
921 <listitem><para><link linkend="USERS"><parameter>users</parameter></link></para></listitem>
922 <listitem><para><link linkend="VALIDUSERS"><parameter>valid users</parameter></link></para></listitem>
923 <listitem><para><link linkend="VETOFILES"><parameter>veto files</parameter></link></para></listitem>
924 <listitem><para><link linkend="VETOOPLOCKFILES"><parameter>veto oplock files</parameter></link></para></listitem>
925 <listitem><para><link linkend="VFSOBJECT"><parameter>vfs object</parameter></link></para></listitem>
926 <listitem><para><link linkend="VFSOPTIONS"><parameter>vfs options</parameter></link></para></listitem>
927 <listitem><para><link linkend="VOLUME"><parameter>volume</parameter></link></para></listitem>
928 <listitem><para><link linkend="WIDELINKS"><parameter>wide links</parameter></link></para></listitem>
929 <listitem><para><link linkend="WRITABLE"><parameter>writable</parameter></link></para></listitem>
930 <listitem><para><link linkend="WRITECACHESIZE"><parameter>write cache size</parameter></link></para></listitem>
931 <listitem><para><link linkend="WRITELIST"><parameter>write list</parameter></link></para></listitem>
932 <listitem><para><link linkend="WRITEOK"><parameter>write ok</parameter></link></para></listitem>
933 <listitem><para><link linkend="WRITEABLE"><parameter>writeable</parameter></link></para></listitem>
934 </itemizedlist>
936 </refsect1>
938 <refsect1>
939 <title>EXPLANATION OF EACH PARAMETER</title>
941 <variablelist>
944 <varlistentry>
945 <term><anchor id="ADDPRINTERCOMMAND">add printer command (G)</term>
946 <listitem><para>With the introduction of MS-RPC based printing
947 support for Windows NT/2000 clients in Samba 2.2, The MS Add
948 Printer Wizard (APW) icon is now also available in the
949 "Printers..." folder displayed a share listing. The APW
950 allows for printers to be add remotely to a Samba or Windows
951 NT/2000 print server.</para>
953 <para>For a Samba host this means that the printer must be
954 physically added to the underlying printing system. The <parameter>add
955 printer command</parameter> defines a script to be run which
956 will perform the necessary operations for adding the printer
957 to the print system and to add the appropriate service definition
958 to the <filename>smb.conf</filename> file in order that it can be
959 shared by <ulink url="smbd.8.html"><command>smbd(8)</command>
960 </ulink>.</para>
962 <para>The <parameter>add printer command</parameter> is
963 automatically invoked with the following parameter (in
964 order:</para>
966 <itemizedlist>
967 <listitem><para><parameter>printer name</parameter></para></listitem>
968 <listitem><para><parameter>share name</parameter></para></listitem>
969 <listitem><para><parameter>port name</parameter></para></listitem>
970 <listitem><para><parameter>driver name</parameter></para></listitem>
971 <listitem><para><parameter>location</parameter></para></listitem>
972 <listitem><para><parameter>Windows 9x driver location</parameter>
973 </para></listitem>
974 </itemizedlist>
976 <para>All parameters are filled in from the PRINTER_INFO_2 structure sent
977 by the Windows NT/2000 client with one exception. The "Windows 9x
978 driver location" parameter is included for backwards compatibility
979 only. The remaining fields in the structure are generated from answers
980 to the APW questions.</para>
982 <para>Once the <parameter>add printer command</parameter> has
983 been executed, <command>smbd</command> will reparse the <filename>
984 smb.conf</filename> to determine if the share defined by the APW
985 exists. If the sharename is still invalid, then <command>smbd
986 </command> will return an ACCESS_DENIED error to the client.</para>
988 <para>See also <link linkend="DELETEPRINTERCOMMAND"><parameter>
989 delete printer command</parameter></link>, <link
990 linkend="printing"><parameter>printing</parameter></link>,
991 <link linkend="SHOWADDPRINTERWIZARD"><parameter>show add
992 printer wizard</parameter></link></para>
994 <para>Default: <emphasis>none</emphasis></para>
995 <para>Example: <command>addprinter command = /usr/bin/addprinter
996 </command></para>
997 </listitem>
998 </varlistentry>
1002 <varlistentry>
1003 <term><anchor id="ADDSHARECOMMAND">add share command (G)</term>
1004 <listitem><para>Samba 2.2.0 introduced the ability to dynamically
1005 add and delete shares via the Windows NT 4.0 Server Manager. The
1006 <parameter>add share command</parameter> is used to define an
1007 external program or script which will add a new service definition
1008 to <filename>smb.conf</filename>. In order to successfully
1009 execute the <parameter>add share command</parameter>, <command>smbd</command>
1010 requires that the administrator be connected using a root account (i.e.
1011 uid == 0).
1012 </para>
1014 <para>
1015 When executed, <command>smbd</command> will automatically invoke the
1016 <parameter>add share command</parameter> with four parameters.
1017 </para>
1019 <itemizedlist>
1020 <listitem><para><parameter>configFile</parameter> - the location
1021 of the global <filename>smb.conf</filename> file.
1022 </para></listitem>
1024 <listitem><para><parameter>shareName</parameter> - the name of the new
1025 share.
1026 </para></listitem>
1028 <listitem><para><parameter>pathName</parameter> - path to an **existing**
1029 directory on disk.
1030 </para></listitem>
1032 <listitem><para><parameter>comment</parameter> - comment string to associate
1033 with the new share.
1034 </para></listitem>
1035 </itemizedlist>
1037 <para>
1038 This parameter is only used for add file shares. To add printer shares,
1039 see the <link linkend="ADDPRINTERCOMMAND"><parameter>add printer
1040 command</parameter></link>.
1041 </para>
1043 <para>
1044 See also <link linkend="CHANGESHARECOMMAND"><parameter>change share
1045 command</parameter></link>, <link linkend="DELETESHARECOMMAND"><parameter>delete share
1046 command</parameter></link>.
1047 </para>
1049 <para>Default: <emphasis>none</emphasis></para>
1050 <para>Example: <command>add share command = /usr/local/bin/addshare</command></para>
1051 </listitem>
1052 </varlistentry>
1058 <varlistentry>
1059 <term><anchor id="ADDUSERSCRIPT">add user script (G)</term>
1060 <listitem><para>This is the full pathname to a script that will
1061 be run <emphasis>AS ROOT</emphasis> by <ulink url="smbd.8.html">smbd(8)
1062 </ulink> under special circumstances described below.</para>
1064 <para>Normally, a Samba server requires that UNIX users are
1065 created for all users accessing files on this server. For sites
1066 that use Windows NT account databases as their primary user database
1067 creating these users and keeping the user list in sync with the
1068 Windows NT PDC is an onerous task. This option allows <ulink
1069 url="smbd.8.html">smbd</ulink> to create the required UNIX users
1070 <emphasis>ON DEMAND</emphasis> when a user accesses the Samba server.</para>
1072 <para>In order to use this option, <ulink url="smbd.8.html">smbd</ulink>
1073 must <emphasis>NOT</emphasis> be set to <parameter>security = share</parameter>
1074 and <parameter>add user script</parameter>
1075 must be set to a full pathname for a script that will create a UNIX
1076 user given one argument of <parameter>%u</parameter>, which expands into
1077 the UNIX user name to create.</para>
1079 <para>When the Windows user attempts to access the Samba server,
1080 at login (session setup in the SMB protocol) time, <ulink url="smbd.8.html">
1081 smbd</ulink> contacts the <parameter>password server</parameter> and
1082 attempts to authenticate the given user with the given password. If the
1083 authentication succeeds then <command>smbd</command>
1084 attempts to find a UNIX user in the UNIX password database to map the
1085 Windows user into. If this lookup fails, and <parameter>add user script
1086 </parameter> is set then <command>smbd</command> will
1087 call the specified script <emphasis>AS ROOT</emphasis>, expanding
1088 any <parameter>%u</parameter> argument to be the user name to create.</para>
1090 <para>If this script successfully creates the user then <command>smbd
1091 </command> will continue on as though the UNIX user
1092 already existed. In this way, UNIX users are dynamically created to
1093 match existing Windows NT accounts.</para>
1095 <para>See also <link linkend="SECURITY"><parameter>
1096 security</parameter></link>, <link linkend="PASSWORDSERVER">
1097 <parameter>password server</parameter></link>,
1098 <link linkend="DELETEUSERSCRIPT"><parameter>delete user
1099 script</parameter></link>.</para>
1101 <para>Default: <command>add user script = &lt;empty string&gt;
1102 </command></para>
1104 <para>Example: <command>add user script = /usr/local/samba/bin/add_user
1105 %u</command></para>
1106 </listitem>
1107 </varlistentry>
1112 <varlistentry>
1113 <term><anchor id="ADMINUSERS">admin users (S)</term>
1114 <listitem><para>This is a list of users who will be granted
1115 administrative privileges on the share. This means that they
1116 will do all file operations as the super-user (root).</para>
1118 <para>You should use this option very carefully, as any user in
1119 this list will be able to do anything they like on the share,
1120 irrespective of file permissions.</para>
1122 <para>Default: <emphasis>no admin users</emphasis></para>
1124 <para>Example: <command>admin users = jason</command></para>
1125 </listitem>
1126 </varlistentry>
1130 <varlistentry>
1131 <term><anchor id="ALLOWHOSTS">allow hosts (S)</term>
1132 <listitem><para>Synonym for <link linkend="HOSTSALLOW">
1133 <parameter>hosts allow</parameter></link>.</para></listitem>
1134 </varlistentry>
1138 <varlistentry>
1139 <term><anchor id="ALLOWTRUSTEDDOMAINS">allow trusted domains (G)</term>
1140 <listitem><para>This option only takes effect when the <link
1141 linkend="SECURITY"><parameter>security</parameter></link> option is set to
1142 <constant>server</constant> or <constant>domain</constant>.
1143 If it is set to no, then attempts to connect to a resource from
1144 a domain or workgroup other than the one which <ulink url="smbd.8.html">smbd</ulink> is running
1145 in will fail, even if that domain is trusted by the remote server
1146 doing the authentication.</para>
1148 <para>This is useful if you only want your Samba server to
1149 serve resources to users in the domain it is a member of. As
1150 an example, suppose that there are two domains DOMA and DOMB. DOMB
1151 is trusted by DOMA, which contains the Samba server. Under normal
1152 circumstances, a user with an account in DOMB can then access the
1153 resources of a UNIX account with the same account name on the
1154 Samba server even if they do not have an account in DOMA. This
1155 can make implementing a security boundary difficult.</para>
1157 <para>Default: <command>allow trusted domains = yes</command></para>
1159 </listitem>
1160 </varlistentry>
1164 <varlistentry>
1165 <term><anchor id="ANNOUNCEAS">announce as (G)</term>
1166 <listitem><para>This specifies what type of server
1167 <ulink url="nmbd.8.html"><command>nmbd</command></ulink>
1168 will announce itself as, to a network neighborhood browse
1169 list. By default this is set to Windows NT. The valid options
1170 are : "NT Server" (which can also be written as "NT"),
1171 "NT Workstation", "Win95" or "WfW" meaning Windows NT Server,
1172 Windows NT Workstation, Windows 95 and Windows for Workgroups
1173 respectively. Do not change this parameter unless you have a
1174 specific need to stop Samba appearing as an NT server as this
1175 may prevent Samba servers from participating as browser servers
1176 correctly.</para>
1178 <para>Default: <command>announce as = NT Server</command></para>
1180 <para>Example: <command>announce as = Win95</command></para>
1181 </listitem>
1182 </varlistentry>
1186 <varlistentry>
1187 <term><anchor id="ANNOUNCEVERSION">announce version (G)</term>
1188 <listitem><para>This specifies the major and minor version numbers
1189 that nmbd will use when announcing itself as a server. The default
1190 is 4.5. Do not change this parameter unless you have a specific
1191 need to set a Samba server to be a downlevel server.</para>
1193 <para>Default: <command>announce version = 4.5</command></para>
1195 <para>Example: <command>announce version = 2.0</command></para>
1196 </listitem>
1197 </varlistentry>
1201 <varlistentry>
1202 <term><anchor id="AUTOSERVICES">auto services (G)</term>
1203 <listitem><para>This is a synonym for the <link linkend="PRELOAD">
1204 <parameter>preload</parameter></link>.</para>
1205 </listitem>
1206 </varlistentry>
1210 <varlistentry>
1211 <term><anchor id="AVAILABLE">available (S)</term>
1212 <listitem><para>This parameter lets you "turn off" a service. If
1213 <parameter>available = no</parameter>, then <emphasis>ALL</emphasis>
1214 attempts to connect to the service will fail. Such failures are
1215 logged.</para>
1217 <para>Default: <command>available = yes</command></para>
1219 </listitem>
1220 </varlistentry>
1224 <varlistentry>
1225 <term><anchor id="BINDINTERFACESONLY">bind interfaces only (G)</term>
1226 <listitem><para>This global parameter allows the Samba admin
1227 to limit what interfaces on a machine will serve SMB requests. If
1228 affects file service <ulink url="smbd.8.html">smbd(8)</ulink> and
1229 name service <ulink url="nmbd.8.html">nmbd(8)</ulink> in slightly
1230 different ways.</para>
1232 <para>For name service it causes <command>nmbd</command> to bind
1233 to ports 137 and 138 on the interfaces listed in the <link
1234 linkend="INTERFACES">interfaces</link> parameter. <command>nmbd
1235 </command> also binds to the "all addresses" interface (0.0.0.0)
1236 on ports 137 and 138 for the purposes of reading broadcast messages.
1237 If this option is not set then <command>nmbd</command> will service
1238 name requests on all of these sockets. If <parameter>bind interfaces
1239 only</parameter> is set then <command>nmbd</command> will check the
1240 source address of any packets coming in on the broadcast sockets
1241 and discard any that don't match the broadcast addresses of the
1242 interfaces in the <parameter>interfaces</parameter> parameter list.
1243 As unicast packets are received on the other sockets it allows
1244 <command>nmbd</command> to refuse to serve names to machines that
1245 send packets that arrive through any interfaces not listed in the
1246 <parameter>interfaces</parameter> list. IP Source address spoofing
1247 does defeat this simple check, however so it must not be used
1248 seriously as a security feature for <command>nmbd</command>.</para>
1250 <para>For file service it causes <ulink url="smbd.8.html">smbd(8)</ulink>
1251 to bind only to the interface list given in the <link linkend="INTERFACES">
1252 interfaces</link> parameter. This restricts the networks that
1253 <command>smbd</command> will serve to packets coming in those
1254 interfaces. Note that you should not use this parameter for machines
1255 that are serving PPP or other intermittent or non-broadcast network
1256 interfaces as it will not cope with non-permanent interfaces.</para>
1258 <para>If <parameter>bind interfaces only</parameter> is set then
1259 unless the network address <emphasis>127.0.0.1</emphasis> is added
1260 to the <parameter>interfaces</parameter> parameter list <ulink
1261 url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink>
1262 and <ulink url="swat.8.html"><command>swat(8)</command></ulink> may
1263 not work as expected due to the reasons covered below.</para>
1265 <para>To change a users SMB password, the <command>smbpasswd</command>
1266 by default connects to the <emphasis>localhost - 127.0.0.1</emphasis>
1267 address as an SMB client to issue the password change request. If
1268 <parameter>bind interfaces only</parameter> is set then unless the
1269 network address <emphasis>127.0.0.1</emphasis> is added to the
1270 <parameter>interfaces</parameter> parameter list then <command>
1271 smbpasswd</command> will fail to connect in it's default mode.
1272 <command>smbpasswd</command> can be forced to use the primary IP interface
1273 of the local host by using its <ulink url="smbpasswd.8.html#minusr">
1274 <parameter>-r <replaceable>remote machine</replaceable></parameter>
1275 </ulink> parameter, with <replaceable>remote machine</replaceable> set
1276 to the IP name of the primary interface of the local host.</para>
1278 <para>The <command>swat</command> status page tries to connect with
1279 <command>smbd</command> and <command>nmbd</command> at the address
1280 <emphasis>127.0.0.1</emphasis> to determine if they are running.
1281 Not adding <emphasis>127.0.0.1</emphasis> will cause <command>
1282 smbd</command> and <command>nmbd</command> to always show
1283 "not running" even if they really are. This can prevent <command>
1284 swat</command> from starting/stopping/restarting <command>smbd</command>
1285 and <command>nmbd</command>.</para>
1287 <para>Default: <command>bind interfaces only = no</command></para>
1289 </listitem>
1290 </varlistentry>
1294 <varlistentry>
1295 <term><anchor id="BLOCKSIZE">block size (S)</term>
1296 <listitem><para>This parameter controls the behavior of <ulink
1297 url="smbd.8.html">smbd(8)</ulink> when reporting disk free sizes.
1298 By default, this reports a disk block size of 1024 bytes.</para>
1300 <para>Changing this parameter may have some effect on the
1301 efficiency of client writes, this is not yet confirmed. This
1302 parameter was added to allow advanced administrators to change
1303 it (usually to a higher value) and test the effect it has on
1304 client write performance without re-compiling the code. As this
1305 is an experimental option it may be removed in a future release.
1306 </para>
1308 <para>Changing this option does not change the disk free reporting
1309 size, just the block size unit reported to the client.</para>
1311 <para>Default: <command>block size = 1024</command></para>
1312 <para>Example: <command>block size = 65536</command></para>
1314 </listitem>
1315 </varlistentry>
1320 <varlistentry>
1321 <term><anchor id="BLOCKINGLOCKS">blocking locks (S)</term>
1322 <listitem><para>This parameter controls the behavior of <ulink
1323 url="smbd.8.html">smbd(8)</ulink> when given a request by a client
1324 to obtain a byte range lock on a region of an open file, and the
1325 request has a time limit associated with it.</para>
1327 <para>If this parameter is set and the lock range requested
1328 cannot be immediately satisfied, Samba 2.2 will internally
1329 queue the lock request, and periodically attempt to obtain
1330 the lock until the timeout period expires.</para>
1332 <para>If this parameter is set to <constant>no</constant>, then
1333 Samba 2.2 will behave as previous versions of Samba would and
1334 will fail the lock request immediately if the lock range
1335 cannot be obtained.</para>
1337 <para>Default: <command>blocking locks = yes</command></para>
1339 </listitem>
1340 </varlistentry>
1344 <varlistentry>
1345 <term><anchor id="BROWSABLE">browsable (S)</term>
1346 <listitem><para>See the <link linkend="BROWSEABLE"><parameter>
1347 browseable</parameter></link>.</para></listitem>
1348 </varlistentry>
1352 <varlistentry>
1353 <term><anchor id="BROWSELIST">browse list (G)</term>
1354 <listitem><para>This controls whether <ulink url="smbd.8.html">
1355 <command>smbd(8)</command></ulink> will serve a browse list to
1356 a client doing a <command>NetServerEnum</command> call. Normally
1357 set to <constant>yes</constant>. You should never need to change
1358 this.</para>
1360 <para>Default: <command>browse list = yes</command></para></listitem>
1361 </varlistentry>
1365 <varlistentry>
1366 <term><anchor id="BROWSEABLE">browseable (S)</term>
1367 <listitem><para>This controls whether this share is seen in
1368 the list of available shares in a net view and in the browse list.</para>
1370 <para>Default: <command>browseable = yes</command></para>
1371 </listitem>
1372 </varlistentry>
1376 <varlistentry>
1377 <term><anchor id="CASESENSITIVE">case sensitive (S)</term>
1378 <listitem><para>See the discussion in the section <link
1379 linkend="NAMEMANGLINGSECT">NAME MANGLING</link>.</para>
1381 <para>Default: <command>case sensitive = no</command></para>
1382 </listitem>
1383 </varlistentry>
1387 <varlistentry>
1388 <term><anchor id="CASESIGNAMES">casesignames (S)</term>
1389 <listitem><para>Synonym for <link linkend="CASESENSITIVE">case
1390 sensitive</link>.</para></listitem>
1391 </varlistentry>
1395 <varlistentry>
1396 <term><anchor id="CHANGENOTIFYTIMEOUT">change notify timeout (G)</term>
1397 <listitem><para>This SMB allows a client to tell a server to
1398 "watch" a particular directory for any changes and only reply to
1399 the SMB request when a change has occurred. Such constant scanning of
1400 a directory is expensive under UNIX, hence an <ulink url="smbd.8.html">
1401 <command>smbd(8)</command></ulink> daemon only performs such a scan
1402 on each requested directory once every <parameter>change notify
1403 timeout</parameter> seconds.</para>
1405 <para>Default: <command>change notify timeout = 60</command></para>
1406 <para>Example: <command>change notify timeout = 300</command></para>
1408 <para>Would change the scan time to every 5 minutes.</para></listitem>
1409 </varlistentry>
1413 <varlistentry>
1414 <term><anchor id="CHANGESHARECOMMAND">change share command (G)</term>
1415 <listitem><para>Samba 2.2.0 introduced the ability to dynamically
1416 add and delete shares via the Windows NT 4.0 Server Manager. The
1417 <parameter>change share command</parameter> is used to define an
1418 external program or script which will modify an existing service definition
1419 in <filename>smb.conf</filename>. In order to successfully
1420 execute the <parameter>change share command</parameter>, <command>smbd</command>
1421 requires that the administrator be connected using a root account (i.e.
1422 uid == 0).
1423 </para>
1425 <para>
1426 When executed, <command>smbd</command> will automatically invoke the
1427 <parameter>change share command</parameter> with four parameters.
1428 </para>
1430 <itemizedlist>
1431 <listitem><para><parameter>configFile</parameter> - the location
1432 of the global <filename>smb.conf</filename> file.
1433 </para></listitem>
1435 <listitem><para><parameter>shareName</parameter> - the name of the new
1436 share.
1437 </para></listitem>
1439 <listitem><para><parameter>pathName</parameter> - path to an **existing**
1440 directory on disk.
1441 </para></listitem>
1443 <listitem><para><parameter>comment</parameter> - comment string to associate
1444 with the new share.
1445 </para></listitem>
1446 </itemizedlist>
1448 <para>
1449 This parameter is only used modify existing file shares definitions. To modify
1450 printer shares, use the "Printers..." folder as seen when browsing the Samba host.
1451 </para>
1453 <para>
1454 See also <link linkend="ADDSHARECOMMAND"><parameter>add share
1455 command</parameter></link>, <link linkend="DELETESHARECOMMAND"><parameter>delete
1456 share command</parameter></link>.
1457 </para>
1459 <para>Default: <emphasis>none</emphasis></para>
1460 <para>Example: <command>change share command = /usr/local/bin/addshare</command></para>
1461 </listitem>
1462 </varlistentry>
1466 <varlistentry>
1467 <term><anchor id="CHARACTERSET">character set (G)</term>
1468 <listitem><para>This allows <ulink url="smbd.8.html">smbd</ulink> to map incoming filenames
1469 from a DOS Code page (see the <link linkend="CLIENTCODEPAGE">client
1470 code page</link> parameter) to several built in UNIX character sets.
1471 The built in code page translations are:</para>
1473 <itemizedlist>
1474 <listitem><para><constant>ISO8859-1</constant> : Western European
1475 UNIX character set. The parameter <parameter>client code page</parameter>
1476 <emphasis>MUST</emphasis> be set to code page 850 if the
1477 <parameter>character set</parameter> parameter is set to
1478 <constant>ISO8859-1</constant> in order for the conversion to the
1479 UNIX character set to be done correctly.</para></listitem>
1481 <listitem><para><constant>ISO8859-2</constant> : Eastern European
1482 UNIX character set. The parameter <parameter>client code page
1483 </parameter> <emphasis>MUST</emphasis> be set to code page 852 if
1484 the <parameter> character set</parameter> parameter is set
1485 to <constant>ISO8859-2</constant> in order for the conversion
1486 to the UNIX character set to be done correctly. </para></listitem>
1488 <listitem><para><constant>ISO8859-5</constant> : Russian Cyrillic
1489 UNIX character set. The parameter <parameter>client code page
1490 </parameter> <emphasis>MUST</emphasis> be set to code page
1491 866 if the <parameter>character set </parameter> parameter is
1492 set to <constant>ISO8859-5</constant> in order for the conversion
1493 to the UNIX character set to be done correctly. </para></listitem>
1495 <listitem><para><constant>ISO8859-7</constant> : Greek UNIX
1496 character set. The parameter <parameter>client code page
1497 </parameter> <emphasis>MUST</emphasis> be set to code page
1498 737 if the <parameter>character set</parameter> parameter is
1499 set to <constant>ISO8859-7</constant> in order for the conversion
1500 to the UNIX character set to be done correctly.</para></listitem>
1502 <listitem><para><constant>KOI8-R</constant> : Alternate mapping
1503 for Russian Cyrillic UNIX character set. The parameter
1504 <parameter>client code page</parameter> <emphasis>MUST</emphasis>
1505 be set to code page 866 if the <parameter>character set</parameter>
1506 parameter is set to <constant>KOI8-R</constant> in order for the
1507 conversion to the UNIX character set to be done correctly.</para>
1508 </listitem>
1509 </itemizedlist>
1511 <para><emphasis>BUG</emphasis>. These MSDOS code page to UNIX character
1512 set mappings should be dynamic, like the loading of MS DOS code pages,
1513 not static.</para>
1515 <para>Normally this parameter is not set, meaning no filename
1516 translation is done.</para>
1518 <para>Default: <command>character set = &lt;empty string&gt;</command></para>
1519 <para>Example: <command>character set = ISO8859-1</command></para></listitem>
1520 </varlistentry>
1524 <varlistentry>
1525 <term><anchor id="CLIENTCODEPAGE">client code page (G)</term>
1526 <listitem><para>This parameter specifies the DOS code page
1527 that the clients accessing Samba are using. To determine what code
1528 page a Windows or DOS client is using, open a DOS command prompt
1529 and type the command <command>chcp</command>. This will output
1530 the code page. The default for USA MS-DOS, Windows 95, and
1531 Windows NT releases is code page 437. The default for western
1532 European releases of the above operating systems is code page 850.</para>
1534 <para>This parameter tells <ulink url="smbd.8.html">smbd(8)</ulink>
1535 which of the <filename>codepage.<replaceable>XXX</replaceable>
1536 </filename> files to dynamically load on startup. These files,
1537 described more fully in the manual page <ulink url="make_smbcodepage.1.html">
1538 <command>make_smbcodepage(1)</command></ulink>, tell <command>
1539 smbd</command> how to map lower to upper case characters to provide
1540 the case insensitivity of filenames that Windows clients expect.</para>
1542 <para>Samba currently ships with the following code page files :</para>
1544 <itemizedlist>
1545 <listitem><para>Code Page 437 - MS-DOS Latin US</para></listitem>
1546 <listitem><para>Code Page 737 - Windows '95 Greek</para></listitem>
1547 <listitem><para>Code Page 850 - MS-DOS Latin 1</para></listitem>
1548 <listitem><para>Code Page 852 - MS-DOS Latin 2</para></listitem>
1549 <listitem><para>Code Page 861 - MS-DOS Icelandic</para></listitem>
1550 <listitem><para>Code Page 866 - MS-DOS Cyrillic</para></listitem>
1551 <listitem><para>Code Page 932 - MS-DOS Japanese SJIS</para></listitem>
1552 <listitem><para>Code Page 936 - MS-DOS Simplified Chinese</para></listitem>
1553 <listitem><para>Code Page 949 - MS-DOS Korean Hangul</para></listitem>
1554 <listitem><para>Code Page 950 - MS-DOS Traditional Chinese</para></listitem>
1555 </itemizedlist>
1557 <para>Thus this parameter may have any of the values 437, 737, 850, 852,
1558 861, 932, 936, 949, or 950. If you don't find the codepage you need,
1559 read the comments in one of the other codepage files and the
1560 <command>make_smbcodepage(1)</command> man page and write one. Please
1561 remember to donate it back to the Samba user community.</para>
1563 <para>This parameter co-operates with the <parameter>valid
1564 chars</parameter> parameter in determining what characters are
1565 valid in filenames and how capitalization is done. If you set both
1566 this parameter and the <parameter>valid chars</parameter> parameter
1567 the <parameter>client code page</parameter> parameter
1568 <emphasis>MUST</emphasis> be set before the <parameter>valid
1569 chars</parameter> parameter in the <filename>smb.conf</filename>
1570 file. The <parameter>valid chars</parameter> string will then
1571 augment the character settings in the <parameter>client code page</parameter>
1572 parameter.</para>
1574 <para>If not set, <parameter>client code page</parameter> defaults
1575 to 850.</para>
1577 <para>See also : <link linkend="VALIDCHARS"><parameter>valid
1578 chars</parameter></link>, <link linkend="CODEPAGEDIRECTORY">
1579 <parameter>code page directory</parameter></link></para>
1581 <para>Default: <command>client code page = 850</command></para>
1582 <para>Example: <command>client code page = 936</command></para>
1583 </listitem>
1584 </varlistentry>
1589 <varlistentry>
1590 <term><anchor id="CODEPAGEDIRECTORY">code page directory (G)</term>
1591 <listitem><para>Define the location of the various client code page
1592 files.</para>
1594 <para>See also <link linkend="CLIENTCODEPAGE"><parameter>client
1595 code page</parameter></link></para>
1597 <para>Default: <command>code page directory = ${prefix}/lib/codepages
1598 </command></para>
1599 <para>Example: <command>code page directory = /usr/share/samba/codepages
1600 </command></para>
1601 </listitem>
1602 </varlistentry>
1608 <varlistentry>
1609 <term><anchor id="CODINGSYSTEM">coding system (G)</term>
1610 <listitem><para>This parameter is used to determine how incoming
1611 Shift-JIS Japanese characters are mapped from the incoming <link
1612 linkend="CLIENTCODEPAGE"><parameter>client code page</parameter>
1613 </link> used by the client, into file names in the UNIX filesystem.
1614 Only useful if <parameter>client code page</parameter> is set to
1615 932 (Japanese Shift-JIS). The options are :</para>
1617 <itemizedlist>
1618 <listitem><para><constant>SJIS</constant> - Shift-JIS. Does no
1619 conversion of the incoming filename.</para></listitem>
1621 <listitem><para><constant>JIS8, J8BB, J8BH, J8@B,
1622 J8@J, J8@H </constant> - Convert from incoming Shift-JIS to eight
1623 bit JIS code with different shift-in, shift out codes.</para></listitem>
1625 <listitem><para><constant>JIS7, J7BB, J7BH, J7@B, J7@J,
1626 J7@H </constant> - Convert from incoming Shift-JIS to seven bit
1627 JIS code with different shift-in, shift out codes.</para></listitem>
1629 <listitem><para><constant>JUNET, JUBB, JUBH, JU@B, JU@J, JU@H </constant>
1630 - Convert from incoming Shift-JIS to JUNET code with different shift-in,
1631 shift out codes.</para></listitem>
1633 <listitem><para><constant>EUC</constant> - Convert an incoming
1634 Shift-JIS character to EUC code.</para></listitem>
1636 <listitem><para><constant>HEX</constant> - Convert an incoming
1637 Shift-JIS character to a 3 byte hex representation, i.e.
1638 <constant>:AB</constant>.</para></listitem>
1640 <listitem><para><constant>CAP</constant> - Convert an incoming
1641 Shift-JIS character to the 3 byte hex representation used by
1642 the Columbia AppleTalk Program (CAP), i.e. <constant>:AB</constant>.
1643 This is used for compatibility between Samba and CAP.</para></listitem>
1644 </itemizedlist>
1646 <para>Default: <command>coding system = &lt;empty value&gt;</command>
1647 </para>
1648 </listitem>
1649 </varlistentry>
1653 <varlistentry>
1654 <term><anchor id="COMMENT">comment (S)</term>
1655 <listitem><para>This is a text field that is seen next to a share
1656 when a client does a queries the server, either via the network
1657 neighborhood or via <command>net view</command> to list what shares
1658 are available.</para>
1660 <para>If you want to set the string that is displayed next to the
1661 machine name then see the <link linkend="SERVERSTRING"><parameter>
1662 server string</parameter></link> parameter.</para>
1664 <para>Default: <emphasis>No comment string</emphasis></para>
1665 <para>Example: <command>comment = Fred's Files</command></para></listitem>
1666 </varlistentry>
1670 <varlistentry>
1671 <term><anchor id="CONFIGFILE">config file (G)</term>
1672 <listitem><para>This allows you to override the config file
1673 to use, instead of the default (usually <filename>smb.conf</filename>).
1674 There is a chicken and egg problem here as this option is set
1675 in the config file!</para>
1677 <para>For this reason, if the name of the config file has changed
1678 when the parameters are loaded then it will reload them from
1679 the new config file.</para>
1681 <para>This option takes the usual substitutions, which can
1682 be very useful.</para>
1684 <para>If the config file doesn't exist then it won't be loaded
1685 (allowing you to special case the config files of just a few
1686 clients).</para>
1688 <para>Example: <command>config file = /usr/local/samba/lib/smb.conf.%m
1689 </command></para></listitem>
1690 </varlistentry>
1694 <varlistentry>
1695 <term><anchor id="COPY">copy (S)</term>
1696 <listitem><para>This parameter allows you to "clone" service
1697 entries. The specified service is simply duplicated under the
1698 current service's name. Any parameters specified in the current
1699 section will override those in the section being copied.</para>
1701 <para>This feature lets you set up a 'template' service and
1702 create similar services easily. Note that the service being
1703 copied must occur earlier in the configuration file than the
1704 service doing the copying.</para>
1706 <para>Default: <emphasis>no value</emphasis></para>
1707 <para>Example: <command>copy = otherservice</command></para></listitem>
1708 </varlistentry>
1712 <varlistentry>
1713 <term><anchor id="CREATEMASK">create mask (S)</term>
1714 <listitem><para>A synonym for this parameter is
1715 <link linkend="CREATEMODE"><parameter>create mode</parameter>
1716 </link>.</para>
1718 <para>When a file is created, the necessary permissions are
1719 calculated according to the mapping from DOS modes to UNIX
1720 permissions, and the resulting UNIX mode is then bit-wise 'AND'ed
1721 with this parameter. This parameter may be thought of as a bit-wise
1722 MASK for the UNIX modes of a file. Any bit <emphasis>not</emphasis>
1723 set here will be removed from the modes set on a file when it is
1724 created.</para>
1726 <para>The default value of this parameter removes the
1727 'group' and 'other' write and execute bits from the UNIX modes.</para>
1729 <para>Following this Samba will bit-wise 'OR' the UNIX mode created
1730 from this parameter with the value of the <link
1731 linkend="FORCECREATEMODE"><parameter>force create mode</parameter></link>
1732 parameter which is set to 000 by default.</para>
1734 <para>This parameter does not affect directory modes. See the
1735 parameter <link linkend="DIRECTORYMODE"><parameter>directory mode
1736 </parameter></link> for details.</para>
1738 <para>See also the <link linkend="FORCECREATEMODE"><parameter>force
1739 create mode</parameter></link> parameter for forcing particular mode
1740 bits to be set on created files. See also the <link linkend="DIRECTORYMODE">
1741 <parameter>directory mode</parameter></link> parameter for masking
1742 mode bits on created directories. See also the <link linkend="INHERITPERMISSIONS">
1743 <parameter>inherit permissions</parameter></link> parameter.</para>
1745 <para>Note that this parameter does not apply to permissions
1746 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
1747 a mask on access control lists also, they need to set the <link
1748 linkend="SECURITYMASK"><parameter>security mask</parameter></link>.</para>
1750 <para>Default: <command>create mask = 0744</command></para>
1751 <para>Example: <command>create mask = 0775</command></para></listitem>
1752 </varlistentry>
1756 <varlistentry>
1757 <term><anchor id="CREATEMODE">create mode (S)</term>
1758 <listitem><para>This is a synonym for <link linkend="CREATEMASK"><parameter>
1759 create mask</parameter></link>.</para></listitem>
1760 </varlistentry>
1763 <varlistentry>
1764 <term><anchor id="CSCPOLICY">csc policy (S)</term>
1765 <listitem><para>This stands for <emphasis>client-side caching
1766 policy</emphasis>, and specifies how clients capable of offline
1767 caching will cache the files in the share. The valid values
1768 are: manual, documents, programs, disable.</para>
1770 <para>These values correspond to those used on Windows
1771 servers.</para>
1773 <para>For example, shares containing roaming profiles can have
1774 offline caching disabled using <command>csc policy = disable
1775 </command>.</para>
1777 <para>Default: <command>csc policy = manual</command></para>
1778 <para>Example: <command>csc policy = programs</command></para>
1779 </listitem>
1780 </varlistentry>
1782 <varlistentry>
1783 <term><anchor id="DEADTIME">deadtime (G)</term>
1784 <listitem><para>The value of the parameter (a decimal integer)
1785 represents the number of minutes of inactivity before a connection
1786 is considered dead, and it is disconnected. The deadtime only takes
1787 effect if the number of open files is zero.</para>
1789 <para>This is useful to stop a server's resources being
1790 exhausted by a large number of inactive connections.</para>
1792 <para>Most clients have an auto-reconnect feature when a
1793 connection is broken so in most cases this parameter should be
1794 transparent to users.</para>
1796 <para>Using this parameter with a timeout of a few minutes
1797 is recommended for most systems.</para>
1799 <para>A deadtime of zero indicates that no auto-disconnection
1800 should be performed.</para>
1802 <para>Default: <command>deadtime = 0</command></para>
1803 <para>Example: <command>deadtime = 15</command></para></listitem>
1804 </varlistentry>
1808 <varlistentry>
1809 <term><anchor id="DEBUGHIRESTIMESTAMP">debug hires timestamp (G)</term>
1810 <listitem><para>Sometimes the timestamps in the log messages
1811 are needed with a resolution of higher that seconds, this
1812 boolean parameter adds microsecond resolution to the timestamp
1813 message header when turned on.</para>
1815 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter>
1816 debug timestamp</parameter></link> must be on for this to have an
1817 effect.</para>
1819 <para>Default: <command>debug hires timestamp = no</command></para>
1820 </listitem>
1821 </varlistentry>
1825 <varlistentry>
1826 <term><anchor id="DEBUGPID">debug pid (G)</term>
1827 <listitem><para>When using only one log file for more then one
1828 forked <ulink url="smbd.8.html">smbd</ulink>-process there may be hard to follow which process
1829 outputs which message. This boolean parameter is adds the process-id
1830 to the timestamp message headers in the logfile when turned on.</para>
1832 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter>
1833 debug timestamp</parameter></link> must be on for this to have an
1834 effect.</para>
1836 <para>Default: <command>debug pid = no</command></para></listitem>
1837 </varlistentry>
1840 <varlistentry>
1841 <term><anchor id="DEBUGTIMESTAMP">debug timestamp (G)</term>
1842 <listitem><para>Samba 2.2 debug log messages are timestamped
1843 by default. If you are running at a high <link linkend="DEBUGLEVEL">
1844 <parameter>debug level</parameter></link> these timestamps
1845 can be distracting. This boolean parameter allows timestamping
1846 to be turned off.</para>
1848 <para>Default: <command>debug timestamp = yes</command></para></listitem>
1849 </varlistentry>
1853 <varlistentry>
1854 <term><anchor id="DEBUGUID">debug uid (G)</term>
1855 <listitem><para>Samba is sometimes run as root and sometime
1856 run as the connected user, this boolean parameter inserts the
1857 current euid, egid, uid and gid to the timestamp message headers
1858 in the log file if turned on.</para>
1860 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter>
1861 debug timestamp</parameter></link> must be on for this to have an
1862 effect.</para>
1864 <para>Default: <command>debug uid = no</command></para></listitem>
1865 </varlistentry>
1869 <varlistentry>
1870 <term><anchor id="DEBUGLEVEL">debuglevel (G)</term>
1871 <listitem><para>Synonym for <link linkend="LOGLEVEL"><parameter>
1872 log level</parameter></link>.</para>
1873 </listitem>
1874 </varlistentry>
1878 <varlistentry>
1879 <term><anchor id="DEFAULT">default (G)</term>
1880 <listitem><para>A synonym for <link linkend="DEFAULTSERVICE"><parameter>
1881 default service</parameter></link>.</para></listitem>
1882 </varlistentry>
1886 <varlistentry>
1887 <term><anchor id="DEFAULTCASE">default case (S)</term>
1888 <listitem><para>See the section on <link linkend="NAMEMANGLINGSECT">
1889 NAME MANGLING</link>. Also note the <link linkend="SHORTPRESERVECASE">
1890 <parameter>short preserve case</parameter></link> parameter.</para>
1892 <para>Default: <command>default case = lower</command></para>
1893 </listitem>
1894 </varlistentry>
1898 <varlistentry>
1899 <term><anchor id="DEFAULTDEVMODE">default devmode (S)</term>
1900 <listitem><para>This parameter is only applicable to <link
1901 linkend="PRINTOK">printable</link> services. When smbd is serving
1902 Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba
1903 server has a Device Mode which defines things such as paper size and
1904 orientation and duplex settings. The device mode can only correctly be
1905 generated by the printer driver itself (which can only be executed on a
1906 Win32 platform). Because smbd is unable to execute the driver code
1907 to generate the device mode, the default behavior is to set this field
1908 to NULL.
1909 </para>
1911 <para>Most problems with serving printer drivers to Windows NT/2k/XP clients
1912 can be traced to a problem with the generated device mode. Certain drivers
1913 will do things such as crashing the client's Explorer.exe with a NULL devmode.
1914 However, other printer drivers can cause the client's spooler service
1915 (spoolsv.exe) to die if the devmode was not created by the driver itself
1916 (i.e. smbd generates a default devmode).
1917 </para>
1919 <para>This parameter should be used with care and tested with the printer
1920 driver in question. It is better to leave the device mode to NULL
1921 and let the Windows client set the correct values. Because drivers do not
1922 do this all the time, setting <command>default devmode = yes</command>
1923 will instruct smbd to generate a default one.
1924 </para>
1926 <para>For more information on Windows NT/2k printing and Device Modes,
1927 see the <ulink url="http://msdn.microsoft.com/">MSDN documentation</ulink>.
1928 </para>
1930 <para>Default: <command>default devmode = no</command></para>
1931 </listitem>
1932 </varlistentry>
1936 <varlistentry>
1937 <term><anchor id="DEFAULTSERVICE">default service (G)</term>
1938 <listitem><para>This parameter specifies the name of a service
1939 which will be connected to if the service actually requested cannot
1940 be found. Note that the square brackets are <emphasis>NOT</emphasis>
1941 given in the parameter value (see example below).</para>
1943 <para>There is no default value for this parameter. If this
1944 parameter is not given, attempting to connect to a nonexistent
1945 service results in an error.</para>
1947 <para>Typically the default service would be a <link linkend="GUESTOK">
1948 <parameter>guest ok</parameter></link>, <link linkend="READONLY">
1949 <parameter>read-only</parameter></link> service.</para>
1951 <para>Also note that the apparent service name will be changed
1952 to equal that of the requested service, this is very useful as it
1953 allows you to use macros like <parameter>%S</parameter> to make
1954 a wildcard service.</para>
1956 <para>Note also that any "_" characters in the name of the service
1957 used in the default service will get mapped to a "/". This allows for
1958 interesting things.</para>
1961 <para>Example:</para>
1963 <para><programlisting>
1964 [global]
1965 default service = pub
1967 [pub]
1968 path = /%S
1969 </programlisting></para>
1970 </listitem>
1971 </varlistentry>
1975 <varlistentry>
1976 <term><anchor id="DELETEPRINTERCOMMAND">delete printer command (G)</term>
1977 <listitem><para>With the introduction of MS-RPC based printer
1978 support for Windows NT/2000 clients in Samba 2.2, it is now
1979 possible to delete printer at run time by issuing the
1980 DeletePrinter() RPC call.</para>
1982 <para>For a Samba host this means that the printer must be
1983 physically deleted from underlying printing system. The <parameter>
1984 deleteprinter command</parameter> defines a script to be run which
1985 will perform the necessary operations for removing the printer
1986 from the print system and from <filename>smb.conf</filename>.
1987 </para>
1989 <para>The <parameter>delete printer command</parameter> is
1990 automatically called with only one parameter: <parameter>
1991 "printer name"</parameter>.</para>
1994 <para>Once the <parameter>delete printer command</parameter> has
1995 been executed, <command>smbd</command> will reparse the <filename>
1996 smb.conf</filename> to associated printer no longer exists.
1997 If the sharename is still valid, then <command>smbd
1998 </command> will return an ACCESS_DENIED error to the client.</para>
2000 <para>See also <link linkend="ADDPRINTERCOMMAND"><parameter>
2001 add printer command</parameter></link>, <link
2002 linkend="printing"><parameter>printing</parameter></link>,
2003 <link linkend="SHOWADDPRINTERWIZARD"><parameter>show add
2004 printer wizard</parameter></link></para>
2006 <para>Default: <emphasis>none</emphasis></para>
2007 <para>Example: <command>deleteprinter command = /usr/bin/removeprinter
2008 </command></para>
2009 </listitem>
2010 </varlistentry>
2017 <varlistentry>
2018 <term><anchor id="DELETEREADONLY">delete readonly (S)</term>
2019 <listitem><para>This parameter allows readonly files to be deleted.
2020 This is not normal DOS semantics, but is allowed by UNIX.</para>
2022 <para>This option may be useful for running applications such
2023 as rcs, where UNIX file ownership prevents changing file
2024 permissions, and DOS semantics prevent deletion of a read only file.</para>
2026 <para>Default: <command>delete readonly = no</command></para></listitem>
2027 </varlistentry>
2031 <varlistentry>
2032 <term><anchor id="DELETESHARECOMMAND">delete share command (G)</term>
2033 <listitem><para>Samba 2.2.0 introduced the ability to dynamically
2034 add and delete shares via the Windows NT 4.0 Server Manager. The
2035 <parameter>delete share command</parameter> is used to define an
2036 external program or script which will remove an existing service
2037 definition from <filename>smb.conf</filename>. In order to successfully
2038 execute the <parameter>delete share command</parameter>, <command>smbd</command>
2039 requires that the administrator be connected using a root account (i.e.
2040 uid == 0).
2041 </para>
2043 <para>
2044 When executed, <command>smbd</command> will automatically invoke the
2045 <parameter>delete share command</parameter> with two parameters.
2046 </para>
2048 <itemizedlist>
2049 <listitem><para><parameter>configFile</parameter> - the location
2050 of the global <filename>smb.conf</filename> file.
2051 </para></listitem>
2053 <listitem><para><parameter>shareName</parameter> - the name of
2054 the existing service.
2055 </para></listitem>
2056 </itemizedlist>
2058 <para>
2059 This parameter is only used to remove file shares. To delete printer shares,
2060 see the <link linkend="DELETEPRINTERCOMMAND"><parameter>delete printer
2061 command</parameter></link>.
2062 </para>
2064 <para>
2065 See also <link linkend="ADDSHARECOMMAND"><parameter>add share
2066 command</parameter></link>, <link linkend="CHANGESHARECOMMAND"><parameter>change
2067 share command</parameter></link>.
2068 </para>
2070 <para>Default: <emphasis>none</emphasis></para>
2071 <para>Example: <command>delete share command = /usr/local/bin/delshare</command></para>
2073 </listitem>
2074 </varlistentry>
2079 <varlistentry>
2080 <term><anchor id="DELETEUSERSCRIPT">delete user script (G)</term>
2081 <listitem><para>This is the full pathname to a script that will
2082 be run <emphasis>AS ROOT</emphasis> by <ulink url="smbd.8.html">
2083 <command>smbd(8)</command></ulink> under special circumstances
2084 described below.</para>
2086 <para>Normally, a Samba server requires that UNIX users are
2087 created for all users accessing files on this server. For sites
2088 that use Windows NT account databases as their primary user database
2089 creating these users and keeping the user list in sync with the
2090 Windows NT PDC is an onerous task. This option allows <command>
2091 smbd</command> to delete the required UNIX users <emphasis>ON
2092 DEMAND</emphasis> when a user accesses the Samba server and the
2093 Windows NT user no longer exists.</para>
2095 <para>In order to use this option, <command>smbd</command> must be
2096 set to <parameter>security = domain</parameter> or <parameter>security =
2097 user</parameter> and <parameter>delete user script</parameter>
2098 must be set to a full pathname for a script
2099 that will delete a UNIX user given one argument of <parameter>%u</parameter>,
2100 which expands into the UNIX user name to delete.</para>
2102 <para>When the Windows user attempts to access the Samba server,
2103 at <emphasis>login</emphasis> (session setup in the SMB protocol)
2104 time, <command>smbd</command> contacts the <link linkend="PASSWORDSERVER">
2105 <parameter>password server</parameter></link> and attempts to authenticate
2106 the given user with the given password. If the authentication fails
2107 with the specific Domain error code meaning that the user no longer
2108 exists then <command>smbd</command> attempts to find a UNIX user in
2109 the UNIX password database that matches the Windows user account. If
2110 this lookup succeeds, and <parameter>delete user script</parameter> is
2111 set then <command>smbd</command> will all the specified script
2112 <emphasis>AS ROOT</emphasis>, expanding any <parameter>%u</parameter>
2113 argument to be the user name to delete.</para>
2115 <para>This script should delete the given UNIX username. In this way,
2116 UNIX users are dynamically deleted to match existing Windows NT
2117 accounts.</para>
2119 <para>See also <link linkend="SECURITYEQUALSDOMAIN">security = domain</link>,
2120 <link linkend="PASSWORDSERVER"><parameter>password server</parameter>
2121 </link>, <link linkend="ADDUSERSCRIPT"><parameter>add user script</parameter>
2122 </link>.</para>
2124 <para>Default: <command>delete user script = &lt;empty string&gt;
2125 </command></para>
2126 <para>Example: <command>delete user script = /usr/local/samba/bin/del_user
2127 %u</command></para></listitem>
2128 </varlistentry>
2134 <varlistentry>
2135 <term><anchor id="DELETEVETOFILES">delete veto files (S)</term>
2136 <listitem><para>This option is used when Samba is attempting to
2137 delete a directory that contains one or more vetoed directories
2138 (see the <link linkend="VETOFILES"><parameter>veto files</parameter></link>
2139 option). If this option is set to <constant>no</constant> (the default) then if a vetoed
2140 directory contains any non-vetoed files or directories then the
2141 directory delete will fail. This is usually what you want.</para>
2143 <para>If this option is set to <constant>yes</constant>, then Samba
2144 will attempt to recursively delete any files and directories within
2145 the vetoed directory. This can be useful for integration with file
2146 serving systems such as NetAtalk which create meta-files within
2147 directories you might normally veto DOS/Windows users from seeing
2148 (e.g. <filename>.AppleDouble</filename>)</para>
2150 <para>Setting <command>delete veto files = yes</command> allows these
2151 directories to be transparently deleted when the parent directory
2152 is deleted (so long as the user has permissions to do so).</para>
2154 <para>See also the <link linkend="VETOFILES"><parameter>veto
2155 files</parameter></link> parameter.</para>
2157 <para>Default: <command>delete veto files = no</command></para></listitem>
2158 </varlistentry>
2163 <varlistentry>
2164 <term><anchor id="DENYHOSTS">deny hosts (S)</term>
2165 <listitem><para>Synonym for <link linkend="HOSTSDENY"><parameter>hosts
2166 deny</parameter></link>.</para></listitem>
2167 </varlistentry>
2172 <varlistentry>
2173 <term><anchor id="DFREECOMMAND">dfree command (G)</term>
2174 <listitem><para>The <parameter>dfree command</parameter> setting should
2175 only be used on systems where a problem occurs with the internal
2176 disk space calculations. This has been known to happen with Ultrix,
2177 but may occur with other operating systems. The symptom that was
2178 seen was an error of "Abort Retry Ignore" at the end of each
2179 directory listing.</para>
2181 <para>This setting allows the replacement of the internal routines to
2182 calculate the total disk space and amount available with an external
2183 routine. The example below gives a possible script that might fulfill
2184 this function.</para>
2186 <para>The external program will be passed a single parameter indicating
2187 a directory in the filesystem being queried. This will typically consist
2188 of the string <filename>./</filename>. The script should return two
2189 integers in ASCII. The first should be the total disk space in blocks,
2190 and the second should be the number of available blocks. An optional
2191 third return value can give the block size in bytes. The default
2192 blocksize is 1024 bytes.</para>
2194 <para>Note: Your script should <emphasis>NOT</emphasis> be setuid or
2195 setgid and should be owned by (and writeable only by) root!</para>
2197 <para>Default: <emphasis>By default internal routines for
2198 determining the disk capacity and remaining space will be used.
2199 </emphasis></para>
2201 <para>Example: <command>dfree command = /usr/local/samba/bin/dfree
2202 </command></para>
2204 <para>Where the script dfree (which must be made executable) could be:</para>
2206 <para><programlisting>
2207 #!/bin/sh
2208 df $1 | tail -1 | awk '{print $2" "$4}'
2209 </programlisting></para>
2211 <para>or perhaps (on Sys V based systems):</para>
2213 <para><programlisting>
2214 #!/bin/sh
2215 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
2216 </programlisting></para>
2218 <para>Note that you may have to replace the command names
2219 with full path names on some systems.</para>
2220 </listitem>
2221 </varlistentry>
2226 <varlistentry>
2227 <term><anchor id="DIRECTORY">directory (S)</term>
2228 <listitem><para>Synonym for <link linkend="PATH"><parameter>path
2229 </parameter></link>.</para></listitem>
2230 </varlistentry>
2234 <varlistentry>
2235 <term><anchor id="DIRECTORYMASK">directory mask (S)</term>
2236 <listitem><para>This parameter is the octal modes which are
2237 used when converting DOS modes to UNIX modes when creating UNIX
2238 directories.</para>
2240 <para>When a directory is created, the necessary permissions are
2241 calculated according to the mapping from DOS modes to UNIX permissions,
2242 and the resulting UNIX mode is then bit-wise 'AND'ed with this
2243 parameter. This parameter may be thought of as a bit-wise MASK for
2244 the UNIX modes of a directory. Any bit <emphasis>not</emphasis> set
2245 here will be removed from the modes set on a directory when it is
2246 created.</para>
2248 <para>The default value of this parameter removes the 'group'
2249 and 'other' write bits from the UNIX mode, allowing only the
2250 user who owns the directory to modify it.</para>
2252 <para>Following this Samba will bit-wise 'OR' the UNIX mode
2253 created from this parameter with the value of the <link
2254 linkend="FORCEDIRECTORYMODE"><parameter>force directory mode
2255 </parameter></link> parameter. This parameter is set to 000 by
2256 default (i.e. no extra mode bits are added).</para>
2258 <para>Note that this parameter does not apply to permissions
2259 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
2260 a mask on access control lists also, they need to set the <link
2261 linkend="DIRECTORYSECURITYMASK"><parameter>directory security mask</parameter></link>.</para>
2263 <para>See the <link linkend="FORCEDIRECTORYMODE"><parameter>force
2264 directory mode</parameter></link> parameter to cause particular mode
2265 bits to always be set on created directories.</para>
2267 <para>See also the <link linkend="CREATEMODE"><parameter>create mode
2268 </parameter></link> parameter for masking mode bits on created files,
2269 and the <link linkend="DIRECTORYSECURITYMASK"><parameter>directory
2270 security mask</parameter></link> parameter.</para>
2272 <para>Also refer to the <link linkend="INHERITPERMISSIONS"><parameter>
2273 inherit permissions</parameter></link> parameter.</para>
2275 <para>Default: <command>directory mask = 0755</command></para>
2276 <para>Example: <command>directory mask = 0775</command></para>
2277 </listitem>
2278 </varlistentry>
2282 <varlistentry>
2283 <term><anchor id="DIRECTORYMODE">directory mode (S)</term>
2284 <listitem><para>Synonym for <link linkend="DIRECTORYMASK"><parameter>
2285 directory mask</parameter></link></para></listitem>
2286 </varlistentry>
2290 <varlistentry>
2291 <term><anchor id="DIRECTORYSECURITYMASK">directory security mask (S)</term>
2292 <listitem><para>This parameter controls what UNIX permission bits
2293 can be modified when a Windows NT client is manipulating the UNIX
2294 permission on a directory using the native NT security dialog
2295 box.</para>
2297 <para>This parameter is applied as a mask (AND'ed with) to
2298 the changed permission bits, thus preventing any bits not in
2299 this mask from being modified. Essentially, zero bits in this
2300 mask may be treated as a set of bits the user is not allowed
2301 to change.</para>
2303 <para>If not set explicitly this parameter is set to 0777
2304 meaning a user is allowed to modify all the user/group/world
2305 permissions on a directory.</para>
2307 <para><emphasis>Note</emphasis> that users who can access the
2308 Samba server through other means can easily bypass this restriction,
2309 so it is primarily useful for standalone "appliance" systems.
2310 Administrators of most normal systems will probably want to leave
2311 it as the default of <constant>0777</constant>.</para>
2313 <para>See also the <link linkend="FORCEDIRECTORYSECURITYMODE"><parameter>
2314 force directory security mode</parameter></link>, <link
2315 linkend="SECURITYMASK"><parameter>security mask</parameter></link>,
2316 <link linkend="FORCESECURITYMODE"><parameter>force security mode
2317 </parameter></link> parameters.</para>
2319 <para>Default: <command>directory security mask = 0777</command></para>
2320 <para>Example: <command>directory security mask = 0700</command></para>
2321 </listitem>
2322 </varlistentry>
2326 <varlistentry>
2327 <term><anchor id="DISABLESPOOLSS">disable spoolss (G)</term>
2328 <listitem><para>Enabling this parameter will disables Samba's support
2329 for the SPOOLSS set of MS-RPC's and will yield identical behavior
2330 as Samba 2.0.x. Windows NT/2000 clients will downgrade to using
2331 Lanman style printing commands. Windows 9x/ME will be uneffected by
2332 the parameter. However, this will also disable the ability to upload
2333 printer drivers to a Samba server via the Windows NT Add Printer
2334 Wizard or by using the NT printer properties dialog window. It will
2335 also disable the capability of Windows NT/2000 clients to download
2336 print drivers from the Samba host upon demand.
2337 <emphasis>Be very careful about enabling this parameter.</emphasis>
2338 </para>
2340 <para>See also <link linkend="USECLIENTDRIVER">use client driver</link>
2341 </para>
2343 <para>Default : <command>disable spoolss = no</command></para>
2344 </listitem>
2345 </varlistentry>
2349 <varlistentry>
2350 <term><anchor id="DNSPROXY">dns proxy (G)</term>
2351 <listitem><para>Specifies that <ulink url="nmbd.8.html">nmbd(8)</ulink>
2352 when acting as a WINS server and finding that a NetBIOS name has not
2353 been registered, should treat the NetBIOS name word-for-word as a DNS
2354 name and do a lookup with the DNS server for that name on behalf of
2355 the name-querying client.</para>
2357 <para>Note that the maximum length for a NetBIOS name is 15
2358 characters, so the DNS name (or DNS alias) can likewise only be
2359 15 characters, maximum.</para>
2361 <para><command>nmbd</command> spawns a second copy of itself to do the
2362 DNS name lookup requests, as doing a name lookup is a blocking
2363 action.</para>
2365 <para>See also the parameter <link linkend="WINSSUPPORT"><parameter>
2366 wins support</parameter></link>.</para>
2368 <para>Default: <command>dns proxy = yes</command></para></listitem>
2369 </varlistentry>
2373 <varlistentry>
2374 <term><anchor id="DOMAINADMINGROUP">domain admin group (G)</term>
2375 <listitem><para>This parameter is intended as a temporary solution
2376 to enable users to be a member of the "Domain Admins" group when
2377 a Samba host is acting as a PDC. A complete solution will be provided
2378 by a system for mapping Windows NT/2000 groups onto UNIX groups.
2379 Please note that this parameter has a somewhat confusing name. It
2380 accepts a list of usernames and of group names in standard
2381 <filename>smb.conf</filename> notation.
2382 </para>
2384 <para>See also <link linkend="DOMAINGUESTGROUP"><parameter>domain
2385 guest group</parameter></link>, <link linkend="DOMAINLOGONS"><parameter>domain
2386 logons</parameter></link>
2387 </para>
2389 <para>Default: <emphasis>no domain administrators</emphasis></para>
2390 <para>Example: <command>domain admin group = root @wheel</command></para>
2391 </listitem>
2392 </varlistentry>
2397 <varlistentry>
2398 <term><anchor id="DOMAINGUESTGROUP">domain guest group (G)</term>
2399 <listitem><para>This parameter is intended as a temporary solution
2400 to enable users to be a member of the "Domain Guests" group when
2401 a Samba host is acting as a PDC. A complete solution will be provided
2402 by a system for mapping Windows NT/2000 groups onto UNIX groups.
2403 Please note that this parameter has a somewhat confusing name. It
2404 accepts a list of usernames and of group names in standard
2405 <filename>smb.conf</filename> notation.
2406 </para>
2408 <para>See also <link linkend="DOMAINADMINGROUP"><parameter>domain
2409 admin group</parameter></link>, <link linkend="DOMAINLOGONS"><parameter>domain
2410 logons</parameter></link>
2411 </para>
2413 <para>Default: <emphasis>no domain guests</emphasis></para>
2414 <para>Example: <command>domain guest group = nobody @guest</command></para>
2415 </listitem>
2416 </varlistentry>
2419 <varlistentry>
2420 <term><anchor id="DOMAINLOGONS">domain logons (G)</term>
2421 <listitem><para>If set to <constant>yes</constant>, the Samba server will serve
2422 Windows 95/98 Domain logons for the <link linkend="WORKGROUP">
2423 <parameter>workgroup</parameter></link> it is in. Samba 2.2 also
2424 has limited capability to act as a domain controller for Windows
2425 NT 4 Domains. For more details on setting up this feature see
2426 the Samba-PDC-HOWTO included in the <filename>htmldocs/</filename>
2427 directory shipped with the source code.</para>
2429 <para>Default: <command>domain logons = no</command></para></listitem>
2430 </varlistentry>
2434 <varlistentry>
2435 <term><anchor id="DOMAINMASTER">domain master (G)</term>
2436 <listitem><para>Tell <ulink url="nmbd.8.html"><command>
2437 nmbd(8)</command></ulink> to enable WAN-wide browse list
2438 collation. Setting this option causes <command>nmbd</command> to
2439 claim a special domain specific NetBIOS name that identifies
2440 it as a domain master browser for its given <link linkend="WORKGROUP">
2441 <parameter>workgroup</parameter></link>. Local master browsers
2442 in the same <parameter>workgroup</parameter> on broadcast-isolated
2443 subnets will give this <command>nmbd</command> their local browse lists,
2444 and then ask <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
2445 for a complete copy of the browse list for the whole wide area
2446 network. Browser clients will then contact their local master browser,
2447 and will receive the domain-wide browse list, instead of just the list
2448 for their broadcast-isolated subnet.</para>
2450 <para>Note that Windows NT Primary Domain Controllers expect to be
2451 able to claim this <parameter>workgroup</parameter> specific special
2452 NetBIOS name that identifies them as domain master browsers for
2453 that <parameter>workgroup</parameter> by default (i.e. there is no
2454 way to prevent a Windows NT PDC from attempting to do this). This
2455 means that if this parameter is set and <command>nmbd</command> claims
2456 the special name for a <parameter>workgroup</parameter> before a Windows
2457 NT PDC is able to do so then cross subnet browsing will behave
2458 strangely and may fail.</para>
2460 <para>If <link linkend="DOMAINLOGONS"><command>domain logons = yes</command>
2461 </link>, then the default behavior is to enable the <parameter>domain
2462 master</parameter> parameter. If <parameter>domain logons</parameter> is
2463 not enabled (the default setting), then neither will <parameter>domain
2464 master</parameter> be enabled by default.</para>
2466 <para>Default: <command>domain master = auto</command></para></listitem>
2467 </varlistentry>
2472 <varlistentry>
2473 <term><anchor id="DONTDESCEND">dont descend (S)</term>
2474 <listitem><para>There are certain directories on some systems
2475 (e.g., the <filename>/proc</filename> tree under Linux) that are either not
2476 of interest to clients or are infinitely deep (recursive). This
2477 parameter allows you to specify a comma-delimited list of directories
2478 that the server should always show as empty.</para>
2480 <para>Note that Samba can be very fussy about the exact format
2481 of the "dont descend" entries. For example you may need <filename>
2482 ./proc</filename> instead of just <filename>/proc</filename>.
2483 Experimentation is the best policy :-) </para>
2485 <para>Default: <emphasis>none (i.e., all directories are OK
2486 to descend)</emphasis></para>
2487 <para>Example: <command>dont descend = /proc,/dev</command></para>
2488 </listitem>
2489 </varlistentry>
2493 <varlistentry>
2494 <term><anchor id="DOSFILEMODE">dos filemode (S)</term>
2495 <listitem><para> The default behavior in Samba is to provide
2496 UNIX-like behavior where only the owner of a file/directory is
2497 able to change the permissions on it. However, this behavior
2498 is often confusing to DOS/Windows users. Enabling this parameter
2499 allows a user who has write access to the file (by whatever
2500 means) to modify the permissions on it. Note that a user
2501 belonging to the group owning the file will not be allowed to
2502 change permissions if the group is only granted read access.
2503 Ownership of the file/directory is not changed, only the permissions
2504 are modified.</para>
2506 <para>Default: <command>dos filemode = no</command></para>
2507 </listitem>
2508 </varlistentry>
2512 <varlistentry>
2513 <term><anchor id="DOSFILETIMERESOLUTION">dos filetime resolution (S)</term>
2514 <listitem><para>Under the DOS and Windows FAT filesystem, the finest
2515 granularity on time resolution is two seconds. Setting this parameter
2516 for a share causes Samba to round the reported time down to the
2517 nearest two second boundary when a query call that requires one second
2518 resolution is made to <ulink url="smbd.8.html"><command>smbd(8)</command>
2519 </ulink>.</para>
2521 <para>This option is mainly used as a compatibility option for Visual
2522 C++ when used against Samba shares. If oplocks are enabled on a
2523 share, Visual C++ uses two different time reading calls to check if a
2524 file has changed since it was last read. One of these calls uses a
2525 one-second granularity, the other uses a two second granularity. As
2526 the two second call rounds any odd second down, then if the file has a
2527 timestamp of an odd number of seconds then the two timestamps will not
2528 match and Visual C++ will keep reporting the file has changed. Setting
2529 this option causes the two timestamps to match, and Visual C++ is
2530 happy.</para>
2532 <para>Default: <command>dos filetime resolution = no</command></para>
2533 </listitem>
2534 </varlistentry>
2538 <varlistentry>
2539 <term><anchor id="DOSFILETIMES">dos filetimes (S)</term>
2540 <listitem><para>Under DOS and Windows, if a user can write to a
2541 file they can change the timestamp on it. Under POSIX semantics,
2542 only the owner of the file or root may change the timestamp. By
2543 default, Samba runs with POSIX semantics and refuses to change the
2544 timestamp on a file if the user <command>smbd</command> is acting
2545 on behalf of is not the file owner. Setting this option to <constant>
2546 yes</constant> allows DOS semantics and <ulink url="smbd.8.html">smbd</ulink> will change the file
2547 timestamp as DOS requires.</para>
2549 <para>Default: <command>dos filetimes = no</command></para></listitem>
2550 </varlistentry>
2554 <varlistentry>
2555 <term><anchor id="ENCRYPTPASSWORDS">encrypt passwords (G)</term>
2556 <listitem><para>This boolean controls whether encrypted passwords
2557 will be negotiated with the client. Note that Windows NT 4.0 SP3 and
2558 above and also Windows 98 will by default expect encrypted passwords
2559 unless a registry entry is changed. To use encrypted passwords in
2560 Samba see the file ENCRYPTION.txt in the Samba documentation
2561 directory <filename>docs/</filename> shipped with the source code.</para>
2563 <para>In order for encrypted passwords to work correctly
2564 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink> must either
2565 have access to a local <ulink url="smbpasswd.5.html"><filename>smbpasswd(5)
2566 </filename></ulink> file (see the <ulink url="smbpasswd.8.html"><command>
2567 smbpasswd(8)</command></ulink> program for information on how to set up
2568 and maintain this file), or set the <link
2569 linkend="SECURITY">security = [server|domain]</link> parameter which
2570 causes <command>smbd</command> to authenticate against another
2571 server.</para>
2573 <para>Default: <command>encrypt passwords = no</command></para></listitem>
2574 </varlistentry>
2577 <varlistentry>
2578 <term><anchor id="ENHANCEDBROWSING">enhanced browsing (G)</term>
2579 <listitem><para>This option enables a couple of enhancements to
2580 cross-subnet browse propagation that have been added in Samba
2581 but which are not standard in Microsoft implementations.
2582 </para>
2584 <para>The first enhancement to browse propagation consists of a regular
2585 wildcard query to a Samba WINS server for all Domain Master Browsers,
2586 followed by a browse synchronization with each of the returned
2587 DMBs. The second enhancement consists of a regular randomised browse
2588 synchronization with all currently known DMBs.</para>
2590 <para>You may wish to disable this option if you have a problem with empty
2591 workgroups not disappearing from browse lists. Due to the restrictions
2592 of the browse protocols these enhancements can cause a empty workgroup
2593 to stay around forever which can be annoying.</para>
2595 <para>In general you should leave this option enabled as it makes
2596 cross-subnet browse propagation much more reliable.</para>
2598 <para>Default: <command>enhanced browsing = yes</command></para>
2599 </listitem>
2600 </varlistentry>
2603 <varlistentry>
2604 <term><anchor id="ENUMPORTSCOMMAND">enumports command (G)</term>
2605 <listitem><para>The concept of a "port" is fairly foreign
2606 to UNIX hosts. Under Windows NT/2000 print servers, a port
2607 is associated with a port monitor and generally takes the form of
2608 a local port (i.e. LPT1:, COM1:, FILE:) or a remote port
2609 (i.e. LPD Port Monitor, etc...). By default, Samba has only one
2610 port defined--<constant>"Samba Printer Port"</constant>. Under
2611 Windows NT/2000, all printers must have a valid port name.
2612 If you wish to have a list of ports displayed (<command>smbd
2613 </command> does not use a port name for anything) other than
2614 the default <constant>"Samba Printer Port"</constant>, you
2615 can define <parameter>enumports command</parameter> to point to
2616 a program which should generate a list of ports, one per line,
2617 to standard output. This listing will then be used in response
2618 to the level 1 and 2 EnumPorts() RPC.</para>
2620 <para>Default: <emphasis>no enumports command</emphasis></para>
2621 <para>Example: <command>enumports command = /usr/bin/listports
2622 </command></para>
2623 </listitem>
2624 </varlistentry>
2626 <varlistentry>
2627 <term><anchor id="EXEC">exec (S)</term>
2628 <listitem><para>This is a synonym for <link linkend="PREEXEC">
2629 <parameter>preexec</parameter></link>.</para></listitem>
2630 </varlistentry>
2634 <varlistentry>
2635 <term><anchor id="FAKEDIRECTORYCREATETIMES">fake directory create times (S)</term>
2636 <listitem><para>NTFS and Windows VFAT file systems keep a create
2637 time for all files and directories. This is not the same as the
2638 ctime - status change time - that Unix keeps, so Samba by default
2639 reports the earliest of the various times Unix does keep. Setting
2640 this parameter for a share causes Samba to always report midnight
2641 1-1-1980 as the create time for directories.</para>
2643 <para>This option is mainly used as a compatibility option for
2644 Visual C++ when used against Samba shares. Visual C++ generated
2645 makefiles have the object directory as a dependency for each object
2646 file, and a make rule to create the directory. Also, when NMAKE
2647 compares timestamps it uses the creation time when examining a
2648 directory. Thus the object directory will be created if it does not
2649 exist, but once it does exist it will always have an earlier
2650 timestamp than the object files it contains.</para>
2652 <para>However, Unix time semantics mean that the create time
2653 reported by Samba will be updated whenever a file is created or
2654 or deleted in the directory. NMAKE finds all object files in
2655 the object directory. The timestamp of the last one built is then
2656 compared to the timestamp of the object directory. If the
2657 directory's timestamp if newer, then all object files
2658 will be rebuilt. Enabling this option
2659 ensures directories always predate their contents and an NMAKE build
2660 will proceed as expected.</para>
2662 <para>Default: <command>fake directory create times = no</command></para>
2663 </listitem>
2664 </varlistentry>
2668 <varlistentry>
2669 <term><anchor id="FAKEOPLOCKS">fake oplocks (S)</term>
2670 <listitem><para>Oplocks are the way that SMB clients get permission
2671 from a server to locally cache file operations. If a server grants
2672 an oplock (opportunistic lock) then the client is free to assume
2673 that it is the only one accessing the file and it will aggressively
2674 cache file data. With some oplock types the client may even cache
2675 file open/close operations. This can give enormous performance benefits.
2676 </para>
2678 <para>When you set <command>fake oplocks = yes</command>, <ulink
2679 url="smbd.8.html"><command>smbd(8)</command></ulink> will
2680 always grant oplock requests no matter how many clients are using
2681 the file.</para>
2683 <para>It is generally much better to use the real <link
2684 linkend="OPLOCKS"><parameter>oplocks</parameter></link> support rather
2685 than this parameter.</para>
2687 <para>If you enable this option on all read-only shares or
2688 shares that you know will only be accessed from one client at a
2689 time such as physically read-only media like CDROMs, you will see
2690 a big performance improvement on many operations. If you enable
2691 this option on shares where multiple clients may be accessing the
2692 files read-write at the same time you can get data corruption. Use
2693 this option carefully!</para>
2695 <para>Default: <command>fake oplocks = no</command></para></listitem>
2696 </varlistentry>
2700 <varlistentry>
2701 <term><anchor id="FOLLOWSYMLINKS">follow symlinks (S)</term>
2702 <listitem><para>This parameter allows the Samba administrator
2703 to stop <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
2704 from following symbolic links in a particular share. Setting this
2705 parameter to <constant>no</constant> prevents any file or directory
2706 that is a symbolic link from being followed (the user will get an
2707 error). This option is very useful to stop users from adding a
2708 symbolic link to <filename>/etc/passwd</filename> in their home
2709 directory for instance. However it will slow filename lookups
2710 down slightly.</para>
2712 <para>This option is enabled (i.e. <command>smbd</command> will
2713 follow symbolic links) by default.</para>
2715 <para>Default: <command>follow symlinks = yes</command></para></listitem>
2716 </varlistentry>
2720 <varlistentry>
2721 <term><anchor id="FORCECREATEMODE">force create mode (S)</term>
2722 <listitem><para>This parameter specifies a set of UNIX mode bit
2723 permissions that will <emphasis>always</emphasis> be set on a
2724 file created by Samba. This is done by bitwise 'OR'ing these bits onto
2725 the mode bits of a file that is being created or having its
2726 permissions changed. The default for this parameter is (in octal)
2727 000. The modes in this parameter are bitwise 'OR'ed onto the file
2728 mode after the mask set in the <parameter>create mask</parameter>
2729 parameter is applied.</para>
2731 <para>See also the parameter <link linkend="CREATEMASK"><parameter>create
2732 mask</parameter></link> for details on masking mode bits on files.</para>
2734 <para>See also the <link linkend="INHERITPERMISSIONS"><parameter>inherit
2735 permissions</parameter></link> parameter.</para>
2737 <para>Default: <command>force create mode = 000</command></para>
2738 <para>Example: <command>force create mode = 0755</command></para>
2740 <para>would force all created files to have read and execute
2741 permissions set for 'group' and 'other' as well as the
2742 read/write/execute bits set for the 'user'.</para>
2743 </listitem>
2744 </varlistentry>
2748 <varlistentry>
2749 <term><anchor id="FORCEDIRECTORYMODE">force directory mode (S)</term>
2750 <listitem><para>This parameter specifies a set of UNIX mode bit
2751 permissions that will <emphasis>always</emphasis> be set on a directory
2752 created by Samba. This is done by bitwise 'OR'ing these bits onto the
2753 mode bits of a directory that is being created. The default for this
2754 parameter is (in octal) 0000 which will not add any extra permission
2755 bits to a created directory. This operation is done after the mode
2756 mask in the parameter <parameter>directory mask</parameter> is
2757 applied.</para>
2759 <para>See also the parameter <link linkend="DIRECTORYMASK"><parameter>
2760 directory mask</parameter></link> for details on masking mode bits
2761 on created directories.</para>
2763 <para>See also the <link linkend="INHERITPERMISSIONS"><parameter>
2764 inherit permissions</parameter></link> parameter.</para>
2766 <para>Default: <command>force directory mode = 000</command></para>
2767 <para>Example: <command>force directory mode = 0755</command></para>
2769 <para>would force all created directories to have read and execute
2770 permissions set for 'group' and 'other' as well as the
2771 read/write/execute bits set for the 'user'.</para>
2772 </listitem>
2773 </varlistentry>
2777 <varlistentry>
2778 <term><anchor id="FORCEDIRECTORYSECURITYMODE">force directory
2779 security mode (S)</term>
2780 <listitem><para>This parameter controls what UNIX permission bits
2781 can be modified when a Windows NT client is manipulating the UNIX
2782 permission on a directory using the native NT security dialog box.</para>
2784 <para>This parameter is applied as a mask (OR'ed with) to the
2785 changed permission bits, thus forcing any bits in this mask that
2786 the user may have modified to be on. Essentially, one bits in this
2787 mask may be treated as a set of bits that, when modifying security
2788 on a directory, the user has always set to be 'on'.</para>
2790 <para>If not set explicitly this parameter is 000, which
2791 allows a user to modify all the user/group/world permissions on a
2792 directory without restrictions.</para>
2794 <para><emphasis>Note</emphasis> that users who can access the
2795 Samba server through other means can easily bypass this restriction,
2796 so it is primarily useful for standalone "appliance" systems.
2797 Administrators of most normal systems will probably want to leave
2798 it set as 0000.</para>
2800 <para>See also the <link linkend="DIRECTORYSECURITYMASK"><parameter>
2801 directory security mask</parameter></link>, <link linkend="SECURITYMASK">
2802 <parameter>security mask</parameter></link>,
2803 <link linkend="FORCESECURITYMODE"><parameter>force security mode
2804 </parameter></link> parameters.</para>
2806 <para>Default: <command>force directory security mode = 0</command></para>
2807 <para>Example: <command>force directory security mode = 700</command></para>
2808 </listitem>
2809 </varlistentry>
2814 <varlistentry>
2815 <term><anchor id="FORCEGROUP">force group (S)</term>
2816 <listitem><para>This specifies a UNIX group name that will be
2817 assigned as the default primary group for all users connecting
2818 to this service. This is useful for sharing files by ensuring
2819 that all access to files on service will use the named group for
2820 their permissions checking. Thus, by assigning permissions for this
2821 group to the files and directories within this service the Samba
2822 administrator can restrict or allow sharing of these files.</para>
2824 <para>In Samba 2.0.5 and above this parameter has extended
2825 functionality in the following way. If the group name listed here
2826 has a '+' character prepended to it then the current user accessing
2827 the share only has the primary group default assigned to this group
2828 if they are already assigned as a member of that group. This allows
2829 an administrator to decide that only users who are already in a
2830 particular group will create files with group ownership set to that
2831 group. This gives a finer granularity of ownership assignment. For
2832 example, the setting <filename>force group = +sys</filename> means
2833 that only users who are already in group sys will have their default
2834 primary group assigned to sys when accessing this Samba share. All
2835 other users will retain their ordinary primary group.</para>
2837 <para>If the <link linkend="FORCEUSER"><parameter>force user
2838 </parameter></link> parameter is also set the group specified in
2839 <parameter>force group</parameter> will override the primary group
2840 set in <parameter>force user</parameter>.</para>
2842 <para>See also <link linkend="FORCEUSER"><parameter>force
2843 user</parameter></link>.</para>
2845 <para>Default: <emphasis>no forced group</emphasis></para>
2846 <para>Example: <command>force group = agroup</command></para>
2847 </listitem>
2848 </varlistentry>
2852 <varlistentry>
2853 <term><anchor id="FORCESECURITYMODE">force security mode (S)</term>
2854 <listitem><para>This parameter controls what UNIX permission
2855 bits can be modified when a Windows NT client is manipulating
2856 the UNIX permission on a file using the native NT security dialog
2857 box.</para>
2859 <para>This parameter is applied as a mask (OR'ed with) to the
2860 changed permission bits, thus forcing any bits in this mask that
2861 the user may have modified to be on. Essentially, one bits in this
2862 mask may be treated as a set of bits that, when modifying security
2863 on a file, the user has always set to be 'on'.</para>
2865 <para>If not set explicitly this parameter is set to 0,
2866 and allows a user to modify all the user/group/world permissions on a file,
2867 with no restrictions.</para>
2869 <para><emphasis>Note</emphasis> that users who can access
2870 the Samba server through other means can easily bypass this restriction,
2871 so it is primarily useful for standalone "appliance" systems.
2872 Administrators of most normal systems will probably want to leave
2873 this set to 0000.</para>
2875 <para>See also the <link linkend="FORCEDIRECTORYSECURITYMODE"><parameter>
2876 force directory security mode</parameter></link>,
2877 <link linkend="DIRECTORYSECURITYMASK"><parameter>directory security
2878 mask</parameter></link>, <link linkend="SECURITYMASK"><parameter>
2879 security mask</parameter></link> parameters.</para>
2881 <para>Default: <command>force security mode = 0</command></para>
2882 <para>Example: <command>force security mode = 700</command></para>
2883 </listitem>
2884 </varlistentry>
2888 <varlistentry>
2889 <term><anchor id="FORCEUNKNOWNACLUSER">force unknown acl user (S)</term>
2890 <listitem><para>If this parameter is set, a Windows NT ACL that contains
2891 an unknown SID (security descriptor, or representation of a user or group id)
2892 as the owner or group owner of the file will be silently mapped into the
2893 current UNIX uid or gid of the currently connected user.</para>
2895 <para>This is designed to allow Windows NT clients to copy files and
2896 folders containing ACLs that were created locally on the client machine
2897 and contain users local to that machine only (no domain users) to be
2898 copied to a Samba server (usually with XCOPY /O) and have the unknown
2899 userid and groupid of the file owner map to the current connected user.
2900 This can only be fixed correctly when winbindd allows arbitrary mapping
2901 from any Windows NT SID to a UNIX uid or gid.</para>
2903 <para>Try using this parameter when XCOPY /O gives an ACCESS_DENIED error.
2904 </para>
2906 <para>See also <link linkend="FORCEGROUP"><parameter>force group
2907 </parameter></link></para>
2909 <para>Default: <emphasis>False</emphasis></para>
2910 <para>Example: <command>force unknown acl user = yes</command></para>
2911 </listitem>
2912 </varlistentry>
2916 <varlistentry>
2917 <term><anchor id="FORCEUSER">force user (S)</term>
2918 <listitem><para>This specifies a UNIX user name that will be
2919 assigned as the default user for all users connecting to this service.
2920 This is useful for sharing files. You should also use it carefully
2921 as using it incorrectly can cause security problems.</para>
2923 <para>This user name only gets used once a connection is established.
2924 Thus clients still need to connect as a valid user and supply a
2925 valid password. Once connected, all file operations will be performed
2926 as the "forced user", no matter what username the client connected
2927 as. This can be very useful.</para>
2929 <para>In Samba 2.0.5 and above this parameter also causes the
2930 primary group of the forced user to be used as the primary group
2931 for all file activity. Prior to 2.0.5 the primary group was left
2932 as the primary group of the connecting user (this was a bug).</para>
2934 <para>See also <link linkend="FORCEGROUP"><parameter>force group
2935 </parameter></link></para>
2937 <para>Default: <emphasis>no forced user</emphasis></para>
2938 <para>Example: <command>force user = auser</command></para>
2939 </listitem>
2940 </varlistentry>
2944 <varlistentry>
2945 <term><anchor id="FSTYPE">fstype (S)</term>
2946 <listitem><para>This parameter allows the administrator to
2947 configure the string that specifies the type of filesystem a share
2948 is using that is reported by <ulink url="smbd.8.html"><command>smbd(8)
2949 </command></ulink> when a client queries the filesystem type
2950 for a share. The default type is <constant>NTFS</constant> for
2951 compatibility with Windows NT but this can be changed to other
2952 strings such as <constant>Samba</constant> or <constant>FAT
2953 </constant> if required.</para>
2955 <para>Default: <command>fstype = NTFS</command></para>
2956 <para>Example: <command>fstype = Samba</command></para></listitem>
2957 </varlistentry>
2961 <varlistentry>
2962 <term><anchor id="GETWDCACHE">getwd cache (G)</term>
2963 <listitem><para>This is a tuning option. When this is enabled a
2964 caching algorithm will be used to reduce the time taken for getwd()
2965 calls. This can have a significant impact on performance, especially
2966 when the <link linkend="WIDELINKS"><parameter>wide links</parameter>
2967 </link>parameter is set to <constant>no</constant>.</para>
2969 <para>Default: <command>getwd cache = yes</command></para>
2970 </listitem>
2971 </varlistentry>
2975 <varlistentry>
2976 <term><anchor id="GROUP">group (S)</term>
2977 <listitem><para>Synonym for <link linkend="FORCEGROUP"><parameter>force
2978 group</parameter></link>.</para></listitem>
2979 </varlistentry>
2983 <varlistentry>
2984 <term><anchor id="GUESTACCOUNT">guest account (S)</term>
2985 <listitem><para>This is a username which will be used for access
2986 to services which are specified as <link linkend="GUESTOK"><parameter>
2987 guest ok</parameter></link> (see below). Whatever privileges this
2988 user has will be available to any client connecting to the guest service.
2989 Typically this user will exist in the password file, but will not
2990 have a valid login. The user account "ftp" is often a good choice
2991 for this parameter. If a username is specified in a given service,
2992 the specified username overrides this one.</para>
2994 <para>One some systems the default guest account "nobody" may not
2995 be able to print. Use another account in this case. You should test
2996 this by trying to log in as your guest user (perhaps by using the
2997 <command>su -</command> command) and trying to print using the
2998 system print command such as <command>lpr(1)</command> or <command>
2999 lp(1)</command>.</para>
3001 <para>Default: <emphasis>specified at compile time, usually
3002 "nobody"</emphasis></para>
3004 <para>Example: <command>guest account = ftp</command></para></listitem>
3005 </varlistentry>
3009 <varlistentry>
3010 <term><anchor id="GUESTOK">guest ok (S)</term>
3011 <listitem><para>If this parameter is <constant>yes</constant> for
3012 a service, then no password is required to connect to the service.
3013 Privileges will be those of the <link linkend="GUESTACCOUNT"><parameter>
3014 guest account</parameter></link>.</para>
3016 <para>See the section below on <link linkend="SECURITY"><parameter>
3017 security</parameter></link> for more information about this option.
3018 </para>
3020 <para>Default: <command>guest ok = no</command></para></listitem>
3021 </varlistentry>
3025 <varlistentry>
3026 <term><anchor id="GUESTONLY">guest only (S)</term>
3027 <listitem><para>If this parameter is <constant>yes</constant> for
3028 a service, then only guest connections to the service are permitted.
3029 This parameter will have no effect if <link linkend="GUESTOK">
3030 <parameter>guest ok</parameter></link> is not set for the service.</para>
3032 <para>See the section below on <link linkend="SECURITY"><parameter>
3033 security</parameter></link> for more information about this option.
3034 </para>
3036 <para>Default: <command>guest only = no</command></para></listitem>
3037 </varlistentry>
3041 <varlistentry>
3042 <term><anchor id="HIDEDOTFILES">hide dot files (S)</term>
3043 <listitem><para>This is a boolean parameter that controls whether
3044 files starting with a dot appear as hidden files.</para>
3046 <para>Default: <command>hide dot files = yes</command></para></listitem>
3047 </varlistentry>
3051 <varlistentry>
3052 <term><anchor id="HIDEFILES">hide files(S)</term>
3053 <listitem><para>This is a list of files or directories that are not
3054 visible but are accessible. The DOS 'hidden' attribute is applied
3055 to any files or directories that match.</para>
3057 <para>Each entry in the list must be separated by a '/',
3058 which allows spaces to be included in the entry. '*'
3059 and '?' can be used to specify multiple files or directories
3060 as in DOS wildcards.</para>
3062 <para>Each entry must be a Unix path, not a DOS path and must
3063 not include the Unix directory separator '/'.</para>
3065 <para>Note that the case sensitivity option is applicable
3066 in hiding files.</para>
3068 <para>Setting this parameter will affect the performance of Samba,
3069 as it will be forced to check all files and directories for a match
3070 as they are scanned.</para>
3072 <para>See also <link linkend="HIDEDOTFILES"><parameter>hide
3073 dot files</parameter></link>, <link linkend="VETOFILES"><parameter>
3074 veto files</parameter></link> and <link linkend="CASESENSITIVE">
3075 <parameter>case sensitive</parameter></link>.</para>
3077 <para>Default: <emphasis>no file are hidden</emphasis></para>
3078 <para>Example: <command>hide files =
3079 /.*/DesktopFolderDB/TrashFor%m/resource.frk/</command></para>
3081 <para>The above example is based on files that the Macintosh
3082 SMB client (DAVE) available from <ulink url="http://www.thursby.com">
3083 Thursby</ulink> creates for internal use, and also still hides
3084 all files beginning with a dot.</para></listitem>
3085 </varlistentry>
3089 <varlistentry>
3090 <term><anchor id="HIDELOCALUSERS">hide local users(G)</term>
3091 <listitem><para>This parameter toggles the hiding of local UNIX
3092 users (root, wheel, floppy, etc) from remote clients.</para>
3094 <para>Default: <command>hide local users = no</command></para></listitem>
3095 </varlistentry>
3099 <varlistentry>
3100 <term><anchor id="HIDEUNREADABLE">hide unreadable (S)</term>
3101 <listitem><para>This parameter prevents clients from seeing the
3102 existance of files that cannot be read. Defaults to off.</para>
3104 <para>Default: <command>hide unreadable = no</command></para></listitem>
3105 </varlistentry>
3109 <varlistentry>
3110 <term><anchor id="HOMEDIRMAP">homedir map (G)</term>
3111 <listitem><para>If<link linkend="NISHOMEDIR"><parameter>nis homedir
3112 </parameter></link> is <constant>yes</constant>, and <ulink
3113 url="smbd.8.html"><command>smbd(8)</command></ulink> is also acting
3114 as a Win95/98 <parameter>logon server</parameter> then this parameter
3115 specifies the NIS (or YP) map from which the server for the user's
3116 home directory should be extracted. At present, only the Sun
3117 auto.home map format is understood. The form of the map is:</para>
3119 <para><command>username server:/some/file/system</command></para>
3121 <para>and the program will extract the servername from before
3122 the first ':'. There should probably be a better parsing system
3123 that copes with different map formats and also Amd (another
3124 automounter) maps.</para>
3126 <para><emphasis>NOTE :</emphasis>A working NIS client is required on
3127 the system for this option to work.</para>
3129 <para>See also <link linkend="NISHOMEDIR"><parameter>nis homedir</parameter>
3130 </link>, <link linkend="DOMAINLOGONS"><parameter>domain logons</parameter>
3131 </link>.</para>
3133 <para>Default: <command>homedir map = &lt;empty string&gt;</command></para>
3134 <para>Example: <command>homedir map = amd.homedir</command></para>
3135 </listitem>
3136 </varlistentry>
3142 <varlistentry>
3143 <term><anchor id="HOSTMSDFS">host msdfs (G)</term>
3144 <listitem><para>This boolean parameter is only available
3145 if Samba has been configured and compiled with the <command>
3146 --with-msdfs</command> option. If set to <constant>yes</constant>,
3147 Samba will act as a Dfs server, and allow Dfs-aware clients
3148 to browse Dfs trees hosted on the server.</para>
3150 <para>See also the <link linkend="MSDFSROOT"><parameter>
3151 msdfs root</parameter></link> share level parameter. For
3152 more information on setting up a Dfs tree on Samba,
3153 refer to <ulink url="msdfs_setup.html">msdfs_setup.html</ulink>.
3154 </para>
3156 <para>Default: <command>host msdfs = no</command></para>
3157 </listitem>
3158 </varlistentry>
3161 <varlistentry>
3162 <term><anchor id="HOSTSALLOW">hosts allow (S)</term>
3163 <listitem><para>A synonym for this parameter is <parameter>allow
3164 hosts</parameter>.</para>
3166 <para>This parameter is a comma, space, or tab delimited
3167 set of hosts which are permitted to access a service.</para>
3169 <para>If specified in the [global] section then it will
3170 apply to all services, regardless of whether the individual
3171 service has a different setting.</para>
3173 <para>You can specify the hosts by name or IP number. For
3174 example, you could restrict access to only the hosts on a
3175 Class C subnet with something like <command>allow hosts = 150.203.5.
3176 </command>. The full syntax of the list is described in the man
3177 page <filename>hosts_access(5)</filename>. Note that this man
3178 page may not be present on your system, so a brief description will
3179 be given here also.</para>
3181 <para>Note that the localhost address 127.0.0.1 will always
3182 be allowed access unless specifically denied by a <link
3183 linkend="HOSTSDENY"><parameter>hosts deny</parameter></link> option.</para>
3185 <para>You can also specify hosts by network/netmask pairs and
3186 by netgroup names if your system supports netgroups. The
3187 <emphasis>EXCEPT</emphasis> keyword can also be used to limit a
3188 wildcard list. The following examples may provide some help:</para>
3190 <para>Example 1: allow all IPs in 150.203.*.*; except one</para>
3192 <para><command>hosts allow = 150.203. EXCEPT 150.203.6.66</command></para>
3194 <para>Example 2: allow hosts that match the given network/netmask</para>
3196 <para><command>hosts allow = 150.203.15.0/255.255.255.0</command></para>
3198 <para>Example 3: allow a couple of hosts</para>
3200 <para><command>hosts allow = lapland, arvidsjaur</command></para>
3202 <para>Example 4: allow only hosts in NIS netgroup "foonet", but
3203 deny access from one particular host</para>
3205 <para><command>hosts allow = @foonet</command></para>
3207 <para><command>hosts deny = pirate</command></para>
3209 <para>Note that access still requires suitable user-level passwords.</para>
3211 <para>See <ulink url="testparm.1.html"><command>testparm(1)</command>
3212 </ulink> for a way of testing your host access to see if it does
3213 what you expect.</para>
3215 <para>Default: <emphasis>none (i.e., all hosts permitted access)
3216 </emphasis></para>
3218 <para>Example: <command>allow hosts = 150.203.5. myhost.mynet.edu.au
3219 </command></para>
3220 </listitem>
3221 </varlistentry>
3225 <varlistentry>
3226 <term><anchor id="HOSTSDENY">hosts deny (S)</term>
3227 <listitem><para>The opposite of <parameter>hosts allow</parameter>
3228 - hosts listed here are <emphasis>NOT</emphasis> permitted access to
3229 services unless the specific services have their own lists to override
3230 this one. Where the lists conflict, the <parameter>allow</parameter>
3231 list takes precedence.</para>
3233 <para>Default: <emphasis>none (i.e., no hosts specifically excluded)
3234 </emphasis></para>
3236 <para>Example: <command>hosts deny = 150.203.4. badhost.mynet.edu.au
3237 </command></para></listitem>
3238 </varlistentry>
3242 <varlistentry>
3243 <term><anchor id="HOSTSEQUIV">hosts equiv (G)</term>
3244 <listitem><para>If this global parameter is a non-null string,
3245 it specifies the name of a file to read for the names of hosts
3246 and users who will be allowed access without specifying a password.
3247 </para>
3249 <para>This is not be confused with <link linkend="HOSTSALLOW">
3250 <parameter>hosts allow</parameter></link> which is about hosts
3251 access to services and is more useful for guest services. <parameter>
3252 hosts equiv</parameter> may be useful for NT clients which will
3253 not supply passwords to Samba.</para>
3255 <para><emphasis>NOTE :</emphasis> The use of <parameter>hosts equiv
3256 </parameter> can be a major security hole. This is because you are
3257 trusting the PC to supply the correct username. It is very easy to
3258 get a PC to supply a false username. I recommend that the
3259 <parameter>hosts equiv</parameter> option be only used if you really
3260 know what you are doing, or perhaps on a home network where you trust
3261 your spouse and kids. And only if you <emphasis>really</emphasis> trust
3262 them :-).</para>
3264 <para>Default: <emphasis>no host equivalences</emphasis></para>
3265 <para>Example: <command>hosts equiv = /etc/hosts.equiv</command></para>
3266 </listitem>
3267 </varlistentry>
3271 <varlistentry>
3272 <term><anchor id="INCLUDE">include (G)</term>
3273 <listitem><para>This allows you to include one config file
3274 inside another. The file is included literally, as though typed
3275 in place.</para>
3277 <para>It takes the standard substitutions, except <parameter>%u
3278 </parameter>, <parameter>%P</parameter> and <parameter>%S</parameter>.
3279 </para>
3281 <para>Default: <emphasis>no file included</emphasis></para>
3282 <para>Example: <command>include = /usr/local/samba/lib/admin_smb.conf
3283 </command></para></listitem>
3284 </varlistentry>
3288 <varlistentry>
3289 <term><anchor id="INHERITACLS">inherit acls (S)</term>
3290 <listitem><para>This parameter can be used to ensure
3291 that if default acls exist on parent directories,
3292 they are always honored when creating a subdirectory.
3293 The default behavior is to use the mode specified
3294 when creating the directory. Enabling this option
3295 sets the mode to 0777, thus guaranteeing that
3296 default directory acls are propagated.
3297 </para>
3299 <para>Default: <command>inherit acls = no</command>
3300 </para></listitem>
3301 </varlistentry>
3306 <varlistentry>
3307 <term><anchor id="INHERITPERMISSIONS">inherit permissions (S)</term>
3308 <listitem><para>The permissions on new files and directories
3309 are normally governed by <link linkend="CREATEMASK"><parameter>
3310 create mask</parameter></link>, <link linkend="DIRECTORYMASK">
3311 <parameter>directory mask</parameter></link>, <link
3312 linkend="FORCECREATEMODE"><parameter>force create mode</parameter>
3313 </link> and <link linkend="FORCEDIRECTORYMODE"><parameter>force
3314 directory mode</parameter></link> but the boolean inherit
3315 permissions parameter overrides this.</para>
3317 <para>New directories inherit the mode of the parent directory,
3318 including bits such as setgid.</para>
3320 <para>New files inherit their read/write bits from the parent
3321 directory. Their execute bits continue to be determined by
3322 <link linkend="MAPARCHIVE"><parameter>map archive</parameter>
3323 </link>, <link linkend="MAPHIDDEN"><parameter>map hidden</parameter>
3324 </link> and <link linkend="MAPSYSTEM"><parameter>map system</parameter>
3325 </link> as usual.</para>
3327 <para>Note that the setuid bit is <emphasis>never</emphasis> set via
3328 inheritance (the code explicitly prohibits this).</para>
3330 <para>This can be particularly useful on large systems with
3331 many users, perhaps several thousand, to allow a single [homes]
3332 share to be used flexibly by each user.</para>
3334 <para>See also <link linkend="CREATEMASK"><parameter>create mask
3335 </parameter></link>, <link linkend="DIRECTORYMASK"><parameter>
3336 directory mask</parameter></link>, <link linkend="FORCECREATEMODE">
3337 <parameter>force create mode</parameter></link> and <link
3338 linkend="FORCEDIRECTORYMODE"><parameter>force directory mode</parameter>
3339 </link>.</para>
3341 <para>Default: <command>inherit permissions = no</command></para>
3342 </listitem>
3343 </varlistentry>
3347 <varlistentry>
3348 <term><anchor id="INTERFACES">interfaces (G)</term>
3349 <listitem><para>This option allows you to override the default
3350 network interfaces list that Samba will use for browsing, name
3351 registration and other NBT traffic. By default Samba will query
3352 the kernel for the list of all active interfaces and use any
3353 interfaces except 127.0.0.1 that are broadcast capable.</para>
3355 <para>The option takes a list of interface strings. Each string
3356 can be in any of the following forms:</para>
3358 <itemizedlist>
3359 <listitem><para>a network interface name (such as eth0).
3360 This may include shell-like wildcards so eth* will match
3361 any interface starting with the substring "eth"</para></listitem>
3363 <listitem><para>an IP address. In this case the netmask is
3364 determined from the list of interfaces obtained from the
3365 kernel</para></listitem>
3367 <listitem><para>an IP/mask pair. </para></listitem>
3369 <listitem><para>a broadcast/mask pair.</para></listitem>
3370 </itemizedlist>
3372 <para>The "mask" parameters can either be a bit length (such
3373 as 24 for a C class network) or a full netmask in dotted
3374 decimal form.</para>
3376 <para>The "IP" parameters above can either be a full dotted
3377 decimal IP address or a hostname which will be looked up via
3378 the OS's normal hostname resolution mechanisms.</para>
3380 <para>For example, the following line:</para>
3382 <para><command>interfaces = eth0 192.168.2.10/24 192.168.3.10/255.255.255.0
3383 </command></para>
3385 <para>would configure three network interfaces corresponding
3386 to the eth0 device and IP addresses 192.168.2.10 and 192.168.3.10.
3387 The netmasks of the latter two interfaces would be set to 255.255.255.0.</para>
3389 <para>See also <link linkend="BINDINTERFACESONLY"><parameter>bind
3390 interfaces only</parameter></link>.</para>
3392 <para>Default: <emphasis>all active interfaces except 127.0.0.1
3393 that are broadcast capable</emphasis></para>
3394 </listitem>
3395 </varlistentry>
3399 <varlistentry>
3400 <term><anchor id="INVALIDUSERS">invalid users (S)</term>
3401 <listitem><para>This is a list of users that should not be allowed
3402 to login to this service. This is really a <emphasis>paranoid</emphasis>
3403 check to absolutely ensure an improper setting does not breach
3404 your security.</para>
3406 <para>A name starting with a '@' is interpreted as an NIS
3407 netgroup first (if your system supports NIS), and then as a UNIX
3408 group if the name was not found in the NIS netgroup database.</para>
3410 <para>A name starting with '+' is interpreted only
3411 by looking in the UNIX group database. A name starting with
3412 '&' is interpreted only by looking in the NIS netgroup database
3413 (this requires NIS to be working on your system). The characters
3414 '+' and '&' may be used at the start of the name in either order
3415 so the value <parameter>+&amp;group</parameter> means check the
3416 UNIX group database, followed by the NIS netgroup database, and
3417 the value <parameter>&+group</parameter> means check the NIS
3418 netgroup database, followed by the UNIX group database (the
3419 same as the '@' prefix).</para>
3421 <para>The current servicename is substituted for <parameter>%S</parameter>.
3422 This is useful in the [homes] section.</para>
3424 <para>See also <link linkend="VALIDUSERS"><parameter>valid users
3425 </parameter></link>.</para>
3427 <para>Default: <emphasis>no invalid users</emphasis></para>
3428 <para>Example: <command>invalid users = root fred admin @wheel
3429 </command></para>
3430 </listitem>
3431 </varlistentry>
3435 <varlistentry>
3436 <term><anchor id="KEEPALIVE">keepalive (G)</term>
3437 <listitem><para>The value of the parameter (an integer) represents
3438 the number of seconds between <parameter>keepalive</parameter>
3439 packets. If this parameter is zero, no keepalive packets will be
3440 sent. Keepalive packets, if sent, allow the server to tell whether
3441 a client is still present and responding.</para>
3443 <para>Keepalives should, in general, not be needed if the socket
3444 being used has the SO_KEEPALIVE attribute set on it (see <link
3445 linkend="SOCKETOPTIONS"><parameter>socket options</parameter></link>).
3446 Basically you should only use this option if you strike difficulties.</para>
3448 <para>Default: <command>keepalive = 300</command></para>
3449 <para>Example: <command>keepalive = 600</command></para>
3450 </listitem>
3451 </varlistentry>
3455 <varlistentry>
3456 <term><anchor id="KERNELOPLOCKS">kernel oplocks (G)</term>
3457 <listitem><para>For UNIXes that support kernel based <link
3458 linkend="OPLOCKS"><parameter>oplocks</parameter></link>
3459 (currently only IRIX and the Linux 2.4 kernel), this parameter
3460 allows the use of them to be turned on or off.</para>
3462 <para>Kernel oplocks support allows Samba <parameter>oplocks
3463 </parameter> to be broken whenever a local UNIX process or NFS operation
3464 accesses a file that <ulink url="smbd.8.html"><command>smbd(8)</command>
3465 </ulink> has oplocked. This allows complete data consistency between
3466 SMB/CIFS, NFS and local file access (and is a <emphasis>very</emphasis>
3467 cool feature :-).</para>
3469 <para>This parameter defaults to <constant>on</constant>, but is translated
3470 to a no-op on systems that no not have the necessary kernel support.
3471 You should never need to touch this parameter.</para>
3473 <para>See also the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
3474 </link> and <link linkend="LEVEL2OPLOCKS"><parameter>level2 oplocks
3475 </parameter></link> parameters.</para>
3477 <para>Default: <command>kernel oplocks = yes</command></para>
3478 </listitem>
3479 </varlistentry>
3484 <varlistentry>
3485 <term><anchor id="LANMANAUTH">lanman auth (G)</term>
3486 <listitem><para>This parameter determines whether or not <ulink url="smbd.8.html">smbd</ulink> will
3487 attempt to authenticate users using the LANMAN password hash.
3488 If disabled, only clients which support NT password hashes (e.g. Windows
3489 NT/2000 clients, smbclient, etc... but not Windows 95/98 or the MS DOS
3490 network client) will be able to connect to the Samba host.</para>
3492 <para>Default : <command>lanman auth = yes</command></para>
3493 </listitem>
3494 </varlistentry>
3500 <varlistentry>
3501 <term><anchor id="LARGEREADWRITE">large readwrite (G)</term>
3502 <listitem><para>This parameter determines whether or not <ulink url="smbd.8.html">smbd</ulink>
3503 supports the new 64k streaming read and write varient SMB requests introduced
3504 with Windows 2000. Note that due to Windows 2000 client redirector bugs
3505 this requires Samba to be running on a 64-bit capable operating system such
3506 as IRIX, Solaris or a Linux 2.4 kernel. Can improve performance by 10% with
3507 Windows 2000 clients. Defaults to off. Not as tested as some other Samba
3508 code paths.
3509 </para>
3511 <para>Default : <command>large readwrite = no</command></para>
3512 </listitem>
3513 </varlistentry>
3517 <varlistentry>
3518 <term><anchor id="LDAPADMINDN">ldap admin dn (G)</term>
3519 <listitem><para>This parameter is only available if Samba has been
3520 configure to include the <command>--with-ldapsam</command> option
3521 at compile time. This option should be considered experimental and
3522 under active development.
3523 </para>
3525 <para>
3526 The <parameter>ldap admin dn</parameter> defines the Distinguished
3527 Name (DN) name used by Samba to contact the <link linkend="LDAPSERVER">ldap
3528 server</link> when retreiving user account information. The <parameter>ldap
3529 admin dn</parameter> is used in conjunction with the admin dn password
3530 stored in the <filename>private/secrets.tdb</filename> file. See the
3531 <ulink url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink> man
3532 page for more information on how to accmplish this.
3533 </para>
3536 <para>Default : <emphasis>none</emphasis></para>
3537 </listitem>
3538 </varlistentry>
3543 <varlistentry>
3544 <term><anchor id="LDAPFILTER">ldap filter (G)</term>
3545 <listitem><para>This parameter is only available if Samba has been
3546 configure to include the <command>--with-ldapsam</command> option
3547 at compile time. This option should be considered experimental and
3548 under active development.
3549 </para>
3551 <para>
3552 This parameter specifies the RFC 2254 compliant LDAP search filter.
3553 The default is to match the login name with the <constant>uid</constant>
3554 attribute for all entries matching the <constant>sambaAccount</constant>
3555 objectclass. Note that this filter should only return one entry.
3556 </para>
3559 <para>Default : <command>ldap filter = (&(uid=%u)(objectclass=sambaAccount))</command></para>
3560 </listitem>
3561 </varlistentry>
3566 <varlistentry>
3567 <term><anchor id="LDAPPORT">ldap port (G)</term>
3568 <listitem><para>This parameter is only available if Samba has been
3569 configure to include the <command>--with-ldapsam</command> option
3570 at compile time. This option should be considered experimental and
3571 under active development.
3572 </para>
3574 <para>
3575 This option is used to control the tcp port number used to contact
3576 the <link linkend="LDAPSERVER"><parameter>ldap server</parameter></link>.
3577 The default is to use the stand LDAPS port 636.
3578 </para>
3580 <para>See Also: <link linkend="LDAPSSL">ldap ssl</link>
3581 </para>
3583 <para>Default : <command>ldap port = 636 ; if ldap ssl = on</command></para>
3584 <para>Default : <command>ldap port = 389 ; if ldap ssl = off</command></para>
3585 </listitem>
3586 </varlistentry>
3591 <varlistentry>
3592 <term><anchor id="LDAPSERVER">ldap server (G)</term>
3593 <listitem><para>This parameter is only available if Samba has been
3594 configure to include the <command>--with-ldapsam</command> option
3595 at compile time. This option should be considered experimental and
3596 under active development.
3597 </para>
3599 <para>
3600 This parameter should contains the FQDN of the ldap directory
3601 server which should be queried to locate user account information.
3602 </para>
3606 <para>Default : <command>ldap server = localhost</command></para>
3607 </listitem>
3608 </varlistentry>
3613 <varlistentry>
3614 <term><anchor id="LDAPSSL">ldap ssl (G)</term>
3615 <listitem><para>This parameter is only available if Samba has been
3616 configure to include the <command>--with-ldapsam</command> option
3617 at compile time. This option should be considered experimental and
3618 under active development.
3619 </para>
3621 <para>
3622 This option is used to define whether or not Samba should
3623 use SSL when connecting to the <link linkend="LDAPSERVER"><parameter>ldap
3624 server</parameter></link>. This is <emphasis>NOT</emphasis> related to
3625 Samba SSL support which is enabled by specifying the
3626 <command>--with-ssl</command> option to the <filename>configure</filename>
3627 script (see <link linkend="SSL"><parameter>ssl</parameter></link>).
3628 </para>
3630 <para>
3631 The <parameter>ldap ssl</parameter> can be set to one of three values:
3632 (a) <constant>on</constant> - Always use SSL when contacting the
3633 <parameter>ldap server</parameter>, (b) <constant>off</constant> -
3634 Never use SSL when querying the directory, or (c) <constant>start_tls</constant>
3635 - Use the LDAPv3 StartTLS extended operation
3636 (RFC2830) for communicating with the directory server.
3637 </para>
3640 <para>Default : <command>ldap ssl = on</command></para>
3641 </listitem>
3642 </varlistentry>
3647 <varlistentry>
3648 <term><anchor id="LDAPSUFFIX">ldap suffix (G)</term>
3649 <listitem><para>This parameter is only available if Samba has been
3650 configure to include the <command>--with-ldapsam</command> option
3651 at compile time. This option should be considered experimental and
3652 under active development.
3653 </para>
3657 <para>Default : <emphasis>none</emphasis></para>
3658 </listitem>
3659 </varlistentry>
3667 <varlistentry>
3668 <term><anchor id="LEVEL2OPLOCKS">level2 oplocks (S)</term>
3669 <listitem><para>This parameter controls whether Samba supports
3670 level2 (read-only) oplocks on a share.</para>
3672 <para>Level2, or read-only oplocks allow Windows NT clients
3673 that have an oplock on a file to downgrade from a read-write oplock
3674 to a read-only oplock once a second client opens the file (instead
3675 of releasing all oplocks on a second open, as in traditional,
3676 exclusive oplocks). This allows all openers of the file that
3677 support level2 oplocks to cache the file for read-ahead only (ie.
3678 they may not cache writes or lock requests) and increases performance
3679 for many accesses of files that are not commonly written (such as
3680 application .EXE files).</para>
3682 <para>Once one of the clients which have a read-only oplock
3683 writes to the file all clients are notified (no reply is needed
3684 or waited for) and told to break their oplocks to "none" and
3685 delete any read-ahead caches.</para>
3687 <para>It is recommended that this parameter be turned on
3688 to speed access to shared executables.</para>
3690 <para>For more discussions on level2 oplocks see the CIFS spec.</para>
3692 <para>Currently, if <link linkend="KERNELOPLOCKS"><parameter>kernel
3693 oplocks</parameter></link> are supported then level2 oplocks are
3694 not granted (even if this parameter is set to <constant>yes</constant>).
3695 Note also, the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
3696 </link> parameter must be set to <constant>yes</constant> on this share in order for
3697 this parameter to have any effect.</para>
3699 <para>See also the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
3700 </link> and <link linkend="OPLOCKS"><parameter>kernel oplocks</parameter>
3701 </link> parameters.</para>
3703 <para>Default: <command>level2 oplocks = yes</command></para>
3704 </listitem>
3705 </varlistentry>
3711 <varlistentry>
3712 <term><anchor id="LMANNOUNCE">lm announce (G)</term>
3713 <listitem><para>This parameter determines if <ulink url="nmbd.8.html">
3714 <command>nmbd(8)</command></ulink> will produce Lanman announce
3715 broadcasts that are needed by OS/2 clients in order for them to see
3716 the Samba server in their browse list. This parameter can have three
3717 values, <constant>yes</constant>, <constant>no</constant>, or
3718 <constant>auto</constant>. The default is <constant>auto</constant>.
3719 If set to <constant>no</constant> Samba will never produce these
3720 broadcasts. If set to <constant>yes</constant> Samba will produce
3721 Lanman announce broadcasts at a frequency set by the parameter
3722 <parameter>lm interval</parameter>. If set to <constant>auto</constant>
3723 Samba will not send Lanman announce broadcasts by default but will
3724 listen for them. If it hears such a broadcast on the wire it will
3725 then start sending them at a frequency set by the parameter
3726 <parameter>lm interval</parameter>.</para>
3728 <para>See also <link linkend="LMINTERVAL"><parameter>lm interval
3729 </parameter></link>.</para>
3731 <para>Default: <command>lm announce = auto</command></para>
3732 <para>Example: <command>lm announce = yes</command></para>
3733 </listitem>
3734 </varlistentry>
3738 <varlistentry>
3739 <term><anchor id="LMINTERVAL">lm interval (G)</term>
3740 <listitem><para>If Samba is set to produce Lanman announce
3741 broadcasts needed by OS/2 clients (see the <link linkend="LMANNOUNCE">
3742 <parameter>lm announce</parameter></link> parameter) then this
3743 parameter defines the frequency in seconds with which they will be
3744 made. If this is set to zero then no Lanman announcements will be
3745 made despite the setting of the <parameter>lm announce</parameter>
3746 parameter.</para>
3748 <para>See also <link linkend="LMANNOUNCE"><parameter>lm
3749 announce</parameter></link>.</para>
3751 <para>Default: <command>lm interval = 60</command></para>
3752 <para>Example: <command>lm interval = 120</command></para>
3753 </listitem>
3754 </varlistentry>
3758 <varlistentry>
3759 <term><anchor id="LOADPRINTERS">load printers (G)</term>
3760 <listitem><para>A boolean variable that controls whether all
3761 printers in the printcap will be loaded for browsing by default.
3762 See the <link linkend="PRINTERSSECT">printers</link> section for
3763 more details.</para>
3765 <para>Default: <command>load printers = yes</command></para></listitem>
3766 </varlistentry>
3771 <varlistentry>
3772 <term><anchor id="LOCALMASTER">local master (G)</term>
3773 <listitem><para>This option allows <ulink url="nmbd.8.html"><command>
3774 nmbd(8)</command></ulink> to try and become a local master browser
3775 on a subnet. If set to <constant>no</constant> then <command>
3776 nmbd</command> will not attempt to become a local master browser
3777 on a subnet and will also lose in all browsing elections. By
3778 default this value is set to <constant>yes</constant>. Setting this value to <constant>yes</constant> doesn't
3779 mean that Samba will <emphasis>become</emphasis> the local master
3780 browser on a subnet, just that <command>nmbd</command> will <emphasis>
3781 participate</emphasis> in elections for local master browser.</para>
3783 <para>Setting this value to <constant>no</constant> will cause <command>nmbd</command>
3784 <emphasis>never</emphasis> to become a local master browser.</para>
3786 <para>Default: <command>local master = yes</command></para>
3787 </listitem>
3788 </varlistentry>
3792 <varlistentry>
3793 <term><anchor id="LOCKDIR">lock dir (G)</term>
3794 <listitem><para>Synonym for <link linkend="LOCKDIRECTORY"><parameter>
3795 lock directory</parameter></link>.</para></listitem>
3796 </varlistentry>
3800 <varlistentry>
3801 <term><anchor id="LOCKDIRECTORY">lock directory (G)</term>
3802 <listitem><para>This option specifies the directory where lock
3803 files will be placed. The lock files are used to implement the
3804 <link linkend="MAXCONNECTIONS"><parameter>max connections</parameter>
3805 </link> option.</para>
3807 <para>Default: <command>lock directory = ${prefix}/var/locks</command></para>
3808 <para>Example: <command>lock directory = /var/run/samba/locks</command>
3809 </para></listitem>
3810 </varlistentry>
3814 <varlistentry>
3815 <term><anchor id="LOCKSPINCOUNT">lock spin count (G)</term>
3816 <listitem><para>This parameter controls the number of times
3817 that smbd should attempt to gain a byte range lock on the
3818 behalf of a client request. Experiments have shown that
3819 Windows 2k servers do not reply with a failure if the lock
3820 could not be immediately granted, but try a few more times
3821 in case the lock could later be aquired. This behavior
3822 is used to support PC database formats such as MS Access
3823 and FoxPro.
3824 </para>
3826 <para>Default: <command>lock spin count = 2</command>
3827 </para></listitem>
3828 </varlistentry>
3833 <varlistentry>
3834 <term><anchor id="LOCKSPINTIME">lock spin time (G)</term>
3835 <listitem><para>The time in microseconds that smbd should
3836 pause before attempting to gain a failed lock. See
3837 <link linkend="LOCKSPINCOUNT"><parameter>lock spin
3838 count</parameter></link> for more details.
3839 </para>
3841 <para>Default: <command>lock spin time = 10</command>
3842 </para></listitem>
3843 </varlistentry>
3847 <varlistentry>
3848 <term><anchor id="LOCKING">locking (S)</term>
3849 <listitem><para>This controls whether or not locking will be
3850 performed by the server in response to lock requests from the
3851 client.</para>
3853 <para>If <command>locking = no</command>, all lock and unlock
3854 requests will appear to succeed and all lock queries will report
3855 that the file in question is available for locking.</para>
3857 <para>If <command>locking = yes</command>, real locking will be performed
3858 by the server.</para>
3860 <para>This option <emphasis>may</emphasis> be useful for read-only
3861 filesystems which <emphasis>may</emphasis> not need locking (such as
3862 CDROM drives), although setting this parameter of <constant>no</constant>
3863 is not really recommended even in this case.</para>
3865 <para>Be careful about disabling locking either globally or in a
3866 specific service, as lack of locking may result in data corruption.
3867 You should never need to set this parameter.</para>
3869 <para>Default: <command>locking = yes</command></para>
3870 </listitem>
3871 </varlistentry>
3875 <varlistentry>
3876 <term><anchor id="LOGFILE">log file (G)</term>
3877 <listitem><para>This option allows you to override the name
3878 of the Samba log file (also known as the debug file).</para>
3880 <para>This option takes the standard substitutions, allowing
3881 you to have separate log files for each user or machine.</para>
3883 <para>Example: <command>log file = /usr/local/samba/var/log.%m
3884 </command></para></listitem>
3885 </varlistentry>
3889 <varlistentry>
3890 <term><anchor id="LOGLEVEL">log level (G)</term>
3891 <listitem><para>The value of the parameter (an integer) allows
3892 the debug level (logging level) to be specified in the
3893 <filename>smb.conf</filename> file. This is to give greater
3894 flexibility in the configuration of the system.</para>
3896 <para>The default will be the log level specified on
3897 the command line or level zero if none was specified.</para>
3899 <para>Example: <command>log level = 3</command></para></listitem>
3900 </varlistentry>
3904 <varlistentry>
3905 <term><anchor id="LOGONDRIVE">logon drive (G)</term>
3906 <listitem><para>This parameter specifies the local path to
3907 which the home directory will be connected (see <link
3908 linkend="LOGONHOME"><parameter>logon home</parameter></link>)
3909 and is only used by NT Workstations. </para>
3911 <para>Note that this option is only useful if Samba is set up as a
3912 logon server.</para>
3914 <para>Default: <command>logon drive = z:</command></para>
3915 <para>Example: <command>logon drive = h:</command></para>
3916 </listitem>
3917 </varlistentry>
3921 <varlistentry>
3922 <term><anchor id="LOGONHOME">logon home (G)</term>
3923 <listitem><para>This parameter specifies the home directory
3924 location when a Win95/98 or NT Workstation logs into a Samba PDC.
3925 It allows you to do </para>
3927 <para><prompt>C:\> </prompt><userinput>NET USE H: /HOME</userinput>
3928 </para>
3930 <para>from a command prompt, for example.</para>
3932 <para>This option takes the standard substitutions, allowing
3933 you to have separate logon scripts for each user or machine.</para>
3935 <para>This parameter can be used with Win9X workstations to ensure
3936 that roaming profiles are stored in a subdirectory of the user's
3937 home directory. This is done in the following way:</para>
3939 <para><command>logon home = \\%N\%U\profile</command></para>
3941 <para>This tells Samba to return the above string, with
3942 substitutions made when a client requests the info, generally
3943 in a NetUserGetInfo request. Win9X clients truncate the info to
3944 \\server\share when a user does <command>net use /home</command>
3945 but use the whole string when dealing with profiles.</para>
3947 <para>Note that in prior versions of Samba, the <link linkend="LOGONPATH">
3948 <parameter>logon path</parameter></link> was returned rather than
3949 <parameter>logon home</parameter>. This broke <command>net use
3950 /home</command> but allowed profiles outside the home directory.
3951 The current implementation is correct, and can be used for
3952 profiles if you use the above trick.</para>
3954 <para>This option is only useful if Samba is set up as a logon
3955 server.</para>
3957 <para>Default: <command>logon home = "\\%N\%U"</command></para>
3958 <para>Example: <command>logon home = "\\remote_smb_server\%U"</command>
3959 </para></listitem>
3960 </varlistentry>
3963 <varlistentry>
3964 <term><anchor id="LOGONPATH">logon path (G)</term>
3965 <listitem><para>This parameter specifies the home directory
3966 where roaming profiles (NTuser.dat etc files for Windows NT) are
3967 stored. Contrary to previous versions of these manual pages, it has
3968 nothing to do with Win 9X roaming profiles. To find out how to
3969 handle roaming profiles for Win 9X system, see the <link linkend="LOGONHOME">
3970 <parameter>logon home</parameter></link> parameter.</para>
3972 <para>This option takes the standard substitutions, allowing you
3973 to have separate logon scripts for each user or machine. It also
3974 specifies the directory from which the "Application Data",
3975 (<filename>desktop</filename>, <filename>start menu</filename>,
3976 <filename>network neighborhood</filename>, <filename>programs</filename>
3977 and other folders, and their contents, are loaded and displayed on
3978 your Windows NT client.</para>
3980 <para>The share and the path must be readable by the user for
3981 the preferences and directories to be loaded onto the Windows NT
3982 client. The share must be writeable when the user logs in for the first
3983 time, in order that the Windows NT client can create the NTuser.dat
3984 and other directories.</para>
3986 <para>Thereafter, the directories and any of the contents can,
3987 if required, be made read-only. It is not advisable that the
3988 NTuser.dat file be made read-only - rename it to NTuser.man to
3989 achieve the desired effect (a <emphasis>MAN</emphasis>datory
3990 profile). </para>
3992 <para>Windows clients can sometimes maintain a connection to
3993 the [homes] share, even though there is no user logged in.
3994 Therefore, it is vital that the logon path does not include a
3995 reference to the homes share (i.e. setting this parameter to
3996 \%N\%U\profile_path will cause problems).</para>
3998 <para>This option takes the standard substitutions, allowing
3999 you to have separate logon scripts for each user or machine.</para>
4001 <para>Note that this option is only useful if Samba is set up
4002 as a logon server.</para>
4004 <para>Default: <command>logon path = \\%N\%U\profile</command></para>
4005 <para>Example: <command>logon path = \\PROFILESERVER\PROFILE\%U</command></para>
4006 </listitem>
4007 </varlistentry>
4011 <varlistentry>
4012 <term><anchor id="LOGONSCRIPT">logon script (G)</term>
4013 <listitem><para>This parameter specifies the batch file (.bat) or
4014 NT command file (.cmd) to be downloaded and run on a machine when
4015 a user successfully logs in. The file must contain the DOS
4016 style CR/LF line endings. Using a DOS-style editor to create the
4017 file is recommended.</para>
4019 <para>The script must be a relative path to the [netlogon]
4020 service. If the [netlogon] service specifies a <link linkend="PATH">
4021 <parameter>path</parameter></link> of <filename>/usr/local/samba/netlogon
4022 </filename>, and <command>logon script = STARTUP.BAT</command>, then
4023 the file that will be downloaded is:</para>
4025 <para><filename>/usr/local/samba/netlogon/STARTUP.BAT</filename></para>
4027 <para>The contents of the batch file are entirely your choice. A
4028 suggested command would be to add <command>NET TIME \\SERVER /SET
4029 /YES</command>, to force every machine to synchronize clocks with
4030 the same time server. Another use would be to add <command>NET USE
4031 U: \\SERVER\UTILS</command> for commonly used utilities, or <command>
4032 NET USE Q: \\SERVER\ISO9001_QA</command> for example.</para>
4034 <para>Note that it is particularly important not to allow write
4035 access to the [netlogon] share, or to grant users write permission
4036 on the batch files in a secure environment, as this would allow
4037 the batch files to be arbitrarily modified and security to be
4038 breached.</para>
4040 <para>This option takes the standard substitutions, allowing you
4041 to have separate logon scripts for each user or machine.</para>
4043 <para>This option is only useful if Samba is set up as a logon
4044 server.</para>
4046 <para>Default: <emphasis>no logon script defined</emphasis></para>
4047 <para>Example: <command>logon script = scripts\%U.bat</command></para>
4048 </listitem>
4049 </varlistentry>
4053 <varlistentry>
4054 <term><anchor id="LPPAUSECOMMAND">lppause command (S)</term>
4055 <listitem><para>This parameter specifies the command to be
4056 executed on the server host in order to stop printing or spooling
4057 a specific print job.</para>
4059 <para>This command should be a program or script which takes
4060 a printer name and job number to pause the print job. One way
4061 of implementing this is by using job priorities, where jobs
4062 having a too low priority won't be sent to the printer.</para>
4064 <para>If a <parameter>%p</parameter> is given then the printer name
4065 is put in its place. A <parameter>%j</parameter> is replaced with
4066 the job number (an integer). On HPUX (see <parameter>printing=hpux
4067 </parameter>), if the <parameter>-p%p</parameter> option is added
4068 to the lpq command, the job will show up with the correct status, i.e.
4069 if the job priority is lower than the set fence priority it will
4070 have the PAUSED status, whereas if the priority is equal or higher it
4071 will have the SPOOLED or PRINTING status.</para>
4073 <para>Note that it is good practice to include the absolute path
4074 in the lppause command as the PATH may not be available to the server.</para>
4076 <para>See also the <link linkend="PRINTING"><parameter>printing
4077 </parameter></link> parameter.</para>
4079 <para>Default: Currently no default value is given to
4080 this string, unless the value of the <parameter>printing</parameter>
4081 parameter is <constant>SYSV</constant>, in which case the default is :</para>
4083 <para><command>lp -i %p-%j -H hold</command></para>
4085 <para>or if the value of the <parameter>printing</parameter> parameter
4086 is <constant>SOFTQ</constant>, then the default is:</para>
4088 <para><command>qstat -s -j%j -h</command></para>
4090 <para>Example for HPUX: <command>lppause command = /usr/bin/lpalt
4091 %p-%j -p0</command></para>
4092 </listitem>
4093 </varlistentry>
4097 <varlistentry>
4098 <term><anchor id="LPQCACHETIME">lpq cache time (G)</term>
4099 <listitem><para>This controls how long lpq info will be cached
4100 for to prevent the <command>lpq</command> command being called too
4101 often. A separate cache is kept for each variation of the <command>
4102 lpq</command> command used by the system, so if you use different
4103 <command>lpq</command> commands for different users then they won't
4104 share cache information.</para>
4106 <para>The cache files are stored in <filename>/tmp/lpq.xxxx</filename>
4107 where xxxx is a hash of the <command>lpq</command> command in use.</para>
4109 <para>The default is 10 seconds, meaning that the cached results
4110 of a previous identical <command>lpq</command> command will be used
4111 if the cached data is less than 10 seconds old. A large value may
4112 be advisable if your <command>lpq</command> command is very slow.</para>
4114 <para>A value of 0 will disable caching completely.</para>
4116 <para>See also the <link linkend="PRINTING"><parameter>printing
4117 </parameter></link> parameter.</para>
4119 <para>Default: <command>lpq cache time = 10</command></para>
4120 <para>Example: <command>lpq cache time = 30</command></para>
4121 </listitem>
4122 </varlistentry>
4126 <varlistentry>
4127 <term><anchor id="LPQCOMMAND">lpq command (S)</term>
4128 <listitem><para>This parameter specifies the command to be
4129 executed on the server host in order to obtain <command>lpq
4130 </command>-style printer status information.</para>
4132 <para>This command should be a program or script which
4133 takes a printer name as its only parameter and outputs printer
4134 status information.</para>
4136 <para>Currently nine styles of printer status information
4137 are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ.
4138 This covers most UNIX systems. You control which type is expected
4139 using the <parameter>printing =</parameter> option.</para>
4141 <para>Some clients (notably Windows for Workgroups) may not
4142 correctly send the connection number for the printer they are
4143 requesting status information about. To get around this, the
4144 server reports on the first printer service connected to by the
4145 client. This only happens if the connection number sent is invalid.</para>
4147 <para>If a <parameter>%p</parameter> is given then the printer name
4148 is put in its place. Otherwise it is placed at the end of the
4149 command.</para>
4151 <para>Note that it is good practice to include the absolute path
4152 in the <parameter>lpq command</parameter> as the <envar>$PATH
4153 </envar> may not be available to the server. When compiled with
4154 the CUPS libraries, no <parameter>lpq command</parameter> is
4155 needed because smbd will make a library call to obtain the
4156 print queue listing.</para>
4158 <para>See also the <link linkend="PRINTING"><parameter>printing
4159 </parameter></link> parameter.</para>
4161 <para>Default: <emphasis>depends on the setting of <parameter>
4162 printing</parameter></emphasis></para>
4164 <para>Example: <command>lpq command = /usr/bin/lpq -P%p</command></para>
4165 </listitem>
4166 </varlistentry>
4170 <varlistentry>
4171 <term><anchor id="LPRESUMECOMMAND">lpresume command (S)</term>
4172 <listitem><para>This parameter specifies the command to be
4173 executed on the server host in order to restart or continue
4174 printing or spooling a specific print job.</para>
4176 <para>This command should be a program or script which takes
4177 a printer name and job number to resume the print job. See
4178 also the <link linkend="LPPAUSECOMMAND"><parameter>lppause command
4179 </parameter></link> parameter.</para>
4181 <para>If a <parameter>%p</parameter> is given then the printer name
4182 is put in its place. A <parameter>%j</parameter> is replaced with
4183 the job number (an integer).</para>
4185 <para>Note that it is good practice to include the absolute path
4186 in the <parameter>lpresume command</parameter> as the PATH may not
4187 be available to the server.</para>
4189 <para>See also the <link linkend="PRINTING"><parameter>printing
4190 </parameter></link> parameter.</para>
4192 <para>Default: Currently no default value is given
4193 to this string, unless the value of the <parameter>printing</parameter>
4194 parameter is <constant>SYSV</constant>, in which case the default is :</para>
4196 <para><command>lp -i %p-%j -H resume</command></para>
4198 <para>or if the value of the <parameter>printing</parameter> parameter
4199 is <constant>SOFTQ</constant>, then the default is:</para>
4201 <para><command>qstat -s -j%j -r</command></para>
4203 <para>Example for HPUX: <command>lpresume command = /usr/bin/lpalt
4204 %p-%j -p2</command></para>
4205 </listitem>
4206 </varlistentry>
4210 <varlistentry>
4211 <term><anchor id="LPRMCOMMAND">lprm command (S)</term>
4212 <listitem><para>This parameter specifies the command to be
4213 executed on the server host in order to delete a print job.</para>
4215 <para>This command should be a program or script which takes
4216 a printer name and job number, and deletes the print job.</para>
4218 <para>If a <parameter>%p</parameter> is given then the printer name
4219 is put in its place. A <parameter>%j</parameter> is replaced with
4220 the job number (an integer).</para>
4222 <para>Note that it is good practice to include the absolute
4223 path in the <parameter>lprm command</parameter> as the PATH may not be
4224 available to the server.</para>
4226 <para>See also the <link linkend="PRINTING"><parameter>printing
4227 </parameter></link> parameter.</para>
4229 <para>Default: <emphasis>depends on the setting of <parameter>printing
4230 </parameter></emphasis></para>
4232 <para>Example 1: <command>lprm command = /usr/bin/lprm -P%p %j
4233 </command></para>
4234 <para>Example 2: <command>lprm command = /usr/bin/cancel %p-%j
4235 </command></para></listitem>
4236 </varlistentry>
4240 <varlistentry>
4241 <term><anchor id="MACHINEPASSWORDTIMEOUT">machine password timeout (G)</term>
4242 <listitem><para>If a Samba server is a member of a Windows
4243 NT Domain (see the <link linkend="SECURITYEQUALSDOMAIN">security = domain</link>)
4244 parameter) then periodically a running <ulink url="smbd.8.html">
4245 smbd(8)</ulink> process will try and change the MACHINE ACCOUNT
4246 PASSWORD stored in the TDB called <filename>private/secrets.tdb
4247 </filename>. This parameter specifies how often this password
4248 will be changed, in seconds. The default is one week (expressed in
4249 seconds), the same as a Windows NT Domain member server.</para>
4251 <para>See also <ulink url="smbpasswd.8.html"><command>smbpasswd(8)
4252 </command></ulink>, and the <link linkend="SECURITYEQUALSDOMAIN">
4253 security = domain</link>) parameter.</para>
4255 <para>Default: <command>machine password timeout = 604800</command></para>
4256 </listitem>
4257 </varlistentry>
4260 <varlistentry>
4261 <term><anchor id="MAGICOUTPUT">magic output (S)</term>
4262 <listitem><para>This parameter specifies the name of a file
4263 which will contain output created by a magic script (see the
4264 <link linkend="MAGICSCRIPT"><parameter>magic script</parameter></link>
4265 parameter below).</para>
4267 <para>Warning: If two clients use the same <parameter>magic script
4268 </parameter> in the same directory the output file content
4269 is undefined.</para>
4271 <para>Default: <command>magic output = &lt;magic script name&gt;.out
4272 </command></para>
4274 <para>Example: <command>magic output = myfile.txt</command></para>
4275 </listitem>
4276 </varlistentry>
4280 <varlistentry>
4281 <term><anchor id="MAGICSCRIPT">magic script (S)</term>
4282 <listitem><para>This parameter specifies the name of a file which,
4283 if opened, will be executed by the server when the file is closed.
4284 This allows a UNIX script to be sent to the Samba host and
4285 executed on behalf of the connected user.</para>
4287 <para>Scripts executed in this way will be deleted upon
4288 completion assuming that the user has the appropriate level
4289 of privilege and the file permissions allow the deletion.</para>
4291 <para>If the script generates output, output will be sent to
4292 the file specified by the <link linkend="MAGICOUTPUT"><parameter>
4293 magic output</parameter></link> parameter (see above).</para>
4295 <para>Note that some shells are unable to interpret scripts
4296 containing CR/LF instead of CR as
4297 the end-of-line marker. Magic scripts must be executable
4298 <emphasis>as is</emphasis> on the host, which for some hosts and
4299 some shells will require filtering at the DOS end.</para>
4301 <para>Magic scripts are <emphasis>EXPERIMENTAL</emphasis> and
4302 should <emphasis>NOT</emphasis> be relied upon.</para>
4304 <para>Default: <emphasis>None. Magic scripts disabled.</emphasis></para>
4305 <para>Example: <command>magic script = user.csh</command></para>
4306 </listitem>
4307 </varlistentry>
4311 <varlistentry>
4312 <term><anchor id="MANGLECASE">mangle case (S)</term>
4313 <listitem><para>See the section on <link linkend="NAMEMANGLINGSECT">
4314 NAME MANGLING</link></para>
4316 <para>Default: <command>mangle case = no</command></para>
4317 </listitem>
4318 </varlistentry>
4321 <varlistentry>
4322 <term><anchor id="MANGLEDMAP">mangled map (S)</term>
4323 <listitem><para>This is for those who want to directly map UNIX
4324 file names which cannot be represented on Windows/DOS. The mangling
4325 of names is not always what is needed. In particular you may have
4326 documents with file extensions that differ between DOS and UNIX.
4327 For example, under UNIX it is common to use <filename>.html</filename>
4328 for HTML files, whereas under Windows/DOS <filename>.htm</filename>
4329 is more commonly used.</para>
4331 <para>So to map <filename>html</filename> to <filename>htm</filename>
4332 you would use:</para>
4334 <para><command>mangled map = (*.html *.htm)</command></para>
4336 <para>One very useful case is to remove the annoying <filename>;1
4337 </filename> off the ends of filenames on some CDROMs (only visible
4338 under some UNIXes). To do this use a map of (*;1 *;).</para>
4340 <para>Default: <emphasis>no mangled map</emphasis></para>
4341 <para>Example: <command>mangled map = (*;1 *;)</command></para>
4342 </listitem>
4343 </varlistentry>
4346 <varlistentry>
4347 <term><anchor id="MANGLEDNAMES">mangled names (S)</term>
4348 <listitem><para>This controls whether non-DOS names under UNIX
4349 should be mapped to DOS-compatible names ("mangled") and made visible,
4350 or whether non-DOS names should simply be ignored.</para>
4352 <para>See the section on <link linkend="NAMEMANGLINGSECT">
4353 NAME MANGLING</link> for details on how to control the mangling process.</para>
4355 <para>If mangling algorithm "hash" is used then the mangling algorithm is as follows:</para>
4357 <itemizedlist>
4358 <listitem><para>The first (up to) five alphanumeric characters
4359 before the rightmost dot of the filename are preserved, forced
4360 to upper case, and appear as the first (up to) five characters
4361 of the mangled name.</para></listitem>
4363 <listitem><para>A tilde "~" is appended to the first part of the mangled
4364 name, followed by a two-character unique sequence, based on the
4365 original root name (i.e., the original filename minus its final
4366 extension). The final extension is included in the hash calculation
4367 only if it contains any upper case characters or is longer than three
4368 characters.</para>
4370 <para>Note that the character to use may be specified using
4371 the <link linkend="MANGLINGCHAR"><parameter>mangling char</parameter>
4372 </link> option, if you don't like '~'.</para></listitem>
4374 <listitem><para>The first three alphanumeric characters of the final
4375 extension are preserved, forced to upper case and appear as the
4376 extension of the mangled name. The final extension is defined as that
4377 part of the original filename after the rightmost dot. If there are no
4378 dots in the filename, the mangled name will have no extension (except
4379 in the case of "hidden files" - see below).</para></listitem>
4381 <listitem><para>Files whose UNIX name begins with a dot will be
4382 presented as DOS hidden files. The mangled name will be created as
4383 for other filenames, but with the leading dot removed and "___" as
4384 its extension regardless of actual original extension (that's three
4385 underscores).</para></listitem>
4386 </itemizedlist>
4388 <para>The two-digit hash value consists of upper case
4389 alphanumeric characters.</para>
4391 <para>This algorithm can cause name collisions only if files
4392 in a directory share the same first five alphanumeric characters.
4393 The probability of such a clash is 1/1300.</para>
4395 <para>If mangling algorithm "hash2" is used then the mangling algorithm is as follows:</para>
4397 <itemizedlist>
4398 <listitem><para>The first alphanumeric character
4399 before the rightmost dot of the filename is preserved, forced
4400 to upper case, and appears as the first character of the mangled name.
4401 </para></listitem>
4403 <listitem><para>A base63 hash of 5 characters is generated and the
4404 first 4 characters of that hash are appended to the first character.
4405 </para></listitem>
4407 <listitem><para>A tilde "~" is appended to the first part of the mangled
4408 name, followed by the final character of the base36 hash of the name.
4409 </para>
4411 <para>Note that the character to use may be specified using
4412 the <link linkend="MANGLINGCHAR"><parameter>mangling char</parameter>
4413 </link> option, if you don't like '~'.</para></listitem>
4415 <listitem><para>The first three alphanumeric characters of the final
4416 extension are preserved, forced to upper case and appear as the
4417 extension of the mangled name. The final extension is defined as that
4418 part of the original filename after the rightmost dot. If there are no
4419 dots in the filename, the mangled name will have no extension (except
4420 in the case of "hidden files" - see below).</para></listitem>
4422 <listitem><para>Files whose UNIX name begins with a dot will be
4423 presented as DOS hidden files. The mangled name will be created as
4424 for other filenames, but with the leading dot removed and "___" as
4425 its extension regardless of actual original extension (that's three
4426 underscores).</para></listitem>
4427 </itemizedlist>
4429 <para>The name mangling (if enabled) allows a file to be
4430 copied between UNIX directories from Windows/DOS while retaining
4431 the long UNIX filename. UNIX files can be renamed to a new extension
4432 from Windows/DOS and will retain the same basename. Mangled names
4433 do not change between sessions.</para>
4435 <para>Default: <command>mangled names = yes</command></para>
4436 </listitem>
4437 </varlistentry>
4441 <varlistentry>
4442 <term><anchor id="MANGLEDSTACK">mangled stack (G)</term>
4443 <listitem><para>This parameter controls the number of mangled names
4444 that should be cached in the Samba server <ulink url="smbd.8.html">
4445 smbd(8)</ulink>.</para>
4447 <para>This stack is a list of recently mangled base names
4448 (extensions are only maintained if they are longer than 3 characters
4449 or contains upper case characters).</para>
4451 <para>The larger this value, the more likely it is that mangled
4452 names can be successfully converted to correct long UNIX names.
4453 However, large stack sizes will slow most directory accesses. Smaller
4454 stacks save memory in the server (each stack element costs 256 bytes).
4455 </para>
4457 <para>It is not possible to absolutely guarantee correct long
4458 filenames, so be prepared for some surprises!</para>
4460 <para>Default: <command>mangled stack = 50</command></para>
4461 <para>Example: <command>mangled stack = 100</command></para>
4462 </listitem>
4463 </varlistentry>
4468 <varlistentry>
4469 <term><anchor id="MANGLINGCHAR">mangling char (S)</term>
4470 <listitem><para>This controls what character is used as
4471 the <emphasis>magic</emphasis> character in <link
4472 linkend="NAMEMANGLINGSECT">name mangling</link>. The default is a '~'
4473 but this may interfere with some software. Use this option to set
4474 it to whatever you prefer.</para>
4476 <para>Default: <command>mangling char = ~</command></para>
4477 <para>Example: <command>mangling char = ^</command></para>
4478 </listitem>
4479 </varlistentry>
4482 <varlistentry>
4483 <term><anchor id="MANGLINGMETHOD">mangling mathod(G)</term>
4484 <listitem><para> controls the algorithm used for the generating
4485 the mangled names. Can take two different values, "hash" and
4486 "hash2". "hash" is the default and is the algorithm that has been
4487 used in Samba for many years. "hash2" is a newer and considered
4488 a better algorithm (generates less collisions) in the names.
4489 However, many Win32 applications store the mangled names and so
4490 changing to the new algorithm must not be done
4491 lightly as these applications may break unless reinstalled.
4492 New installations of Samba may set the default to hash2.</para>
4493 <para>Default: <command>mangling method = hash</command></para>
4494 <para>Example: <command>mangling method = hash2</command></para>
4495 </listitem>
4496 </varlistentry>
4500 <varlistentry>
4501 <term><anchor id="MAPARCHIVE">map archive (S)</term>
4502 <listitem><para>This controls whether the DOS archive attribute
4503 should be mapped to the UNIX owner execute bit. The DOS archive bit
4504 is set when a file has been modified since its last backup. One
4505 motivation for this option it to keep Samba/your PC from making
4506 any file it touches from becoming executable under UNIX. This can
4507 be quite annoying for shared source code, documents, etc...</para>
4509 <para>Note that this requires the <parameter>create mask</parameter>
4510 parameter to be set such that owner execute bit is not masked out
4511 (i.e. it must include 100). See the parameter <link linkend="CREATEMASK">
4512 <parameter>create mask</parameter></link> for details.</para>
4514 <para>Default: <command>map archive = yes</command></para>
4515 </listitem>
4516 </varlistentry>
4520 <varlistentry>
4521 <term><anchor id="MAPHIDDEN">map hidden (S)</term>
4522 <listitem><para>This controls whether DOS style hidden files
4523 should be mapped to the UNIX world execute bit.</para>
4525 <para>Note that this requires the <parameter>create mask</parameter>
4526 to be set such that the world execute bit is not masked out (i.e.
4527 it must include 001). See the parameter <link linkend="CREATEMASK">
4528 <parameter>create mask</parameter></link> for details.</para>
4530 <para>Default: <command>map hidden = no</command></para>
4531 </listitem>
4532 </varlistentry>
4535 <varlistentry>
4536 <term><anchor id="MAPSYSTEM">map system (S)</term>
4537 <listitem><para>This controls whether DOS style system files
4538 should be mapped to the UNIX group execute bit.</para>
4540 <para>Note that this requires the <parameter>create mask</parameter>
4541 to be set such that the group execute bit is not masked out (i.e.
4542 it must include 010). See the parameter <link linkend="CREATEMASK">
4543 <parameter>create mask</parameter></link> for details.</para>
4545 <para>Default: <command>map system = no</command></para>
4546 </listitem>
4547 </varlistentry>
4550 <varlistentry>
4551 <term><anchor id="MAPTOGUEST">map to guest (G)</term>
4552 <listitem><para>This parameter is only useful in <link linkend="SECURITY">
4553 security</link> modes other than <parameter>security = share</parameter>
4554 - i.e. <constant>user</constant>, <constant>server</constant>,
4555 and <constant>domain</constant>.</para>
4557 <para>This parameter can take three different values, which tell
4558 <ulink url="smbd.8.html">smbd(8)</ulink> what to do with user
4559 login requests that don't match a valid UNIX user in some way.</para>
4561 <para>The three settings are :</para>
4563 <itemizedlist>
4564 <listitem><para><constant>Never</constant> - Means user login
4565 requests with an invalid password are rejected. This is the
4566 default.</para></listitem>
4568 <listitem><para><constant>Bad User</constant> - Means user
4569 logins with an invalid password are rejected, unless the username
4570 does not exist, in which case it is treated as a guest login and
4571 mapped into the <link linkend="GUESTACCOUNT"><parameter>
4572 guest account</parameter></link>.</para></listitem>
4574 <listitem><para><constant>Bad Password</constant> - Means user logins
4575 with an invalid password are treated as a guest login and mapped
4576 into the <link linkend="GUESTACCOUNT">guest account</link>. Note that
4577 this can cause problems as it means that any user incorrectly typing
4578 their password will be silently logged on as "guest" - and
4579 will not know the reason they cannot access files they think
4580 they should - there will have been no message given to them
4581 that they got their password wrong. Helpdesk services will
4582 <emphasis>hate</emphasis> you if you set the <parameter>map to
4583 guest</parameter> parameter this way :-).</para></listitem>
4584 </itemizedlist>
4586 <para>Note that this parameter is needed to set up "Guest"
4587 share services when using <parameter>security</parameter> modes other than
4588 share. This is because in these modes the name of the resource being
4589 requested is <emphasis>not</emphasis> sent to the server until after
4590 the server has successfully authenticated the client so the server
4591 cannot make authentication decisions at the correct time (connection
4592 to the share) for "Guest" shares.</para>
4594 <para>For people familiar with the older Samba releases, this
4595 parameter maps to the old compile-time setting of the <constant>
4596 GUEST_SESSSETUP</constant> value in local.h.</para>
4598 <para>Default: <command>map to guest = Never</command></para>
4599 <para>Example: <command>map to guest = Bad User</command></para>
4600 </listitem>
4601 </varlistentry>
4605 <varlistentry>
4606 <term><anchor id="MAXCONNECTIONS">max connections (S)</term>
4607 <listitem><para>This option allows the number of simultaneous
4608 connections to a service to be limited. If <parameter>max connections
4609 </parameter> is greater than 0 then connections will be refused if
4610 this number of connections to the service are already open. A value
4611 of zero mean an unlimited number of connections may be made.</para>
4613 <para>Record lock files are used to implement this feature. The
4614 lock files will be stored in the directory specified by the <link
4615 linkend="LOCKDIRECTORY"><parameter>lock directory</parameter></link>
4616 option.</para>
4618 <para>Default: <command>max connections = 0</command></para>
4619 <para>Example: <command>max connections = 10</command></para>
4620 </listitem>
4621 </varlistentry>
4625 <varlistentry>
4626 <term><anchor id="MAXDISKSIZE">max disk size (G)</term>
4627 <listitem><para>This option allows you to put an upper limit
4628 on the apparent size of disks. If you set this option to 100
4629 then all shares will appear to be not larger than 100 MB in
4630 size.</para>
4632 <para>Note that this option does not limit the amount of
4633 data you can put on the disk. In the above case you could still
4634 store much more than 100 MB on the disk, but if a client ever asks
4635 for the amount of free disk space or the total disk size then the
4636 result will be bounded by the amount specified in <parameter>max
4637 disk size</parameter>.</para>
4639 <para>This option is primarily useful to work around bugs
4640 in some pieces of software that can't handle very large disks,
4641 particularly disks over 1GB in size.</para>
4643 <para>A <parameter>max disk size</parameter> of 0 means no limit.</para>
4645 <para>Default: <command>max disk size = 0</command></para>
4646 <para>Example: <command>max disk size = 1000</command></para>
4647 </listitem>
4648 </varlistentry>
4652 <varlistentry>
4653 <term><anchor id="MAXLOGSIZE">max log size (G)</term>
4654 <listitem><para>This option (an integer in kilobytes) specifies
4655 the max size the log file should grow to. Samba periodically checks
4656 the size and if it is exceeded it will rename the file, adding
4657 a <filename>.old</filename> extension.</para>
4659 <para>A size of 0 means no limit.</para>
4661 <para>Default: <command>max log size = 5000</command></para>
4662 <para>Example: <command>max log size = 1000</command></para>
4663 </listitem>
4664 </varlistentry>
4668 <varlistentry>
4669 <term><anchor id="MAXMUX">max mux (G)</term>
4670 <listitem><para>This option controls the maximum number of
4671 outstanding simultaneous SMB operations that Samba tells the client
4672 it will allow. You should never need to set this parameter.</para>
4674 <para>Default: <command>max mux = 50</command></para>
4675 </listitem>
4676 </varlistentry>
4680 <varlistentry>
4681 <term><anchor id="MAXOPENFILES">max open files (G)</term>
4682 <listitem><para>This parameter limits the maximum number of
4683 open files that one <ulink url="smbd.8.html">smbd(8)</ulink> file
4684 serving process may have open for a client at any one time. The
4685 default for this parameter is set very high (10,000) as Samba uses
4686 only one bit per unopened file.</para>
4688 <para>The limit of the number of open files is usually set
4689 by the UNIX per-process file descriptor limit rather than
4690 this parameter so you should never need to touch this parameter.</para>
4692 <para>Default: <command>max open files = 10000</command></para>
4693 </listitem>
4694 </varlistentry>
4698 <varlistentry>
4699 <term><anchor id="MAXPRINTJOBS">max print jobs (S)</term>
4700 <listitem><para>This parameter limits the maximum number of
4701 jobs allowable in a Samba printer queue at any given moment.
4702 If this number is exceeded, <ulink url="smbd.8.html"><command>
4703 smbd(8)</command></ulink> will remote "Out of Space" to the client.
4704 See all <link linkend="TOTALPRINTJOBS"><parameter>total
4705 print jobs</parameter></link>.
4706 </para>
4708 <para>Default: <command>max print jobs = 1000</command></para>
4709 <para>Example: <command>max print jobs = 5000</command></para>
4710 </listitem>
4711 </varlistentry>
4714 <varlistentry>
4715 <term><anchor id="MAXPROTOCOL">max protocol (G)</term>
4716 <listitem><para>The value of the parameter (a string) is the highest
4717 protocol level that will be supported by the server.</para>
4719 <para>Possible values are :</para>
4720 <itemizedlist>
4721 <listitem><para><constant>CORE</constant>: Earliest version. No
4722 concept of user names.</para></listitem>
4724 <listitem><para><constant>COREPLUS</constant>: Slight improvements on
4725 CORE for efficiency.</para></listitem>
4727 <listitem><para><constant>LANMAN1</constant>: First <emphasis>
4728 modern</emphasis> version of the protocol. Long filename
4729 support.</para></listitem>
4731 <listitem><para><constant>LANMAN2</constant>: Updates to Lanman1 protocol.
4732 </para></listitem>
4734 <listitem><para><constant>NT1</constant>: Current up to date version of
4735 the protocol. Used by Windows NT. Known as CIFS.</para></listitem>
4736 </itemizedlist>
4738 <para>Normally this option should not be set as the automatic
4739 negotiation phase in the SMB protocol takes care of choosing
4740 the appropriate protocol.</para>
4742 <para>See also <link linkend="MINPROTOCOL"><parameter>min
4743 protocol</parameter></link></para>
4745 <para>Default: <command>max protocol = NT1</command></para>
4746 <para>Example: <command>max protocol = LANMAN1</command></para>
4747 </listitem>
4748 </varlistentry>
4752 <varlistentry>
4753 <term><anchor id="MAXSMBDPROCESSES">max smbd processes (G)</term>
4754 <listitem><para>This parameter limits the maximum number of
4755 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
4756 processes concurrently running on a system and is intended
4757 as a stopgap to prevent degrading service to clients in the event
4758 that the server has insufficient resources to handle more than this
4759 number of connections. Remember that under normal operating
4760 conditions, each user will have an <ulink url="smbd.8.html">smbd</ulink> associated with him or her
4761 to handle connections to all shares from a given host.
4762 </para>
4764 <para>Default: <command>max smbd processes = 0</command> ## no limit</para>
4765 <para>Example: <command>max smbd processes = 1000</command></para>
4766 </listitem>
4767 </varlistentry>
4772 <varlistentry>
4773 <term><anchor id="MAXTTL">max ttl (G)</term>
4774 <listitem><para>This option tells <ulink url="nmbd.8.html">nmbd(8)</ulink>
4775 what the default 'time to live' of NetBIOS names should be (in seconds)
4776 when <command>nmbd</command> is requesting a name using either a
4777 broadcast packet or from a WINS server. You should never need to
4778 change this parameter. The default is 3 days.</para>
4780 <para>Default: <command>max ttl = 259200</command></para>
4781 </listitem>
4782 </varlistentry>
4786 <varlistentry>
4787 <term><anchor id="MAXWINSTTL">max wins ttl (G)</term>
4788 <listitem><para>This option tells <ulink url="nmbd.8.html">nmbd(8)
4789 </ulink> when acting as a WINS server (<link linkend="WINSSUPPORT">
4790 <parameter>wins support = yes</parameter></link>) what the maximum
4791 'time to live' of NetBIOS names that <command>nmbd</command>
4792 will grant will be (in seconds). You should never need to change this
4793 parameter. The default is 6 days (518400 seconds).</para>
4795 <para>See also the <link linkend="MINWINSTTL"><parameter>min
4796 wins ttl</parameter></link> parameter.</para>
4798 <para>Default: <command>max wins ttl = 518400</command></para>
4799 </listitem>
4800 </varlistentry>
4804 <varlistentry>
4805 <term><anchor id="MAXXMIT">max xmit (G)</term>
4806 <listitem><para>This option controls the maximum packet size
4807 that will be negotiated by Samba. The default is 65535, which
4808 is the maximum. In some cases you may find you get better performance
4809 with a smaller value. A value below 2048 is likely to cause problems.
4810 </para>
4812 <para>Default: <command>max xmit = 65535</command></para>
4813 <para>Example: <command>max xmit = 8192</command></para>
4814 </listitem>
4815 </varlistentry>
4819 <varlistentry>
4820 <term><anchor id="MESSAGECOMMAND">message command (G)</term>
4821 <listitem><para>This specifies what command to run when the
4822 server receives a WinPopup style message.</para>
4824 <para>This would normally be a command that would
4825 deliver the message somehow. How this is to be done is
4826 up to your imagination.</para>
4828 <para>An example is:</para>
4830 <para><command>message command = csh -c 'xedit %s;rm %s' &</command>
4831 </para>
4833 <para>This delivers the message using <command>xedit</command>, then
4834 removes it afterwards. <emphasis>NOTE THAT IT IS VERY IMPORTANT
4835 THAT THIS COMMAND RETURN IMMEDIATELY</emphasis>. That's why I
4836 have the '&' on the end. If it doesn't return immediately then
4837 your PCs may freeze when sending messages (they should recover
4838 after 30 seconds, hopefully).</para>
4840 <para>All messages are delivered as the global guest user.
4841 The command takes the standard substitutions, although <parameter>
4842 %u</parameter> won't work (<parameter>%U</parameter> may be better
4843 in this case).</para>
4845 <para>Apart from the standard substitutions, some additional
4846 ones apply. In particular:</para>
4848 <itemizedlist>
4849 <listitem><para><parameter>%s</parameter> = the filename containing
4850 the message.</para></listitem>
4852 <listitem><para><parameter>%t</parameter> = the destination that
4853 the message was sent to (probably the server name).</para></listitem>
4855 <listitem><para><parameter>%f</parameter> = who the message
4856 is from.</para></listitem>
4857 </itemizedlist>
4859 <para>You could make this command send mail, or whatever else
4860 takes your fancy. Please let us know of any really interesting
4861 ideas you have.</para>
4864 <para>Here's a way of sending the messages as mail to root:</para>
4866 <para><command>message command = /bin/mail -s 'message from %f on
4867 %m' root &lt; %s; rm %s</command></para>
4869 <para>If you don't have a message command then the message
4870 won't be delivered and Samba will tell the sender there was
4871 an error. Unfortunately WfWg totally ignores the error code
4872 and carries on regardless, saying that the message was delivered.
4873 </para>
4875 <para>If you want to silently delete it then try:</para>
4877 <para><command>message command = rm %s</command></para>
4879 <para>Default: <emphasis>no message command</emphasis></para>
4880 <para>Example: <command>message command = csh -c 'xedit %s;
4881 rm %s' &</command></para>
4882 </listitem>
4883 </varlistentry>
4888 <varlistentry>
4889 <term><anchor id="MINPASSWDLENGTH">min passwd length (G)</term>
4890 <listitem><para>Synonym for <link linkend="MINPASSWORDLENGTH">
4891 <parameter>min password length</parameter></link>.</para>
4892 </listitem>
4893 </varlistentry>
4897 <varlistentry>
4898 <term><anchor id="MINPASSWORDLENGTH">min password length (G)</term>
4899 <listitem><para>This option sets the minimum length in characters
4900 of a plaintext password that <command>smbd</command> will accept when performing
4901 UNIX password changing.</para>
4903 <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix
4904 password sync</parameter></link>, <link linkend="PASSWDPROGRAM">
4905 <parameter>passwd program</parameter></link> and <link
4906 linkend="PASSWDCHATDEBUG"><parameter>passwd chat debug</parameter>
4907 </link>.</para>
4909 <para>Default: <command>min password length = 5</command></para>
4910 </listitem>
4911 </varlistentry>
4915 <varlistentry>
4916 <term><anchor id="MINPRINTSPACE">min print space (S)</term>
4917 <listitem><para>This sets the minimum amount of free disk
4918 space that must be available before a user will be able to spool
4919 a print job. It is specified in kilobytes. The default is 0, which
4920 means a user can always spool a print job.</para>
4922 <para>See also the <link linkend="PRINTING"><parameter>printing
4923 </parameter></link> parameter.</para>
4925 <para>Default: <command>min print space = 0</command></para>
4926 <para>Example: <command>min print space = 2000</command></para>
4927 </listitem>
4928 </varlistentry>
4933 <varlistentry>
4934 <term><anchor id="MINPROTOCOL">min protocol (G)</term>
4935 <listitem><para>The value of the parameter (a string) is the
4936 lowest SMB protocol dialect than Samba will support. Please refer
4937 to the <link linkend="MAXPROTOCOL"><parameter>max protocol</parameter></link>
4938 parameter for a list of valid protocol names and a brief description
4939 of each. You may also wish to refer to the C source code in
4940 <filename>source/smbd/negprot.c</filename> for a listing of known protocol
4941 dialects supported by clients.</para>
4943 <para>If you are viewing this parameter as a security measure, you should
4944 also refer to the <link linkend="LANMANAUTH"><parameter>lanman
4945 auth</parameter></link> parameter. Otherwise, you should never need
4946 to change this parameter.</para>
4948 <para>Default : <command>min protocol = CORE</command></para>
4949 <para>Example : <command>min protocol = NT1</command> # disable DOS
4950 clients</para>
4951 </listitem>
4952 </varlistentry>
4957 <varlistentry>
4958 <term><anchor id="MINWINSTTL">min wins ttl (G)</term>
4959 <listitem><para>This option tells <ulink url="nmbd.8.html">nmbd(8)</ulink>
4960 when acting as a WINS server (<link linkend="WINSSUPPORT"><parameter>
4961 wins support = yes</parameter></link>) what the minimum 'time to live'
4962 of NetBIOS names that <command>nmbd</command> will grant will be (in
4963 seconds). You should never need to change this parameter. The default
4964 is 6 hours (21600 seconds).</para>
4966 <para>Default: <command>min wins ttl = 21600</command></para>
4967 </listitem>
4968 </varlistentry>
4973 <varlistentry>
4974 <term><anchor id="MSDFSROOT">msdfs root (S)</term>
4975 <listitem><para>This boolean parameter is only available if
4976 Samba is configured and compiled with the <command>
4977 --with-msdfs</command> option. If set to <constant>yes</constant>,
4978 Samba treats the share as a Dfs root and allows clients to browse
4979 the distributed file system tree rooted at the share directory.
4980 Dfs links are specified in the share directory by symbolic
4981 links of the form <filename>msdfs:serverA\shareA,serverB\shareB
4982 </filename> and so on. For more information on setting up a Dfs tree
4983 on Samba, refer to <ulink url="msdfs_setup.html">msdfs_setup.html
4984 </ulink>.</para>
4986 <para>See also <link linkend="HOSTMSDFS"><parameter>host msdfs
4987 </parameter></link></para>
4989 <para>Default: <command>msdfs root = no</command></para>
4990 </listitem>
4991 </varlistentry>
4994 <varlistentry>
4995 <term><anchor id="NAMERESOLVEORDER">name resolve order (G)</term>
4996 <listitem><para>This option is used by the programs in the Samba
4997 suite to determine what naming services to use and in what order
4998 to resolve host names to IP addresses. The option takes a space
4999 separated string of name resolution options.</para>
5001 <para>The options are :"lmhosts", "host", "wins" and "bcast". They
5002 cause names to be resolved as follows :</para>
5004 <itemizedlist>
5005 <listitem><para><constant>lmhosts</constant> : Lookup an IP
5006 address in the Samba lmhosts file. If the line in lmhosts has
5007 no name type attached to the NetBIOS name (see the <ulink
5008 url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
5009 any name type matches for lookup.</para></listitem>
5011 <listitem><para><constant>host</constant> : Do a standard host
5012 name to IP address resolution, using the system <filename>/etc/hosts
5013 </filename>, NIS, or DNS lookups. This method of name resolution
5014 is operating system depended for instance on IRIX or Solaris this
5015 may be controlled by the <filename>/etc/nsswitch.conf</filename>
5016 file. Note that this method is only used if the NetBIOS name
5017 type being queried is the 0x20 (server) name type, otherwise
5018 it is ignored.</para></listitem>
5020 <listitem><para><constant>wins</constant> : Query a name with
5021 the IP address listed in the <link linkend="WINSSERVER"><parameter>
5022 wins server</parameter></link> parameter. If no WINS server has
5023 been specified this method will be ignored.</para></listitem>
5025 <listitem><para><constant>bcast</constant> : Do a broadcast on
5026 each of the known local interfaces listed in the <link
5027 linkend="INTERFACES"><parameter>interfaces</parameter></link>
5028 parameter. This is the least reliable of the name resolution
5029 methods as it depends on the target host being on a locally
5030 connected subnet.</para></listitem>
5031 </itemizedlist>
5033 <para>Default: <command>name resolve order = lmhosts host wins bcast
5034 </command></para>
5035 <para>Example: <command>name resolve order = lmhosts bcast host
5036 </command></para>
5038 <para>This will cause the local lmhosts file to be examined
5039 first, followed by a broadcast attempt, followed by a normal
5040 system hostname lookup.</para>
5041 </listitem>
5042 </varlistentry>
5047 <varlistentry>
5048 <term><anchor id="NETBIOSALIASES">netbios aliases (G)</term>
5049 <listitem><para>This is a list of NetBIOS names that <ulink
5050 url="nmbd.8.html">nmbd(8)</ulink> will advertise as additional
5051 names by which the Samba server is known. This allows one machine
5052 to appear in browse lists under multiple names. If a machine is
5053 acting as a browse server or logon server none
5054 of these names will be advertised as either browse server or logon
5055 servers, only the primary name of the machine will be advertised
5056 with these capabilities.</para>
5058 <para>See also <link linkend="NETBIOSNAME"><parameter>netbios
5059 name</parameter></link>.</para>
5061 <para>Default: <emphasis>empty string (no additional names)</emphasis></para>
5062 <para>Example: <command>netbios aliases = TEST TEST1 TEST2</command></para>
5063 </listitem>
5064 </varlistentry>
5068 <varlistentry>
5069 <term><anchor id="NETBIOSNAME">netbios name (G)</term>
5070 <listitem><para>This sets the NetBIOS name by which a Samba
5071 server is known. By default it is the same as the first component
5072 of the host's DNS name. If a machine is a browse server or
5073 logon server this name (or the first component
5074 of the hosts DNS name) will be the name that these services are
5075 advertised under.</para>
5077 <para>See also <link linkend="NETBIOSALIASES"><parameter>netbios
5078 aliases</parameter></link>.</para>
5080 <para>Default: <emphasis>machine DNS name</emphasis></para>
5081 <para>Example: <command>netbios name = MYNAME</command></para>
5082 </listitem>
5083 </varlistentry>
5087 <varlistentry>
5088 <term><anchor id="NETBIOSSCOPE">netbios scope (G)</term>
5089 <listitem><para>This sets the NetBIOS scope that Samba will
5090 operate under. This should not be set unless every machine
5091 on your LAN also sets this value.</para>
5092 </listitem>
5093 </varlistentry>
5096 <varlistentry>
5097 <term><anchor id="NISHOMEDIR">nis homedir (G)</term>
5098 <listitem><para>Get the home share server from a NIS map. For
5099 UNIX systems that use an automounter, the user's home directory
5100 will often be mounted on a workstation on demand from a remote
5101 server. </para>
5103 <para>When the Samba logon server is not the actual home directory
5104 server, but is mounting the home directories via NFS then two
5105 network hops would be required to access the users home directory
5106 if the logon server told the client to use itself as the SMB server
5107 for home directories (one over SMB and one over NFS). This can
5108 be very slow.</para>
5110 <para>This option allows Samba to return the home share as
5111 being on a different server to the logon server and as
5112 long as a Samba daemon is running on the home directory server,
5113 it will be mounted on the Samba client directly from the directory
5114 server. When Samba is returning the home share to the client, it
5115 will consult the NIS map specified in <link linkend="HOMEDIRMAP">
5116 <parameter>homedir map</parameter></link> and return the server
5117 listed there.</para>
5119 <para>Note that for this option to work there must be a working
5120 NIS system and the Samba server with this option must also
5121 be a logon server.</para>
5123 <para>Default: <command>nis homedir = no</command></para>
5124 </listitem>
5125 </varlistentry>
5129 <varlistentry>
5130 <term><anchor id="NTACLSUPPORT">nt acl support (S)</term>
5131 <listitem><para>This boolean parameter controls whether
5132 <ulink url="smbd.8.html">smbd(8)</ulink> will attempt to map
5133 UNIX permissions into Windows NT access control lists.
5134 This parameter was formally a global parameter in releases
5135 prior to 2.2.2.</para>
5137 <para>Default: <command>nt acl support = yes</command></para>
5138 </listitem>
5139 </varlistentry>
5143 <varlistentry>
5144 <term><anchor id="NTPIPESUPPORT">nt pipe support (G)</term>
5145 <listitem><para>This boolean parameter controls whether
5146 <ulink url="smbd.8.html">smbd(8)</ulink> will allow Windows NT
5147 clients to connect to the NT SMB specific <constant>IPC$</constant>
5148 pipes. This is a developer debugging option and can be left
5149 alone.</para>
5151 <para>Default: <command>nt pipe support = yes</command></para>
5152 </listitem>
5153 </varlistentry>
5157 <varlistentry>
5158 <term><anchor id="NTSMBSUPPORT">nt smb support (G)</term>
5159 <listitem><para>This boolean parameter controls whether <ulink
5160 url="smbd.8.html">smbd(8)</ulink> will negotiate NT specific SMB
5161 support with Windows NT/2k/XP clients. Although this is a developer
5162 debugging option and should be left alone, benchmarking has discovered
5163 that Windows NT clients give faster performance with this option
5164 set to <constant>no</constant>. This is still being investigated.
5165 If this option is set to <constant>no</constant> then Samba offers
5166 exactly the same SMB calls that versions prior to Samba 2.0 offered.
5167 This information may be of use if any users are having problems
5168 with NT SMB support.</para>
5170 <para>You should not need to ever disable this parameter.</para>
5172 <para>Default: <command>nt smb support = yes</command></para>
5173 </listitem>
5174 </varlistentry>
5178 <varlistentry>
5179 <term><anchor id="NTSTATUSSUPPORT">nt status support (G)</term>
5180 <listitem><para>This boolean parameter controls whether <ulink
5181 url="smbd.8.html">smbd(8)</ulink> will negotiate NT specific status
5182 support with Windows NT/2k/XP clients. This is a developer
5183 debugging option and should be left alone.
5184 If this option is set to <constant>no</constant> then Samba offers
5185 exactly the same DOS error codes that versions prior to Samba 2.2.3
5186 reported.</para>
5188 <para>You should not need to ever disable this parameter.</para>
5190 <para>Default: <command>nt status support = yes</command></para>
5191 </listitem>
5192 </varlistentry>
5196 <varlistentry>
5197 <term><anchor id="NULLPASSWORDS">null passwords (G)</term>
5198 <listitem><para>Allow or disallow client access to accounts
5199 that have null passwords. </para>
5201 <para>See also <ulink url="smbpasswd.5.html">smbpasswd (5)</ulink>.</para>
5203 <para>Default: <command>null passwords = no</command></para>
5204 </listitem>
5205 </varlistentry>
5210 <varlistentry>
5211 <term><anchor id="OBEYPAMRESTRICTIONS">obey pam restrictions (G)</term>
5212 <listitem><para>When Samba 2.2 is configured to enable PAM support
5213 (i.e. --with-pam), this parameter will control whether or not Samba
5214 should obey PAM's account and session management directives. The
5215 default behavior is to use PAM for clear text authentication only
5216 and to ignore any account or session management. Note that Samba
5217 always ignores PAM for authentication in the case of <link
5218 linkend="ENCRYPTPASSWORDS"><parameter>encrypt passwords = yes</parameter>
5219 </link>. The reason is that PAM modules cannot support the challenge/response
5220 authentication mechanism needed in the presence of SMB password encryption.
5221 </para>
5223 <para>Default: <command>obey pam restrictions = no</command></para>
5224 </listitem>
5225 </varlistentry>
5231 <varlistentry>
5232 <term><anchor id="ONLYUSER">only user (S)</term>
5233 <listitem><para>This is a boolean option that controls whether
5234 connections with usernames not in the <parameter>user</parameter>
5235 list will be allowed. By default this option is disabled so that a
5236 client can supply a username to be used by the server. Enabling
5237 this parameter will force the server to only user the login
5238 names from the <parameter>user</parameter> list and is only really
5239 useful in <link linkend="SECURITYEQUALSSHARE">shave level</link>
5240 security.</para>
5242 <para>Note that this also means Samba won't try to deduce
5243 usernames from the service name. This can be annoying for
5244 the [homes] section. To get around this you could use <command>user =
5245 %S</command> which means your <parameter>user</parameter> list
5246 will be just the service name, which for home directories is the
5247 name of the user.</para>
5249 <para>See also the <link linkend="USER"><parameter>user</parameter>
5250 </link> parameter.</para>
5252 <para>Default: <command>only user = no</command></para>
5253 </listitem>
5254 </varlistentry>
5259 <varlistentry>
5260 <term><anchor id="ONLYGUEST">only guest (S)</term>
5261 <listitem><para>A synonym for <link linkend="GUESTONLY"><parameter>
5262 guest only</parameter></link>.</para>
5263 </listitem>
5264 </varlistentry>
5268 <varlistentry>
5269 <term><anchor id="OPLOCKBREAKWAITTIME">oplock break wait time (G)</term>
5270 <listitem><para>This is a tuning parameter added due to bugs in
5271 both Windows 9x and WinNT. If Samba responds to a client too
5272 quickly when that client issues an SMB that can cause an oplock
5273 break request, then the network client can fail and not respond
5274 to the break request. This tuning parameter (which is set in milliseconds)
5275 is the amount of time Samba will wait before sending an oplock break
5276 request to such (broken) clients.</para>
5278 <para><emphasis>DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ
5279 AND UNDERSTOOD THE SAMBA OPLOCK CODE</emphasis>.</para>
5281 <para>Default: <command>oplock break wait time = 0</command></para>
5282 </listitem>
5283 </varlistentry>
5286 <varlistentry>
5287 <term><anchor id="OPLOCKCONTENTIONLIMIT">oplock contention limit (S)</term>
5288 <listitem><para>This is a <emphasis>very</emphasis> advanced
5289 <ulink url="smbd.8.html">smbd(8)</ulink> tuning option to
5290 improve the efficiency of the granting of oplocks under multiple
5291 client contention for the same file.</para>
5293 <para>In brief it specifies a number, which causes <ulink url="smbd.8.html">smbd</ulink> not to
5294 grant an oplock even when requested if the approximate number of
5295 clients contending for an oplock on the same file goes over this
5296 limit. This causes <command>smbd</command> to behave in a similar
5297 way to Windows NT.</para>
5299 <para><emphasis>DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ
5300 AND UNDERSTOOD THE SAMBA OPLOCK CODE</emphasis>.</para>
5302 <para>Default: <command>oplock contention limit = 2</command></para>
5303 </listitem>
5304 </varlistentry>
5310 <varlistentry>
5311 <term><anchor id="OPLOCKS">oplocks (S)</term>
5312 <listitem><para>This boolean option tells <command>smbd</command> whether to
5313 issue oplocks (opportunistic locks) to file open requests on this
5314 share. The oplock code can dramatically (approx. 30% or more) improve
5315 the speed of access to files on Samba servers. It allows the clients
5316 to aggressively cache files locally and you may want to disable this
5317 option for unreliable network environments (it is turned on by
5318 default in Windows NT Servers). For more information see the file
5319 <filename>Speed.txt</filename> in the Samba <filename>docs/</filename>
5320 directory.</para>
5322 <para>Oplocks may be selectively turned off on certain files with a
5323 share. See the <link linkend="VETOOPLOCKFILES"><parameter>
5324 veto oplock files</parameter></link> parameter. On some systems
5325 oplocks are recognized by the underlying operating system. This
5326 allows data synchronization between all access to oplocked files,
5327 whether it be via Samba or NFS or a local UNIX process. See the
5328 <parameter>kernel oplocks</parameter> parameter for details.</para>
5330 <para>See also the <link linkend="KERNELOPLOCKS"><parameter>kernel
5331 oplocks</parameter></link> and <link linkend="LEVEL2OPLOCKS"><parameter>
5332 level2 oplocks</parameter></link> parameters.</para>
5334 <para>Default: <command>oplocks = yes</command></para>
5335 </listitem>
5336 </varlistentry>
5340 <varlistentry>
5341 <term><anchor id="OSLEVEL">os level (G)</term>
5342 <listitem><para>This integer value controls what level Samba
5343 advertises itself as for browse elections. The value of this
5344 parameter determines whether <ulink url="nmbd.8.html">nmbd(8)</ulink>
5345 has a chance of becoming a local master browser for the <parameter>
5346 WORKGROUP</parameter> in the local broadcast area.</para>
5348 <para><emphasis>Note :</emphasis>By default, Samba will win
5349 a local master browsing election over all Microsoft operating
5350 systems except a Windows NT 4.0/2000 Domain Controller. This
5351 means that a misconfigured Samba host can effectively isolate
5352 a subnet for browsing purposes. See <filename>BROWSING.txt
5353 </filename> in the Samba <filename>docs/</filename> directory
5354 for details.</para>
5356 <para>Default: <command>os level = 20</command></para>
5357 <para>Example: <command>os level = 65 </command></para>
5358 </listitem>
5359 </varlistentry>
5363 <varlistentry>
5364 <term><anchor id="OS2DRIVERMAP">os2 driver map (G)</term>
5365 <listitem><para>The parameter is used to define the absolute
5366 path to a file containing a mapping of Windows NT printer driver
5367 names to OS/2 printer driver names. The format is:</para>
5369 <para>&lt;nt driver name&gt; = &lt;os2 driver
5370 name&gt;.&lt;device name&gt;</para>
5372 <para>For example, a valid entry using the HP LaserJet 5
5373 printer driver would appear as <command>HP LaserJet 5L = LASERJET.HP
5374 LaserJet 5L</command>.</para>
5376 <para>The need for the file is due to the printer driver namespace
5377 problem described in the <ulink url="printer_driver2.html">Samba
5378 Printing HOWTO</ulink>. For more details on OS/2 clients, please
5379 refer to the <ulink url="OS2-Client-HOWTO.html">OS2-Client-HOWTO
5380 </ulink> containing in the Samba documentation.</para>
5382 <para>Default: <command>os2 driver map = &lt;empty string&gt;
5383 </command></para>
5384 </listitem>
5385 </varlistentry>
5388 <varlistentry>
5389 <term><anchor id="PAMPASSWORDCHANGE">pam password change (G)</term>
5390 <listitem><para>With the addition of better PAM support in Samba 2.2,
5391 this parameter, it is possible to use PAM's password change control
5392 flag for Samba. If enabled, then PAM will be used for password
5393 changes when requested by an SMB client instead of the program listed in
5394 <link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter></link>.
5395 It should be possible to enable this without changing your
5396 <link linkend="PASSWDCHAT"><parameter>passwd chat</parameter></link>
5397 parameter for most setups.
5398 </para>
5400 <para>Default: <command>pam password change = no</command></para>
5402 </listitem>
5403 </varlistentry>
5406 <varlistentry>
5407 <term><anchor id="PANICACTION">panic action (G)</term>
5408 <listitem><para>This is a Samba developer option that allows a
5409 system command to be called when either <ulink url="smbd.8.html">
5410 smbd(8)</ulink> or <ulink url="nmbd.8.html">nmbd(8)</ulink>
5411 crashes. This is usually used to draw attention to the fact that
5412 a problem occurred.</para>
5414 <para>Default: <command>panic action = &lt;empty string&gt;</command></para>
5415 <para>Example: <command>panic action = "/bin/sleep 90000"</command></para>
5416 </listitem>
5417 </varlistentry>
5420 <varlistentry>
5421 <term><anchor id="PASSWDCHAT">passwd chat (G)</term>
5422 <listitem><para>This string controls the <emphasis>"chat"</emphasis>
5423 conversation that takes places between <ulink
5424 url="smbd.8.html">smbd</ulink> and the local password changing
5425 program to change the user's password. The string describes a
5426 sequence of response-receive pairs that <ulink url="smbd.8.html">
5427 smbd(8)</ulink> uses to determine what to send to the
5428 <link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter>
5429 </link> and what to expect back. If the expected output is not
5430 received then the password is not changed.</para>
5432 <para>This chat sequence is often quite site specific, depending
5433 on what local methods are used for password control (such as NIS
5434 etc).</para>
5435 <para>Note that this parameter only is only used if the <link
5436 linkend="UNIXPASSWORDSYNC"><parameter>unix
5437 password sync</parameter></link> parameter is set to <constant>yes</constant>. This
5438 sequence is then called <emphasis>AS ROOT</emphasis> when the SMB password
5439 in the smbpasswd file is being changed, without access to the old
5440 password cleartext. This means that root must be able to reset the user's password
5441 without knowing the text of the previous password. In the presence of NIS/YP,
5442 this means that the <link linkend="PASSWDPROGRAM">passwd program</link> must be
5443 executed on the NIS master.
5444 </para>
5447 <para>The string can contain the macro <parameter>%n</parameter> which is substituted
5448 for the new password. The chat sequence can also contain the standard
5449 macros <constant>\n</constant>, <constant>\r</constant>, <constant>
5450 \t</constant> and <constant>\s</constant> to give line-feed,
5451 carriage-return, tab and space. The chat sequence string can also contain
5452 a '*' which matches any sequence of characters.
5453 Double quotes can be used to collect strings with spaces
5454 in them into a single string.</para>
5456 <para>If the send string in any part of the chat sequence
5457 is a full stop ".", then no string is sent. Similarly,
5458 if the expect string is a full stop then no string is expected.</para>
5460 <para>If the <link linkend="PAMPASSWORDCHANGE"><parameter>pam
5461 password change</parameter></link> parameter is set to <constant>yes</constant>, the chat pairs
5462 may be matched in any order, and success is determined by the PAM result,
5463 not any particular output. The \n macro is ignored for PAM conversions.
5464 </para>
5466 <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix password
5467 sync</parameter></link>, <link linkend="PASSWDPROGRAM"><parameter>
5468 passwd program</parameter></link> ,<link linkend="PASSWDCHATDEBUG">
5469 <parameter>passwd chat debug</parameter></link> and <link linkend="PAMPASSWORDCHANGE">
5470 <parameter>pam password change</parameter></link>.</para>
5472 <para>Default: <command>passwd chat = *new*password* %n\n
5473 *new*password* %n\n *changed*</command></para>
5474 <para>Example: <command>passwd chat = "*Enter OLD password*" %o\n
5475 "*Enter NEW password*" %n\n "*Reenter NEW password*" %n\n "*Password
5476 changed*"</command></para>
5477 </listitem>
5478 </varlistentry>
5482 <varlistentry>
5483 <term><anchor id="PASSWDCHATDEBUG">passwd chat debug (G)</term>
5484 <listitem><para>This boolean specifies if the passwd chat script
5485 parameter is run in <emphasis>debug</emphasis> mode. In this mode the
5486 strings passed to and received from the passwd chat are printed
5487 in the <ulink url="smbd.8.html">smbd(8)</ulink> log with a
5488 <link linkend="DEBUGLEVEL"><parameter>debug level</parameter></link>
5489 of 100. This is a dangerous option as it will allow plaintext passwords
5490 to be seen in the <command>smbd</command> log. It is available to help
5491 Samba admins debug their <parameter>passwd chat</parameter> scripts
5492 when calling the <parameter>passwd program</parameter> and should
5493 be turned off after this has been done. This option has no effect if the
5494 <link linkend="PAMPASSWORDCHANGE"><parameter>pam password change</parameter></link>
5495 paramter is set. This parameter is off by default.</para>
5498 <para>See also <link linkend="PASSWDCHAT"><parameter>passwd chat</parameter>
5499 </link>, <link linkend="PAMPASSWORDCHANGE"><parameter>pam password change</parameter>
5500 </link>, <link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter>
5501 </link>.</para>
5503 <para>Default: <command>passwd chat debug = no</command></para>
5504 </listitem>
5505 </varlistentry>
5509 <varlistentry>
5510 <term><anchor id="PASSWDPROGRAM">passwd program (G)</term>
5511 <listitem><para>The name of a program that can be used to set
5512 UNIX user passwords. Any occurrences of <parameter>%u</parameter>
5513 will be replaced with the user name. The user name is checked for
5514 existence before calling the password changing program.</para>
5516 <para>Also note that many passwd programs insist in <emphasis>reasonable
5517 </emphasis> passwords, such as a minimum length, or the inclusion
5518 of mixed case chars and digits. This can pose a problem as some clients
5519 (such as Windows for Workgroups) uppercase the password before sending
5520 it.</para>
5522 <para><emphasis>Note</emphasis> that if the <parameter>unix
5523 password sync</parameter> parameter is set to <constant>yes
5524 </constant> then this program is called <emphasis>AS ROOT</emphasis>
5525 before the SMB password in the <ulink url="smbpasswd.5.html">smbpasswd(5)
5526 </ulink> file is changed. If this UNIX password change fails, then
5527 <command>smbd</command> will fail to change the SMB password also
5528 (this is by design).</para>
5530 <para>If the <parameter>unix password sync</parameter> parameter
5531 is set this parameter <emphasis>MUST USE ABSOLUTE PATHS</emphasis>
5532 for <emphasis>ALL</emphasis> programs called, and must be examined
5533 for security implications. Note that by default <parameter>unix
5534 password sync</parameter> is set to <constant>no</constant>.</para>
5536 <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix
5537 password sync</parameter></link>.</para>
5539 <para>Default: <command>passwd program = /bin/passwd</command></para>
5540 <para>Example: <command>passwd program = /sbin/npasswd %u</command>
5541 </para>
5542 </listitem>
5543 </varlistentry>
5547 <varlistentry>
5548 <term><anchor id="PASSWORDLEVEL">password level (G)</term>
5549 <listitem><para>Some client/server combinations have difficulty
5550 with mixed-case passwords. One offending client is Windows for
5551 Workgroups, which for some reason forces passwords to upper
5552 case when using the LANMAN1 protocol, but leaves them alone when
5553 using COREPLUS! Another problem child is the Windows 95/98
5554 family of operating systems. These clients upper case clear
5555 text passwords even when NT LM 0.12 selected by the protocol
5556 negotiation request/response.</para>
5558 <para>This parameter defines the maximum number of characters
5559 that may be upper case in passwords.</para>
5561 <para>For example, say the password given was "FRED". If <parameter>
5562 password level</parameter> is set to 1, the following combinations
5563 would be tried if "FRED" failed:</para>
5565 <para>"Fred", "fred", "fRed", "frEd","freD"</para>
5567 <para>If <parameter>password level</parameter> was set to 2,
5568 the following combinations would also be tried: </para>
5570 <para>"FRed", "FrEd", "FreD", "fREd", "fReD", "frED", ..</para>
5572 <para>And so on.</para>
5574 <para>The higher value this parameter is set to the more likely
5575 it is that a mixed case password will be matched against a single
5576 case password. However, you should be aware that use of this
5577 parameter reduces security and increases the time taken to
5578 process a new connection.</para>
5580 <para>A value of zero will cause only two attempts to be
5581 made - the password as is and the password in all-lower case.</para>
5583 <para>Default: <command>password level = 0</command></para>
5584 <para>Example: <command>password level = 4</command></para>
5585 </listitem>
5586 </varlistentry>
5590 <varlistentry>
5591 <term><anchor id="PASSWORDSERVER">password server (G)</term>
5592 <listitem><para>By specifying the name of another SMB server (such
5593 as a WinNT box) with this option, and using <command>security = domain
5594 </command> or <command>security = server</command> you can get Samba
5595 to do all its username/password validation via a remote server.</para>
5597 <para>This option sets the name of the password server to use.
5598 It must be a NetBIOS name, so if the machine's NetBIOS name is
5599 different from its Internet name then you may have to add its NetBIOS
5600 name to the lmhosts file which is stored in the same directory
5601 as the <filename>smb.conf</filename> file.</para>
5603 <para>The name of the password server is looked up using the
5604 parameter <link linkend="NAMERESOLVEORDER"><parameter>name
5605 resolve order</parameter></link> and so may resolved
5606 by any method and order described in that parameter.</para>
5608 <para>The password server much be a machine capable of using
5609 the "LM1.2X002" or the "NT LM 0.12" protocol, and it must be in
5610 user level security mode.</para>
5612 <para><emphasis>NOTE:</emphasis> Using a password server
5613 means your UNIX box (running Samba) is only as secure as your
5614 password server. <emphasis>DO NOT CHOOSE A PASSWORD SERVER THAT
5615 YOU DON'T COMPLETELY TRUST</emphasis>.</para>
5617 <para>Never point a Samba server at itself for password
5618 serving. This will cause a loop and could lock up your Samba
5619 server!</para>
5621 <para>The name of the password server takes the standard
5622 substitutions, but probably the only useful one is <parameter>%m
5623 </parameter>, which means the Samba server will use the incoming
5624 client as the password server. If you use this then you better
5625 trust your clients, and you had better restrict them with hosts allow!</para>
5627 <para>If the <parameter>security</parameter> parameter is set to
5628 <constant>domain</constant>, then the list of machines in this
5629 option must be a list of Primary or Backup Domain controllers for the
5630 Domain or the character '*', as the Samba server is effectively
5631 in that domain, and will use cryptographically authenticated RPC calls
5632 to authenticate the user logging on. The advantage of using <command>
5633 security = domain</command> is that if you list several hosts in the
5634 <parameter>password server</parameter> option then <command>smbd
5635 </command> will try each in turn till it finds one that responds. This
5636 is useful in case your primary server goes down.</para>
5638 <para>If the <parameter>password server</parameter> option is set
5639 to the character '*', then Samba will attempt to auto-locate the
5640 Primary or Backup Domain controllers to authenticate against by
5641 doing a query for the name <constant>WORKGROUP&lt;1C&gt;</constant>
5642 and then contacting each server returned in the list of IP
5643 addresses from the name resolution source. </para>
5645 <para>If the <parameter>security</parameter> parameter is
5646 set to <constant>server</constant>, then there are different
5647 restrictions that <command>security = domain</command> doesn't
5648 suffer from:</para>
5650 <itemizedlist>
5651 <listitem><para>You may list several password servers in
5652 the <parameter>password server</parameter> parameter, however if an
5653 <command>smbd</command> makes a connection to a password server,
5654 and then the password server fails, no more users will be able
5655 to be authenticated from this <command>smbd</command>. This is a
5656 restriction of the SMB/CIFS protocol when in <command>security = server
5657 </command> mode and cannot be fixed in Samba.</para></listitem>
5659 <listitem><para>If you are using a Windows NT server as your
5660 password server then you will have to ensure that your users
5661 are able to login from the Samba server, as when in <command>
5662 security = server</command> mode the network logon will appear to
5663 come from there rather than from the users workstation.</para></listitem>
5664 </itemizedlist>
5666 <para>See also the <link linkend="SECURITY"><parameter>security
5667 </parameter></link> parameter.</para>
5669 <para>Default: <command>password server = &lt;empty string&gt;</command>
5670 </para>
5671 <para>Example: <command>password server = NT-PDC, NT-BDC1, NT-BDC2
5672 </command></para>
5673 <para>Example: <command>password server = *</command></para>
5674 </listitem>
5675 </varlistentry>
5679 <varlistentry>
5680 <term><anchor id="PATH">path (S)</term>
5681 <listitem><para>This parameter specifies a directory to which
5682 the user of the service is to be given access. In the case of
5683 printable services, this is where print data will spool prior to
5684 being submitted to the host for printing.</para>
5686 <para>For a printable service offering guest access, the service
5687 should be readonly and the path should be world-writeable and
5688 have the sticky bit set. This is not mandatory of course, but
5689 you probably won't get the results you expect if you do
5690 otherwise.</para>
5692 <para>Any occurrences of <parameter>%u</parameter> in the path
5693 will be replaced with the UNIX username that the client is using
5694 on this connection. Any occurrences of <parameter>%m</parameter>
5695 will be replaced by the NetBIOS name of the machine they are
5696 connecting from. These replacements are very useful for setting
5697 up pseudo home directories for users.</para>
5699 <para>Note that this path will be based on <link linkend="ROOTDIR">
5700 <parameter>root dir</parameter></link> if one was specified.</para>
5702 <para>Default: <emphasis>none</emphasis></para>
5703 <para>Example: <command>path = /home/fred</command></para>
5704 </listitem>
5705 </varlistentry>
5710 <varlistentry>
5711 <term><anchor id="PIDDIRECTORY">pid directory (G)</term>
5712 <listitem><para>This option specifies the directory where pid
5713 files will be placed. </para>
5715 <para>Default: <command>pid directory = ${prefix}/var/locks</command></para>
5716 <para>Example: <command>pid directory = /var/run/</command>
5717 </para></listitem>
5718 </varlistentry>
5722 <varlistentry>
5723 <term><anchor id="POSIXLOCKING">posix locking (S)</term>
5724 <listitem><para>The <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
5725 daemon maintains an database of file locks obtained by SMB clients.
5726 The default behavior is to map this internal database to POSIX
5727 locks. This means that file locks obtained by SMB clients are
5728 consistent with those seen by POSIX compliant applications accessing
5729 the files via a non-SMB method (e.g. NFS or local file access).
5730 You should never need to disable this parameter.</para>
5732 <para>Default: <command>posix locking = yes</command></para>
5733 </listitem>
5734 </varlistentry>
5739 <varlistentry>
5740 <term><anchor id="POSTEXEC">postexec (S)</term>
5741 <listitem><para>This option specifies a command to be run
5742 whenever the service is disconnected. It takes the usual
5743 substitutions. The command may be run as the root on some
5744 systems.</para>
5746 <para>An interesting example may be to unmount server
5747 resources:</para>
5749 <para><command>postexec = /etc/umount /cdrom</command></para>
5751 <para>See also <link linkend="PREEXEC"><parameter>preexec</parameter>
5752 </link>.</para>
5754 <para>Default: <emphasis>none (no command executed)</emphasis>
5755 </para>
5757 <para>Example: <command>postexec = echo \"%u disconnected from %S
5758 from %m (%I)\" &gt;&gt; /tmp/log</command></para>
5759 </listitem>
5760 </varlistentry>
5764 <varlistentry>
5765 <term><anchor id="POSTSCRIPT">postscript (S)</term>
5766 <listitem><para>This parameter forces a printer to interpret
5767 the print files as PostScript. This is done by adding a <constant>%!
5768 </constant> to the start of print output.</para>
5770 <para>This is most useful when you have lots of PCs that persist
5771 in putting a control-D at the start of print jobs, which then
5772 confuses your printer.</para>
5774 <para>Default: <command>postscript = no</command></para>
5775 </listitem>
5776 </varlistentry>
5780 <varlistentry>
5781 <term><anchor id="PREEXEC">preexec (S)</term>
5782 <listitem><para>This option specifies a command to be run whenever
5783 the service is connected to. It takes the usual substitutions.</para>
5785 <para>An interesting example is to send the users a welcome
5786 message every time they log in. Maybe a message of the day? Here
5787 is an example:</para>
5789 <para><command>preexec = csh -c 'echo \"Welcome to %S!\" |
5790 /usr/local/samba/bin/smbclient -M %m -I %I' & </command></para>
5792 <para>Of course, this could get annoying after a while :-)</para>
5794 <para>See also <link linkend="PREEXECCLOSE"><parameter>preexec close
5795 </parameter</link> and <link linkend="POSTEXEC"><parameter>postexec
5796 </parameter></link>.</para>
5798 <para>Default: <emphasis>none (no command executed)</emphasis></para>
5799 <para>Example: <command>preexec = echo \"%u connected to %S from %m
5800 (%I)\" &gt;&gt; /tmp/log</command></para>
5801 </listitem>
5802 </varlistentry>
5806 <varlistentry>
5807 <term><anchor id="PREEXECCLOSE">preexec close (S)</term>
5808 <listitem><para>This boolean option controls whether a non-zero
5809 return code from <link linkend="PREEXEC"><parameter>preexec
5810 </parameter></link> should close the service being connected to.</para>
5812 <para>Default: <command>preexec close = no</command></para>
5813 </listitem>
5814 </varlistentry>
5817 <varlistentry>
5818 <term><anchor id="PREFERREDMASTER">preferred master (G)</term>
5819 <listitem><para>This boolean parameter controls if <ulink
5820 url="nmbd.8.html">nmbd(8)</ulink> is a preferred master browser
5821 for its workgroup.</para>
5823 <para>If this is set to <constant>yes</constant>, on startup, <command>nmbd</command>
5824 will force an election, and it will have a slight advantage in
5825 winning the election. It is recommended that this parameter is
5826 used in conjunction with <command><link linkend="DOMAINMASTER"><parameter>
5827 domain master</parameter></link> = yes</command>, so that <command>
5828 nmbd</command> can guarantee becoming a domain master.</para>
5830 <para>Use this option with caution, because if there are several
5831 hosts (whether Samba servers, Windows 95 or NT) that are preferred
5832 master browsers on the same subnet, they will each periodically
5833 and continuously attempt to become the local master browser.
5834 This will result in unnecessary broadcast traffic and reduced browsing
5835 capabilities.</para>
5837 <para>See also <link linkend="OSLEVEL"><parameter>os level</parameter>
5838 </link>.</para>
5840 <para>Default: <command>preferred master = auto</command></para>
5841 </listitem>
5842 </varlistentry>
5846 <varlistentry>
5847 <term><anchor id="PREFEREDMASTER">prefered master (G)</term>
5848 <listitem><para>Synonym for <link linkend="PREFERREDMASTER"><parameter>
5849 preferred master</parameter></link> for people who cannot spell :-).</para>
5850 </listitem>
5851 </varlistentry>
5855 <varlistentry>
5856 <term><anchor id="PRELOAD">preload</term>
5857 <listitem><para>This is a list of services that you want to be
5858 automatically added to the browse lists. This is most useful
5859 for homes and printers services that would otherwise not be
5860 visible.</para>
5862 <para>Note that if you just want all printers in your
5863 printcap file loaded then the <link linkend="LOADPRINTERS">
5864 <parameter>load printers</parameter></link> option is easier.</para>
5866 <para>Default: <emphasis>no preloaded services</emphasis></para>
5868 <para>Example: <command>preload = fred lp colorlp</command></para>
5869 </listitem>
5870 </varlistentry>
5873 <varlistentry>
5874 <term><anchor id="PRESERVECASE">preserve case (S)</term>
5875 <listitem><para> This controls if new filenames are created
5876 with the case that the client passes, or if they are forced to
5877 be the <link linkend="DEFAULTCASE"><parameter>default case
5878 </parameter></link>.</para>
5880 <para>Default: <command>preserve case = yes</command></para>
5882 <para>See the section on <link linkend="NAMEMANGLINGSECT">NAME
5883 MANGLING</link> for a fuller discussion.</para>
5884 </listitem>
5885 </varlistentry>
5889 <varlistentry>
5890 <term><anchor id="PRINTCOMMAND">print command (S)</term>
5891 <listitem><para>After a print job has finished spooling to
5892 a service, this command will be used via a <command>system()</command>
5893 call to process the spool file. Typically the command specified will
5894 submit the spool file to the host's printing subsystem, but there
5895 is no requirement that this be the case. The server will not remove
5896 the spool file, so whatever command you specify should remove the
5897 spool file when it has been processed, otherwise you will need to
5898 manually remove old spool files.</para>
5900 <para>The print command is simply a text string. It will be used
5901 verbatim after macro substitutions have been made:</para>
5903 <para>s, %p - the path to the spool
5904 file name</para>
5906 <para>%p - the appropriate printer
5907 name</para>
5909 <para>%J - the job
5910 name as transmitted by the client.</para>
5912 <para>%c - The number of printed pages
5913 of the spooled job (if known).</para>
5915 <para>%z - the size of the spooled
5916 print job (in bytes)</para>
5918 <para>The print command <emphasis>MUST</emphasis> contain at least
5919 one occurrence of <parameter>%s</parameter> or <parameter>%f
5920 </parameter> - the <parameter>%p</parameter> is optional. At the time
5921 a job is submitted, if no printer name is supplied the <parameter>%p
5922 </parameter> will be silently removed from the printer command.</para>
5924 <para>If specified in the [global] section, the print command given
5925 will be used for any printable service that does not have its own
5926 print command specified.</para>
5928 <para>If there is neither a specified print command for a
5929 printable service nor a global print command, spool files will
5930 be created but not processed and (most importantly) not removed.</para>
5932 <para>Note that printing may fail on some UNIXes from the
5933 <constant>nobody</constant> account. If this happens then create
5934 an alternative guest account that can print and set the <link
5935 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>
5936 in the [global] section.</para>
5938 <para>You can form quite complex print commands by realizing
5939 that they are just passed to a shell. For example the following
5940 will log a print job, print the file, then remove it. Note that
5941 ';' is the usual separator for command in shell scripts.</para>
5943 <para><command>print command = echo Printing %s &gt;&gt;
5944 /tmp/print.log; lpr -P %p %s; rm %s</command></para>
5946 <para>You may have to vary this command considerably depending
5947 on how you normally print files on your system. The default for
5948 the parameter varies depending on the setting of the <link linkend="PRINTING">
5949 <parameter>printing</parameter></link> parameter.</para>
5951 <para>Default: For <command>printing = BSD, AIX, QNX, LPRNG
5952 or PLP :</command></para>
5953 <para><command>print command = lpr -r -P%p %s</command></para>
5955 <para>For <command>printing = SYSV or HPUX :</command></para>
5956 <para><command>print command = lp -c -d%p %s; rm %s</command></para>
5958 <para>For <command>printing = SOFTQ :</command></para>
5959 <para><command>print command = lp -d%p -s %s; rm %s</command></para>
5961 <para>For printing = CUPS : If SAMBA is compiled against
5962 libcups, then <link linkend="PRINTING">printcap = cups</link>
5963 uses the CUPS API to
5964 submit jobs, etc. Otherwise it maps to the System V
5965 commands with the -oraw option for printing, i.e. it
5966 uses <command>lp -c -d%p -oraw; rm %s</command>.
5967 With <command>printing = cups</command>,
5968 and if SAMBA is compiled against libcups, any manually
5969 set print command will be ignored.</para>
5972 <para>Example: <command>print command = /usr/local/samba/bin/myprintscript
5973 %p %s</command></para>
5974 </listitem>
5975 </varlistentry>
5979 <varlistentry>
5980 <term><anchor id="PRINTOK">print ok (S)</term>
5981 <listitem><para>Synonym for <link linkend="PRINTABLE">
5982 <parameter>printable</parameter></link>.</para>
5983 </listitem>
5984 </varlistentry>
5989 <varlistentry>
5990 <term><anchor id="PRINTABLE">printable (S)</term>
5991 <listitem><para>If this parameter is <constant>yes</constant>, then
5992 clients may open, write to and submit spool files on the directory
5993 specified for the service. </para>
5995 <para>Note that a printable service will ALWAYS allow writing
5996 to the service path (user privileges permitting) via the spooling
5997 of print data. The <link linkend="READONLY"><parameter>read only
5998 </parameter></link> parameter controls only non-printing access to
5999 the resource.</para>
6001 <para>Default: <command>printable = no</command></para>
6002 </listitem>
6003 </varlistentry>
6007 <varlistentry>
6008 <term><anchor id="PRINTCAP">printcap (G)</term>
6009 <listitem><para>Synonym for <link linkend="PRINTCAPNAME"><parameter>
6010 printcap name</parameter></link>.</para>
6011 </listitem>
6012 </varlistentry>
6017 <varlistentry>
6018 <term><anchor id="PRINTCAPNAME">printcap name (G)</term>
6019 <listitem><para>This parameter may be used to override the
6020 compiled-in default printcap name used by the server (usually <filename>
6021 /etc/printcap</filename>). See the discussion of the <link
6022 linkend="PRINTERSSECT">[printers]</link> section above for reasons
6023 why you might want to do this.</para>
6025 <para>To use the CUPS printing interface set <command>printcap name = cups
6026 </command>. This should be supplemented by an addtional setting
6027 <link linkend="PRINTING">printing = cups</link> in the [global]
6028 section. <command>printcap name = cups</command> will use the
6029 "dummy" printcap created by CUPS, as specified in your CUPS
6030 configuration file.
6031 </para>
6033 <para>On System V systems that use <command>lpstat</command> to
6034 list available printers you can use <command>printcap name = lpstat
6035 </command> to automatically obtain lists of available printers. This
6036 is the default for systems that define SYSV at configure time in
6037 Samba (this includes most System V based systems). If <parameter>
6038 printcap name</parameter> is set to <command>lpstat</command> on
6039 these systems then Samba will launch <command>lpstat -v</command> and
6040 attempt to parse the output to obtain a printer list.</para>
6042 <para>A minimal printcap file would look something like this:</para>
6044 <para><programlisting>
6045 print1|My Printer 1
6046 print2|My Printer 2
6047 print3|My Printer 3
6048 print4|My Printer 4
6049 print5|My Printer 5
6050 </programlisting></para>
6052 <para>where the '|' separates aliases of a printer. The fact
6053 that the second alias has a space in it gives a hint to Samba
6054 that it's a comment.</para>
6056 <para><emphasis>NOTE</emphasis>: Under AIX the default printcap
6057 name is <filename>/etc/qconfig</filename>. Samba will assume the
6058 file is in AIX <filename>qconfig</filename> format if the string
6059 <filename>qconfig</filename> appears in the printcap filename.</para>
6061 <para>Default: <command>printcap name = /etc/printcap</command></para>
6062 <para>Example: <command>printcap name = /etc/myprintcap</command></para>
6063 </listitem>
6064 </varlistentry>
6070 <varlistentry>
6071 <term><anchor id="PRINTERADMIN">printer admin (S)</term>
6072 <listitem><para>This is a list of users that can do anything to
6073 printers via the remote administration interfaces offered by MS-RPC
6074 (usually using a NT workstation). Note that the root user always
6075 has admin rights.</para>
6077 <para>Default: <command>printer admin = &lt;empty string&gt;</command>
6078 </para>
6079 <para>Example: <command>printer admin = admin, @staff</command></para>
6080 </listitem>
6081 </varlistentry>
6087 <varlistentry>
6088 <term><anchor id="PRINTERDRIVER">printer driver (S)</term>
6089 <listitem><para><emphasis>Note :</emphasis>This is a deprecated
6090 parameter and will be removed in the next major release
6091 following version 2.2. Please see the instructions in
6092 the <ulink url="printer_driver2.html">Samba 2.2. Printing
6093 HOWTO</ulink> for more information
6094 on the new method of loading printer drivers onto a Samba server.
6095 </para>
6097 <para>This option allows you to control the string
6098 that clients receive when they ask the server for the printer driver
6099 associated with a printer. If you are using Windows95 or Windows NT
6100 then you can use this to automate the setup of printers on your
6101 system.</para>
6103 <para>You need to set this parameter to the exact string (case
6104 sensitive) that describes the appropriate printer driver for your
6105 system. If you don't know the exact string to use then you should
6106 first try with no <link linkend="PRINTERDRIVER"><parameter>
6107 printer driver</parameter></link> option set and the client will
6108 give you a list of printer drivers. The appropriate strings are
6109 shown in a scroll box after you have chosen the printer manufacturer.</para>
6111 <para>See also <link linkend="PRINTERDRIVERFILE"><parameter>printer
6112 driver file</parameter></link>.</para>
6114 <para>Example: <command>printer driver = HP LaserJet 4L</command></para>
6115 </listitem>
6116 </varlistentry>
6120 <varlistentry>
6121 <term><anchor id="PRINTERDRIVERFILE">printer driver file (G)</term>
6122 <listitem><para><emphasis>Note :</emphasis>This is a deprecated
6123 parameter and will be removed in the next major release
6124 following version 2.2. Please see the instructions in
6125 the <ulink url="printer_driver2.html">Samba 2.2. Printing
6126 HOWTO</ulink> for more information
6127 on the new method of loading printer drivers onto a Samba server.
6128 </para>
6130 <para>This parameter tells Samba where the printer driver
6131 definition file, used when serving drivers to Windows 95 clients, is
6132 to be found. If this is not set, the default is :</para>
6134 <para><filename><replaceable>SAMBA_INSTALL_DIRECTORY</replaceable>
6135 /lib/printers.def</filename></para>
6137 <para>This file is created from Windows 95 <filename>msprint.inf
6138 </filename> files found on the Windows 95 client system. For more
6139 details on setting up serving of printer drivers to Windows 95
6140 clients, see the outdated documentation file in the <filename>docs/</filename>
6141 directory, <filename>PRINTER_DRIVER.txt</filename>.</para>
6143 <para>See also <link linkend="PRINTERDRIVERLOCATION"><parameter>
6144 printer driver location</parameter></link>.</para>
6146 <para>Default: <emphasis>None (set in compile).</emphasis></para>
6148 <para>Example: <command>printer driver file =
6149 /usr/local/samba/printers/drivers.def</command></para>
6150 </listitem>
6151 </varlistentry>
6156 <varlistentry>
6157 <term><anchor id="PRINTERDRIVERLOCATION">printer driver location (S)</term>
6158 <listitem><para><emphasis>Note :</emphasis>This is a deprecated
6159 parameter and will be removed in the next major release
6160 following version 2.2. Please see the instructions in
6161 the <ulink url="printer_driver2.html">Samba 2.2. Printing
6162 HOWTO</ulink> for more information
6163 on the new method of loading printer drivers onto a Samba server.
6164 </para>
6166 <para>This parameter tells clients of a particular printer
6167 share where to find the printer driver files for the automatic
6168 installation of drivers for Windows 95 machines. If Samba is set up
6169 to serve printer drivers to Windows 95 machines, this should be set to</para>
6171 <para><command>\\MACHINE\PRINTER$</command></para>
6173 <para>Where MACHINE is the NetBIOS name of your Samba server,
6174 and PRINTER$ is a share you set up for serving printer driver
6175 files. For more details on setting this up see the outdated documentation
6176 file in the <filename>docs/</filename> directory, <filename>
6177 PRINTER_DRIVER.txt</filename>.</para>
6179 <para>See also <link linkend="PRINTERDRIVERFILE"><parameter>
6180 printer driver file</parameter></link>.</para>
6182 <para>Default: <command>none</command></para>
6183 <para>Example: <command>printer driver location = \\MACHINE\PRINTER$
6184 </command></para>
6185 </listitem>
6186 </varlistentry>
6190 <varlistentry>
6191 <term><anchor id="PRINTERNAME">printer name (S)</term>
6192 <listitem><para>This parameter specifies the name of the printer
6193 to which print jobs spooled through a printable service will be sent.</para>
6195 <para>If specified in the [global] section, the printer
6196 name given will be used for any printable service that does
6197 not have its own printer name specified.</para>
6199 <para>Default: <emphasis>none (but may be <constant>lp</constant>
6200 on many systems)</emphasis></para>
6202 <para>Example: <command>printer name = laserwriter</command></para>
6203 </listitem>
6204 </varlistentry>
6207 <varlistentry>
6208 <term><anchor id="PRINTER">printer (S)</term>
6209 <listitem><para>Synonym for <link linkend="PRINTERNAME"><parameter>
6210 printer name</parameter></link>.</para>
6211 </listitem>
6212 </varlistentry>
6216 <varlistentry>
6217 <term><anchor id="PRINTING">printing (S)</term>
6218 <listitem><para>This parameters controls how printer status
6219 information is interpreted on your system. It also affects the
6220 default values for the <parameter>print command</parameter>,
6221 <parameter>lpq command</parameter>, <parameter>lppause command
6222 </parameter>, <parameter>lpresume command</parameter>, and
6223 <parameter>lprm command</parameter> if specified in the
6224 [global] section.</para>
6226 <para>Currently nine printing styles are supported. They are
6227 <constant>BSD</constant>, <constant>AIX</constant>,
6228 <constant>LPRNG</constant>, <constant>PLP</constant>,
6229 <constant>SYSV</constant>, <constant>HPUX</constant>,
6230 <constant>QNX</constant>, <constant>SOFTQ</constant>,
6231 and <constant>CUPS</constant>.</para>
6233 <para>To see what the defaults are for the other print
6234 commands when using the various options use the <ulink
6235 url="testparm.1.html">testparm(1)</ulink> program.</para>
6237 <para>This option can be set on a per printer basis</para>
6239 <para>See also the discussion in the <link linkend="PRINTERSSECT">
6240 [printers]</link> section.</para>
6241 </listitem>
6242 </varlistentry>
6247 <varlistentry>
6248 <term><anchor id="PROTOCOL">protocol (G)</term>
6249 <listitem><para>Synonym for <link linkend="MAXPROTOCOL">
6250 <parameter>max protocol</parameter></link>.</para></listitem>
6251 </varlistentry>
6256 <varlistentry>
6257 <term><anchor id="PUBLIC">public (S)</term>
6258 <listitem><para>Synonym for <link linkend="GUESTOK"><parameter>guest
6259 ok</parameter></link>.</para>
6260 </listitem>
6261 </varlistentry>
6265 <varlistentry>
6266 <term><anchor id="QUEUEPAUSECOMMAND">queuepause command (S)</term>
6267 <listitem><para>This parameter specifies the command to be
6268 executed on the server host in order to pause the printer queue.</para>
6270 <para>This command should be a program or script which takes
6271 a printer name as its only parameter and stops the printer queue,
6272 such that no longer jobs are submitted to the printer.</para>
6274 <para>This command is not supported by Windows for Workgroups,
6275 but can be issued from the Printers window under Windows 95
6276 and NT.</para>
6278 <para>If a <parameter>%p</parameter> is given then the printer name
6279 is put in its place. Otherwise it is placed at the end of the command.
6280 </para>
6282 <para>Note that it is good practice to include the absolute
6283 path in the command as the PATH may not be available to the
6284 server.</para>
6286 <para>Default: <emphasis>depends on the setting of <parameter>printing
6287 </parameter></emphasis></para>
6288 <para>Example: <command>queuepause command = disable %p</command></para>
6289 </listitem>
6290 </varlistentry>
6294 <varlistentry>
6295 <term><anchor id="QUEUERESUMECOMMAND">queueresume command (S)</term>
6296 <listitem><para>This parameter specifies the command to be
6297 executed on the server host in order to resume the printer queue. It
6298 is the command to undo the behavior that is caused by the
6299 previous parameter (<link linkend="QUEUEPAUSECOMMAND"><parameter>
6300 queuepause command</parameter></link>).</para>
6302 <para>This command should be a program or script which takes
6303 a printer name as its only parameter and resumes the printer queue,
6304 such that queued jobs are resubmitted to the printer.</para>
6306 <para>This command is not supported by Windows for Workgroups,
6307 but can be issued from the Printers window under Windows 95
6308 and NT.</para>
6310 <para>If a <parameter>%p</parameter> is given then the printer name
6311 is put in its place. Otherwise it is placed at the end of the
6312 command.</para>
6314 <para>Note that it is good practice to include the absolute
6315 path in the command as the PATH may not be available to the
6316 server.</para>
6318 <para>Default: <emphasis>depends on the setting of <link
6319 linkend="PRINTING"><parameter>printing</parameter></link></emphasis>
6320 </para>
6322 <para>Example: <command>queuepause command = enable %p
6323 </command></para>
6324 </listitem>
6325 </varlistentry>
6329 <varlistentry>
6330 <term><anchor id="READBMPX">read bmpx (G)</term>
6331 <listitem><para>This boolean parameter controls whether <ulink
6332 url="smbd.8.html">smbd(8)</ulink> will support the "Read
6333 Block Multiplex" SMB. This is now rarely used and defaults to
6334 <constant>no</constant>. You should never need to set this
6335 parameter.</para>
6337 <para>Default: <command>read bmpx = no</command></para>
6338 </listitem>
6339 </varlistentry>
6344 <varlistentry>
6345 <term><anchor id="READLIST">read list (S)</term>
6346 <listitem><para>This is a list of users that are given read-only
6347 access to a service. If the connecting user is in this list then
6348 they will not be given write access, no matter what the <link
6349 linkend="READONLY"><parameter>read only</parameter></link>
6350 option is set to. The list can include group names using the
6351 syntax described in the <link linkend="INVALIDUSERS"><parameter>
6352 invalid users</parameter></link> parameter.</para>
6354 <para>See also the <link linkend="WRITELIST"><parameter>
6355 write list</parameter></link> parameter and the <link
6356 linkend="INVALIDUSERS"><parameter>invalid users</parameter>
6357 </link> parameter.</para>
6359 <para>Default: <command>read list = &lt;empty string&gt;</command></para>
6360 <para>Example: <command>read list = mary, @students</command></para>
6361 </listitem>
6362 </varlistentry>
6366 <varlistentry>
6367 <term><anchor id="READONLY">read only (S)</term>
6368 <listitem><para>An inverted synonym is <link linkend="WRITEABLE">
6369 <parameter>writeable</parameter></link>.</para>
6371 <para>If this parameter is <constant>yes</constant>, then users
6372 of a service may not create or modify files in the service's
6373 directory.</para>
6375 <para>Note that a printable service (<command>printable = yes</command>)
6376 will <emphasis>ALWAYS</emphasis> allow writing to the directory
6377 (user privileges permitting), but only via spooling operations.</para>
6379 <para>Default: <command>read only = yes</command></para>
6380 </listitem>
6381 </varlistentry>
6385 <varlistentry>
6386 <term><anchor id="READRAW">read raw (G)</term>
6387 <listitem><para>This parameter controls whether or not the server
6388 will support the raw read SMB requests when transferring data
6389 to clients.</para>
6391 <para>If enabled, raw reads allow reads of 65535 bytes in
6392 one packet. This typically provides a major performance benefit.
6393 </para>
6395 <para>However, some clients either negotiate the allowable
6396 block size incorrectly or are incapable of supporting larger block
6397 sizes, and for these clients you may need to disable raw reads.</para>
6399 <para>In general this parameter should be viewed as a system tuning
6400 tool and left severely alone. See also <link linkend="WRITERAW">
6401 <parameter>write raw</parameter></link>.</para>
6403 <para>Default: <command>read raw = yes</command></para>
6404 </listitem>
6405 </varlistentry>
6408 <varlistentry>
6409 <term><anchor id="READSIZE">read size (G)</term>
6410 <listitem><para>The option <parameter>read size</parameter>
6411 affects the overlap of disk reads/writes with network reads/writes.
6412 If the amount of data being transferred in several of the SMB
6413 commands (currently SMBwrite, SMBwriteX and SMBreadbraw) is larger
6414 than this value then the server begins writing the data before it
6415 has received the whole packet from the network, or in the case of
6416 SMBreadbraw, it begins writing to the network before all the data
6417 has been read from disk.</para>
6419 <para>This overlapping works best when the speeds of disk and
6420 network access are similar, having very little effect when the
6421 speed of one is much greater than the other.</para>
6423 <para>The default value is 16384, but very little experimentation
6424 has been done yet to determine the optimal value, and it is likely
6425 that the best value will vary greatly between systems anyway.
6426 A value over 65536 is pointless and will cause you to allocate
6427 memory unnecessarily.</para>
6429 <para>Default: <command>read size = 16384</command></para>
6430 <para>Example: <command>read size = 8192</command></para>
6431 </listitem>
6432 </varlistentry>
6436 <varlistentry>
6437 <term><anchor id="REMOTEANNOUNCE">remote announce (G)</term>
6438 <listitem><para>This option allows you to setup <ulink
6439 url="nmbd.8.html">nmbd(8)</ulink> to periodically announce itself
6440 to arbitrary IP addresses with an arbitrary workgroup name.</para>
6442 <para>This is useful if you want your Samba server to appear
6443 in a remote workgroup for which the normal browse propagation
6444 rules don't work. The remote workgroup can be anywhere that you
6445 can send IP packets to.</para>
6447 <para>For example:</para>
6449 <para><command>remote announce = 192.168.2.255/SERVERS
6450 192.168.4.255/STAFF</command></para>
6452 <para>the above line would cause <command>nmbd</command> to announce itself
6453 to the two given IP addresses using the given workgroup names.
6454 If you leave out the workgroup name then the one given in
6455 the <link linkend="WORKGROUP"><parameter>workgroup</parameter></link>
6456 parameter is used instead.</para>
6458 <para>The IP addresses you choose would normally be the broadcast
6459 addresses of the remote networks, but can also be the IP addresses
6460 of known browse masters if your network config is that stable.</para>
6462 <para>See the documentation file <filename>BROWSING.txt</filename>
6463 in the <filename>docs/</filename> directory.</para>
6465 <para>Default: <command>remote announce = &lt;empty string&gt;
6466 </command></para>
6467 </listitem>
6468 </varlistentry>
6472 <varlistentry>
6473 <term><anchor id="REMOTEBROWSESYNC">remote browse sync (G)</term>
6474 <listitem><para>This option allows you to setup <ulink
6475 url="nmbd.8.html">nmbd(8)</ulink> to periodically request
6476 synchronization of browse lists with the master browser of a Samba
6477 server that is on a remote segment. This option will allow you to
6478 gain browse lists for multiple workgroups across routed networks. This
6479 is done in a manner that does not work with any non-Samba servers.</para>
6481 <para>This is useful if you want your Samba server and all local
6482 clients to appear in a remote workgroup for which the normal browse
6483 propagation rules don't work. The remote workgroup can be anywhere
6484 that you can send IP packets to.</para>
6486 <para>For example:</para>
6488 <para><command>remote browse sync = 192.168.2.255 192.168.4.255
6489 </command></para>
6491 <para>the above line would cause <command>nmbd</command> to request
6492 the master browser on the specified subnets or addresses to
6493 synchronize their browse lists with the local server.</para>
6495 <para>The IP addresses you choose would normally be the broadcast
6496 addresses of the remote networks, but can also be the IP addresses
6497 of known browse masters if your network config is that stable. If
6498 a machine IP address is given Samba makes NO attempt to validate
6499 that the remote machine is available, is listening, nor that it
6500 is in fact the browse master on its segment.</para>
6502 <para>Default: <command>remote browse sync = &lt;empty string&gt;
6503 </command></para>
6504 </listitem>
6505 </varlistentry>
6510 <varlistentry>
6511 <term><anchor id="RESTRICTANONYMOUS">restrict anonymous (G)</term>
6512 <listitem><para>This is a boolean parameter. If it is <constant>yes</constant>, then
6513 anonymous access to the server will be restricted, namely in the
6514 case where the server is expecting the client to send a username,
6515 but it doesn't. Setting it to <constant>yes</constant> will force these anonymous
6516 connections to be denied, and the client will be required to always
6517 supply a username and password when connecting. Use of this parameter
6518 is only recommended for homogeneous NT client environments.</para>
6520 <para>This parameter makes the use of macro expansions that rely
6521 on the username (%U, %G, etc) consistent. NT 4.0
6522 likes to use anonymous connections when refreshing the share list,
6523 and this is a way to work around that.</para>
6525 <para>When restrict anonymous is <constant>yes</constant>, all anonymous connections
6526 are denied no matter what they are for. This can effect the ability
6527 of a machine to access the Samba Primary Domain Controller to revalidate
6528 its machine account after someone else has logged on the client
6529 interactively. The NT client will display a message saying that
6530 the machine's account in the domain doesn't exist or the password is
6531 bad. The best way to deal with this is to reboot NT client machines
6532 between interactive logons, using "Shutdown and Restart", rather
6533 than "Close all programs and logon as a different user".</para>
6535 <para>Default: <command>restrict anonymous = no</command></para>
6536 </listitem>
6537 </varlistentry>
6541 <varlistentry>
6542 <term><anchor id="ROOT">root (G)</term>
6543 <listitem><para>Synonym for <link linkend="ROOTDIRECTORY">
6544 <parameter>root directory"</parameter></link>.</para>
6545 </listitem>
6546 </varlistentry>
6550 <varlistentry>
6551 <term><anchor id="ROOTDIR">root dir (G)</term>
6552 <listitem><para>Synonym for <link linkend="ROOTDIRECTORY">
6553 <parameter>root directory"</parameter></link>.</para>
6554 </listitem>
6555 </varlistentry>
6558 <varlistentry>
6559 <term><anchor id="ROOTDIRECTORY">root directory (G)</term>
6560 <listitem><para>The server will <command>chroot()</command> (i.e.
6561 Change its root directory) to this directory on startup. This is
6562 not strictly necessary for secure operation. Even without it the
6563 server will deny access to files not in one of the service entries.
6564 It may also check for, and deny access to, soft links to other
6565 parts of the filesystem, or attempts to use ".." in file names
6566 to access other directories (depending on the setting of the <link
6567 linkend="WIDELINKS"><parameter>wide links</parameter></link>
6568 parameter).</para>
6570 <para>Adding a <parameter>root directory</parameter> entry other
6571 than "/" adds an extra level of security, but at a price. It
6572 absolutely ensures that no access is given to files not in the
6573 sub-tree specified in the <parameter>root directory</parameter>
6574 option, <emphasis>including</emphasis> some files needed for
6575 complete operation of the server. To maintain full operability
6576 of the server you will need to mirror some system files
6577 into the <parameter>root directory</parameter> tree. In particular
6578 you will need to mirror <filename>/etc/passwd</filename> (or a
6579 subset of it), and any binaries or configuration files needed for
6580 printing (if required). The set of files that must be mirrored is
6581 operating system dependent.</para>
6583 <para>Default: <command>root directory = /</command></para>
6584 <para>Example: <command>root directory = /homes/smb</command></para>
6585 </listitem>
6586 </varlistentry>
6590 <varlistentry>
6591 <term><anchor id="ROOTPOSTEXEC">root postexec (S)</term>
6592 <listitem><para>This is the same as the <parameter>postexec</parameter>
6593 parameter except that the command is run as root. This
6594 is useful for unmounting filesystems
6595 (such as CDROMs) after a connection is closed.</para>
6597 <para>See also <link linkend="POSTEXEC"><parameter>
6598 postexec</parameter></link>.</para>
6600 <para>Default: <command>root postexec = &lt;empty string&gt;
6601 </command></para>
6602 </listitem>
6603 </varlistentry>
6605 <varlistentry>
6606 <term><anchor id="ROOTPREEXEC">root preexec (S)</term>
6607 <listitem><para>This is the same as the <parameter>preexec</parameter>
6608 parameter except that the command is run as root. This
6609 is useful for mounting filesystems (such as CDROMs) when a
6610 connection is opened.</para>
6612 <para>See also <link linkend="PREEXEC"><parameter>
6613 preexec</parameter></link> and <link linkend="PREEXECCLOSE">
6614 <parameter>preexec close</parameter></link>.</para>
6616 <para>Default: <command>root preexec = &lt;empty string&gt;
6617 </command></para>
6618 </listitem>
6619 </varlistentry>
6623 <varlistentry>
6624 <term><anchor id="ROOTPREEXECCLOSE">root preexec close (S)</term>
6625 <listitem><para>This is the same as the <parameter>preexec close
6626 </parameter> parameter except that the command is run as root.</para>
6628 <para>See also <link linkend="PREEXEC"><parameter>
6629 preexec</parameter></link> and <link linkend="PREEXECCLOSE">
6630 <parameter>preexec close</parameter></link>.</para>
6632 <para>Default: <command>root preexec close = no</command></para>
6633 </listitem>
6634 </varlistentry>
6637 <varlistentry>
6638 <term><anchor id="SECURITY">security (G)</term>
6639 <listitem><para>This option affects how clients respond to
6640 Samba and is one of the most important settings in the <filename>
6641 smb.conf</filename> file.</para>
6643 <para>The option sets the "security mode bit" in replies to
6644 protocol negotiations with <ulink url="smbd.8.html">smbd(8)
6645 </ulink> to turn share level security on or off. Clients decide
6646 based on this bit whether (and how) to transfer user and password
6647 information to the server.</para>
6650 <para>The default is <command>security = user</command>, as this is
6651 the most common setting needed when talking to Windows 98 and
6652 Windows NT.</para>
6654 <para>The alternatives are <command>security = share</command>,
6655 <command>security = server</command> or <command>security = domain
6656 </command>.</para>
6658 <para>In versions of Samba prior to 2.0.0, the default was
6659 <command>security = share</command> mainly because that was
6660 the only option at one stage.</para>
6662 <para>There is a bug in WfWg that has relevance to this
6663 setting. When in user or server level security a WfWg client
6664 will totally ignore the password you type in the "connect
6665 drive" dialog box. This makes it very difficult (if not impossible)
6666 to connect to a Samba service as anyone except the user that
6667 you are logged into WfWg as.</para>
6669 <para>If your PCs use usernames that are the same as their
6670 usernames on the UNIX machine then you will want to use
6671 <command>security = user</command>. If you mostly use usernames
6672 that don't exist on the UNIX box then use <command>security =
6673 share</command>.</para>
6675 <para>You should also use <command>security = share</command> if you
6676 want to mainly setup shares without a password (guest shares). This
6677 is commonly used for a shared printer server. It is more difficult
6678 to setup guest shares with <command>security = user</command>, see
6679 the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6680 </link>parameter for details.</para>
6682 <para>It is possible to use <command>smbd</command> in a <emphasis>
6683 hybrid mode</emphasis> where it is offers both user and share
6684 level security under different <link linkend="NETBIOSALIASES">
6685 <parameter>NetBIOS aliases</parameter></link>. </para>
6687 <para>The different settings will now be explained.</para>
6690 <para><anchor id="SECURITYEQUALSSHARE"><emphasis>SECURITY = SHARE
6691 </emphasis></para>
6693 <para>When clients connect to a share level security server they
6694 need not log onto the server with a valid username and password before
6695 attempting to connect to a shared resource (although modern clients
6696 such as Windows 95/98 and Windows NT will send a logon request with
6697 a username but no password when talking to a <command>security = share
6698 </command> server). Instead, the clients send authentication information
6699 (passwords) on a per-share basis, at the time they attempt to connect
6700 to that share.</para>
6702 <para>Note that <command>smbd</command> <emphasis>ALWAYS</emphasis>
6703 uses a valid UNIX user to act on behalf of the client, even in
6704 <command>security = share</command> level security.</para>
6706 <para>As clients are not required to send a username to the server
6707 in share level security, <command>smbd</command> uses several
6708 techniques to determine the correct UNIX user to use on behalf
6709 of the client.</para>
6711 <para>A list of possible UNIX usernames to match with the given
6712 client password is constructed using the following methods :</para>
6714 <itemizedlist>
6715 <listitem><para>If the <link linkend="GUESTONLY"><parameter>guest
6716 only</parameter></link> parameter is set, then all the other
6717 stages are missed and only the <link linkend="GUESTACCOUNT">
6718 <parameter>guest account</parameter></link> username is checked.
6719 </para></listitem>
6721 <listitem><para>Is a username is sent with the share connection
6722 request, then this username (after mapping - see <link
6723 linkend="USERNAMEMAP"><parameter>username map</parameter></link>),
6724 is added as a potential username.</para></listitem>
6726 <listitem><para>If the client did a previous <emphasis>logon
6727 </emphasis> request (the SessionSetup SMB call) then the
6728 username sent in this SMB will be added as a potential username.
6729 </para></listitem>
6731 <listitem><para>The name of the service the client requested is
6732 added as a potential username.</para></listitem>
6734 <listitem><para>The NetBIOS name of the client is added to
6735 the list as a potential username.</para></listitem>
6737 <listitem><para>Any users on the <link linkend="USER"><parameter>
6738 user</parameter></link> list are added as potential usernames.
6739 </para></listitem>
6740 </itemizedlist>
6742 <para>If the <parameter>guest only</parameter> parameter is
6743 not set, then this list is then tried with the supplied password.
6744 The first user for whom the password matches will be used as the
6745 UNIX user.</para>
6747 <para>If the <parameter>guest only</parameter> parameter is
6748 set, or no username can be determined then if the share is marked
6749 as available to the <parameter>guest account</parameter>, then this
6750 guest user will be used, otherwise access is denied.</para>
6752 <para>Note that it can be <emphasis>very</emphasis> confusing
6753 in share-level security as to which UNIX username will eventually
6754 be used in granting access.</para>
6756 <para>See also the section <link linkend="VALIDATIONSECT">
6757 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6759 <para><anchor id="SECURITYEQUALSUSER"><emphasis>SECURITY = USER
6760 </emphasis></para>
6762 <para>This is the default security setting in Samba 2.2.
6763 With user-level security a client must first "log-on" with a
6764 valid username and password (which can be mapped using the <link
6765 linkend="USERNAMEMAP"><parameter>username map</parameter></link>
6766 parameter). Encrypted passwords (see the <link linkend="ENCRYPTPASSWORDS">
6767 <parameter>encrypted passwords</parameter></link> parameter) can also
6768 be used in this security mode. Parameters such as <link linkend="USER">
6769 <parameter>user</parameter></link> and <link linkend="GUESTONLY">
6770 <parameter>guest only</parameter></link> if set are then applied and
6771 may change the UNIX user to use on this connection, but only after
6772 the user has been successfully authenticated.</para>
6774 <para><emphasis>Note</emphasis> that the name of the resource being
6775 requested is <emphasis>not</emphasis> sent to the server until after
6776 the server has successfully authenticated the client. This is why
6777 guest shares don't work in user level security without allowing
6778 the server to automatically map unknown users into the <link
6779 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>.
6780 See the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6781 </link> parameter for details on doing this.</para>
6783 <para>See also the section <link linkend="VALIDATIONSECT">
6784 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6786 <para><anchor id="SECURITYEQUALSSERVER"><emphasis>SECURITY = SERVER
6787 </emphasis></para>
6789 <para>In this mode Samba will try to validate the username/password
6790 by passing it to another SMB server, such as an NT box. If this
6791 fails it will revert to <command>security = user</command>, but note
6792 that if encrypted passwords have been negotiated then Samba cannot
6793 revert back to checking the UNIX password file, it must have a valid
6794 <filename>smbpasswd</filename> file to check users against. See the
6795 documentation file in the <filename>docs/</filename> directory
6796 <filename>ENCRYPTION.txt</filename> for details on how to set this
6797 up.</para>
6799 <para><emphasis>Note</emphasis> that from the client's point of
6800 view <command>security = server</command> is the same as <command>
6801 security = user</command>. It only affects how the server deals
6802 with the authentication, it does not in any way affect what the
6803 client sees.</para>
6805 <para><emphasis>Note</emphasis> that the name of the resource being
6806 requested is <emphasis>not</emphasis> sent to the server until after
6807 the server has successfully authenticated the client. This is why
6808 guest shares don't work in user level security without allowing
6809 the server to automatically map unknown users into the <link
6810 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>.
6811 See the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6812 </link> parameter for details on doing this.</para>
6814 <para>See also the section <link linkend="VALIDATIONSECT">
6815 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6817 <para>See also the <link linkend="PASSWORDSERVER"><parameter>password
6818 server</parameter></link> parameter and the <link
6819 linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
6820 </link> parameter.</para>
6822 <para><anchor id="SECURITYEQUALSDOMAIN"><emphasis>SECURITY = DOMAIN
6823 </emphasis></para>
6825 <para>This mode will only work correctly if <ulink
6826 url="smbpasswd.8.html">smbpasswd(8)</ulink> has been used to add this
6827 machine into a Windows NT Domain. It expects the <link
6828 linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
6829 </link> parameter to be set to <constant>yes</constant>. In this
6830 mode Samba will try to validate the username/password by passing
6831 it to a Windows NT Primary or Backup Domain Controller, in exactly
6832 the same way that a Windows NT Server would do.</para>
6834 <para><emphasis>Note</emphasis> that a valid UNIX user must still
6835 exist as well as the account on the Domain Controller to allow
6836 Samba to have a valid UNIX account to map file access to.</para>
6838 <para><emphasis>Note</emphasis> that from the client's point
6839 of view <command>security = domain</command> is the same as <command>security = user
6840 </command>. It only affects how the server deals with the authentication,
6841 it does not in any way affect what the client sees.</para>
6843 <para><emphasis>Note</emphasis> that the name of the resource being
6844 requested is <emphasis>not</emphasis> sent to the server until after
6845 the server has successfully authenticated the client. This is why
6846 guest shares don't work in user level security without allowing
6847 the server to automatically map unknown users into the <link
6848 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>.
6849 See the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6850 </link> parameter for details on doing this.</para>
6852 <para><emphasis>BUG:</emphasis> There is currently a bug in the
6853 implementation of <command>security = domain</command> with respect
6854 to multi-byte character set usernames. The communication with a
6855 Domain Controller must be done in UNICODE and Samba currently
6856 does not widen multi-byte user names to UNICODE correctly, thus
6857 a multi-byte username will not be recognized correctly at the
6858 Domain Controller. This issue will be addressed in a future release.</para>
6860 <para>See also the section <link linkend="VALIDATIONSECT">
6861 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6863 <para>See also the <link linkend="PASSWORDSERVER"><parameter>password
6864 server</parameter></link> parameter and the <link
6865 linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
6866 </link> parameter.</para>
6868 <para>Default: <command>security = USER</command></para>
6869 <para>Example: <command>security = DOMAIN</command></para>
6870 </listitem>
6871 </varlistentry>
6875 <varlistentry>
6876 <term><anchor id="SECURITYMASK">security mask (S)</term>
6877 <listitem><para>This parameter controls what UNIX permission
6878 bits can be modified when a Windows NT client is manipulating
6879 the UNIX permission on a file using the native NT security
6880 dialog box.</para>
6882 <para>This parameter is applied as a mask (AND'ed with) to
6883 the changed permission bits, thus preventing any bits not in
6884 this mask from being modified. Essentially, zero bits in this
6885 mask may be treated as a set of bits the user is not allowed
6886 to change.</para>
6888 <para>If not set explicitly this parameter is 0777, allowing
6889 a user to modify all the user/group/world permissions on a file.
6890 </para>
6892 <para><emphasis>Note</emphasis> that users who can access the
6893 Samba server through other means can easily bypass this
6894 restriction, so it is primarily useful for standalone
6895 "appliance" systems. Administrators of most normal systems will
6896 probably want to leave it set to <constant>0777</constant>.</para>
6898 <para>See also the <link linkend="FORCEDIRECTORYSECURITYMODE">
6899 <parameter>force directory security mode</parameter></link>,
6900 <link linkend="DIRECTORYSECURITYMASK"><parameter>directory
6901 security mask</parameter></link>, <link linkend="FORCESECURITYMODE">
6902 <parameter>force security mode</parameter></link> parameters.</para>
6904 <para>Default: <command>security mask = 0777</command></para>
6905 <para>Example: <command>security mask = 0770</command></para>
6906 </listitem>
6907 </varlistentry>
6910 <varlistentry>
6911 <term><anchor id="SERVERSTRING">server string (G)</term>
6912 <listitem><para>This controls what string will show up in the
6913 printer comment box in print manager and next to the IPC connection
6914 in <command>net view</command>. It can be any string that you wish
6915 to show to your users.</para>
6917 <para>It also sets what will appear in browse lists next
6918 to the machine name.</para>
6920 <para>A <parameter>%v</parameter> will be replaced with the Samba
6921 version number.</para>
6923 <para>A <parameter>%h</parameter> will be replaced with the
6924 hostname.</para>
6926 <para>Default: <command>server string = Samba %v</command></para>
6928 <para>Example: <command>server string = University of GNUs Samba
6929 Server</command></para>
6930 </listitem>
6931 </varlistentry>
6935 <varlistentry>
6936 <term><anchor id="SETDIRECTORY">set directory (S)</term>
6937 <listitem><para>If <command>set directory = no</command>, then
6938 users of the service may not use the setdir command to change
6939 directory.</para>
6941 <para>The <command>setdir</command> command is only implemented
6942 in the Digital Pathworks client. See the Pathworks documentation
6943 for details.</para>
6945 <para>Default: <command>set directory = no</command></para>
6946 </listitem>
6947 </varlistentry>
6951 <varlistentry>
6952 <term><anchor id="SHAREMODES">share modes (S)</term>
6953 <listitem><para>This enables or disables the honoring of
6954 the <parameter>share modes</parameter> during a file open. These
6955 modes are used by clients to gain exclusive read or write access
6956 to a file.</para>
6958 <para>These open modes are not directly supported by UNIX, so
6959 they are simulated using shared memory, or lock files if your
6960 UNIX doesn't support shared memory (almost all do).</para>
6962 <para>The share modes that are enabled by this option are
6963 <constant>DENY_DOS</constant>, <constant>DENY_ALL</constant>,
6964 <constant>DENY_READ</constant>, <constant>DENY_WRITE</constant>,
6965 <constant>DENY_NONE</constant> and <constant>DENY_FCB</constant>.
6966 </para>
6968 <para>This option gives full share compatibility and enabled
6969 by default.</para>
6971 <para>You should <emphasis>NEVER</emphasis> turn this parameter
6972 off as many Windows applications will break if you do so.</para>
6974 <para>Default: <command>share modes = yes</command></para>
6975 </listitem>
6976 </varlistentry>
6980 <varlistentry>
6981 <term><anchor id="SHORTPRESERVECASE">short preserve case (S)</term>
6982 <listitem><para>This boolean parameter controls if new files
6983 which conform to 8.3 syntax, that is all in upper case and of
6984 suitable length, are created upper case, or if they are forced
6985 to be the <link linkend="DEFAULTCASE"><parameter>default case
6986 </parameter></link>. This option can be use with <link
6987 linkend="PRESERVECASE"><command>preserve case = yes</command>
6988 </link> to permit long filenames to retain their case, while short
6989 names are lowered. </para>
6991 <para>See the section on <link linkend="NAMEMANGLINGSECT">
6992 NAME MANGLING</link>.</para>
6994 <para>Default: <command>short preserve case = yes</command></para>
6995 </listitem>
6996 </varlistentry>
7000 <varlistentry>
7001 <term><anchor id="SHOWADDPRINTERWIZARD">show add printer wizard (G)</term>
7002 <listitem><para>With the introduction of MS-RPC based printing support
7003 for Windows NT/2000 client in Samba 2.2, a "Printers..." folder will
7004 appear on Samba hosts in the share listing. Normally this folder will
7005 contain an icon for the MS Add Printer Wizard (APW). However, it is
7006 possible to disable this feature regardless of the level of privilege
7007 of the connected user.</para>
7009 <para>Under normal circumstances, the Windows NT/2000 client will
7010 open a handle on the printer server with OpenPrinterEx() asking for
7011 Administrator privileges. If the user does not have administrative
7012 access on the print server (i.e is not root or a member of the
7013 <parameter>printer admin</parameter> group), the OpenPrinterEx()
7014 call fails and the client makes another open call with a request for
7015 a lower privilege level. This should succeed, however the APW
7016 icon will not be displayed.</para>
7018 <para>Disabling the <parameter>show add printer wizard</parameter>
7019 parameter will always cause the OpenPrinterEx() on the server
7020 to fail. Thus the APW icon will never be displayed. <emphasis>
7021 Note :</emphasis>This does not prevent the same user from having
7022 administrative privilege on an individual printer.</para>
7024 <para>See also <link linkend="ADDPRINTERCOMMAND"><parameter>addprinter
7025 command</parameter></link>, <link linkend="DELETEPRINTERCOMMAND">
7026 <parameter>deleteprinter command</parameter></link>, <link
7027 linkend="PRINTERADMIN"><parameter>printer admin</parameter></link></para>
7029 <para>Default :<command>show add printer wizard = yes</command></para>
7030 </listitem>
7031 </varlistentry>
7036 <varlistentry>
7037 <term><anchor id="SMBPASSWDFILE">smb passwd file (G)</term>
7038 <listitem><para>This option sets the path to the encrypted
7039 smbpasswd file. By default the path to the smbpasswd file
7040 is compiled into Samba.</para>
7042 <para>Default: <command>smb passwd file = ${prefix}/private/smbpasswd
7043 </command></para>
7045 <para>Example: <command>smb passwd file = /etc/samba/smbpasswd
7046 </command></para>
7047 </listitem>
7048 </varlistentry>
7053 <varlistentry>
7054 <term><anchor id="SOCKETADDRESS">socket address (G)</term>
7055 <listitem><para>This option allows you to control what
7056 address Samba will listen for connections on. This is used to
7057 support multiple virtual interfaces on the one server, each
7058 with a different configuration.</para>
7060 <para>By default Samba will accept connections on any
7061 address.</para>
7063 <para>Example: <command>socket address = 192.168.2.20</command>
7064 </para>
7065 </listitem>
7066 </varlistentry>
7070 <varlistentry>
7071 <term><anchor id="SOCKETOPTIONS">socket options (G)</term>
7072 <listitem><para>This option allows you to set socket options
7073 to be used when talking with the client.</para>
7075 <para>Socket options are controls on the networking layer
7076 of the operating systems which allow the connection to be
7077 tuned.</para>
7079 <para>This option will typically be used to tune your Samba
7080 server for optimal performance for your local network. There is
7081 no way that Samba can know what the optimal parameters are for
7082 your net, so you must experiment and choose them yourself. We
7083 strongly suggest you read the appropriate documentation for your
7084 operating system first (perhaps <command>man setsockopt</command>
7085 will help).</para>
7087 <para>You may find that on some systems Samba will say
7088 "Unknown socket option" when you supply an option. This means you
7089 either incorrectly typed it or you need to add an include file
7090 to includes.h for your OS. If the latter is the case please
7091 send the patch to <ulink url="mailto:samba@samba.org">
7092 samba@samba.org</ulink>.</para>
7094 <para>Any of the supported socket options may be combined
7095 in any way you like, as long as your OS allows it.</para>
7097 <para>This is the list of socket options currently settable
7098 using this option:</para>
7100 <itemizedlist>
7101 <listitem><para>SO_KEEPALIVE</para></listitem>
7102 <listitem><para>SO_REUSEADDR</para></listitem>
7103 <listitem><para>SO_BROADCAST</para></listitem>
7104 <listitem><para>TCP_NODELAY</para></listitem>
7105 <listitem><para>IPTOS_LOWDELAY</para></listitem>
7106 <listitem><para>IPTOS_THROUGHPUT</para></listitem>
7107 <listitem><para>SO_SNDBUF *</para></listitem>
7108 <listitem><para>SO_RCVBUF *</para></listitem>
7109 <listitem><para>SO_SNDLOWAT *</para></listitem>
7110 <listitem><para>SO_RCVLOWAT *</para></listitem>
7111 </itemizedlist>
7113 <para>Those marked with a <emphasis>'*'</emphasis> take an integer
7114 argument. The others can optionally take a 1 or 0 argument to enable
7115 or disable the option, by default they will be enabled if you
7116 don't specify 1 or 0.</para>
7118 <para>To specify an argument use the syntax SOME_OPTION = VALUE
7119 for example <command>SO_SNDBUF = 8192</command>. Note that you must
7120 not have any spaces before or after the = sign.</para>
7122 <para>If you are on a local network then a sensible option
7123 might be</para>
7124 <para><command>socket options = IPTOS_LOWDELAY</command></para>
7126 <para>If you have a local network then you could try:</para>
7127 <para><command>socket options = IPTOS_LOWDELAY TCP_NODELAY</command></para>
7129 <para>If you are on a wide area network then perhaps try
7130 setting IPTOS_THROUGHPUT. </para>
7132 <para>Note that several of the options may cause your Samba
7133 server to fail completely. Use these options with caution!</para>
7135 <para>Default: <command>socket options = TCP_NODELAY</command></para>
7136 <para>Example: <command>socket options = IPTOS_LOWDELAY</command></para>
7137 </listitem>
7138 </varlistentry>
7143 <varlistentry>
7144 <term><anchor id="SOURCEENVIRONMENT">source environment (G)</term>
7145 <listitem><para>This parameter causes Samba to set environment
7146 variables as per the content of the file named.</para>
7148 <para>If the value of this parameter starts with a "|" character
7149 then Samba will treat that value as a pipe command to open and
7150 will set the environment variables from the output of the pipe.</para>
7152 <para>The contents of the file or the output of the pipe should
7153 be formatted as the output of the standard Unix <command>env(1)
7154 </command> command. This is of the form :</para>
7155 <para>Example environment entry:</para>
7156 <para><command>SAMBA_NETBIOS_NAME = myhostname</command></para>
7158 <para>Default: <emphasis>No default value</emphasis></para>
7159 <para>Examples: <command>source environment = |/etc/smb.conf.sh
7160 </command></para>
7162 <para>Example: <command>source environment =
7163 /usr/local/smb_env_vars</command></para>
7164 </listitem>
7165 </varlistentry>
7169 <varlistentry>
7170 <term><anchor id="SSL">ssl (G)</term>
7171 <listitem><para>This variable is part of SSL-enabled Samba. This
7172 is only available if the SSL libraries have been compiled on your
7173 system and the configure option <command>--with-ssl</command> was
7174 given at configure time.</para>
7176 <para>This variable enables or disables the entire SSL mode. If
7177 it is set to <constant>no</constant>, the SSL-enabled Samba behaves
7178 exactly like the non-SSL Samba. If set to <constant>yes</constant>,
7179 it depends on the variables <link linkend="SSLHOSTS"><parameter>
7180 ssl hosts</parameter></link> and <link linkend="SSLHOSTSRESIGN">
7181 <parameter>ssl hosts resign</parameter></link> whether an SSL
7182 connection will be required.</para>
7184 <para>Default: <command>ssl = no</command></para>
7185 </listitem>
7186 </varlistentry>
7190 <varlistentry>
7191 <term><anchor id="SSLCACERTDIR">ssl CA certDir (G)</term>
7192 <listitem><para>This variable is part of SSL-enabled Samba. This
7193 is only available if the SSL libraries have been compiled on your
7194 system and the configure option <command>--with-ssl</command> was
7195 given at configure time.</para>
7197 <para>This variable defines where to look up the Certification
7198 Authorities. The given directory should contain one file for
7199 each CA that Samba will trust. The file name must be the hash
7200 value over the "Distinguished Name" of the CA. How this directory
7201 is set up is explained later in this document. All files within the
7202 directory that don't fit into this naming scheme are ignored. You
7203 don't need this variable if you don't verify client certificates.</para>
7205 <para>Default: <command>ssl CA certDir = /usr/local/ssl/certs
7206 </command></para>
7207 </listitem>
7208 </varlistentry>
7212 <varlistentry>
7213 <term><anchor id="SSLCACERTFILE">ssl CA certFile (G)</term>
7214 <listitem><para>This variable is part of SSL-enabled Samba. This
7215 is only available if the SSL libraries have been compiled on your
7216 system and the configure option <command>--with-ssl</command> was
7217 given at configure time.</para>
7219 <para>This variable is a second way to define the trusted CAs.
7220 The certificates of the trusted CAs are collected in one big
7221 file and this variable points to the file. You will probably
7222 only use one of the two ways to define your CAs. The first choice is
7223 preferable if you have many CAs or want to be flexible, the second
7224 is preferable if you only have one CA and want to keep things
7225 simple (you won't need to create the hashed file names). You
7226 don't need this variable if you don't verify client certificates.</para>
7228 <para>Default: <command>ssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem
7229 </command></para>
7230 </listitem>
7231 </varlistentry>
7235 <varlistentry>
7236 <term><anchor id="SSLCIPHERS">ssl ciphers (G)</term>
7237 <listitem><para>This variable is part of SSL-enabled Samba. This
7238 is only available if the SSL libraries have been compiled on your
7239 system and the configure option <command>--with-ssl</command> was
7240 given at configure time.</para>
7242 <para>This variable defines the ciphers that should be offered
7243 during SSL negotiation. You should not set this variable unless
7244 you know what you are doing.</para>
7245 </listitem>
7246 </varlistentry>
7249 <varlistentry>
7250 <term><anchor id="SSLCLIENTCERT">ssl client cert (G)</term>
7251 <listitem><para>This variable is part of SSL-enabled Samba. This
7252 is only available if the SSL libraries have been compiled on your
7253 system and the configure option <command>--with-ssl</command> was
7254 given at configure time.</para>
7256 <para>The certificate in this file is used by <ulink url="smbclient.1.html">
7257 <command>smbclient(1)</command></ulink> if it exists. It's needed
7258 if the server requires a client certificate.</para>
7260 <para>Default: <command>ssl client cert = /usr/local/ssl/certs/smbclient.pem
7261 </command></para>
7262 </listitem>
7263 </varlistentry>
7267 <varlistentry>
7268 <term><anchor id="SSLCLIENTKEY">ssl client key (G)</term>
7269 <listitem><para>This variable is part of SSL-enabled Samba. This
7270 is only available if the SSL libraries have been compiled on your
7271 system and the configure option <command>--with-ssl</command> was
7272 given at configure time.</para>
7274 <para>This is the private key for <ulink url="smbclient.1.html">
7275 <command>smbclient(1)</command></ulink>. It's only needed if the
7276 client should have a certificate. </para>
7278 <para>Default: <command>ssl client key = /usr/local/ssl/private/smbclient.pem
7279 </command></para>
7280 </listitem>
7281 </varlistentry>
7285 <varlistentry>
7286 <term><anchor id="SSLCOMPATIBILITY">ssl compatibility (G)</term>
7287 <listitem><para>This variable is part of SSL-enabled Samba. This
7288 is only available if the SSL libraries have been compiled on your
7289 system and the configure option <command>--with-ssl</command> was
7290 given at configure time.</para>
7292 <para>This variable defines whether OpenSSL should be configured
7293 for bug compatibility with other SSL implementations. This is
7294 probably not desirable because currently no clients with SSL
7295 implementations other than OpenSSL exist.</para>
7297 <para>Default: <command>ssl compatibility = no</command></para>
7298 </listitem>
7299 </varlistentry>
7302 <varlistentry>
7303 <term><anchor id="SSLEGDSOCKET">ssl egd socket (G)</term>
7304 <listitem><para>This variable is part of SSL-enabled Samba. This
7305 is only available if the SSL libraries have been compiled on your
7306 system and the configure option <command>--with-ssl</command> was
7307 given at configure time.</para>
7309 <para>
7310 This option is used to define the location of the communiation socket of
7311 an EGD or PRNGD daemon, from which entropy can be retrieved. This option
7312 can be used instead of or together with the <link
7313 linkend="SSLENTROPYFILE"><parameter>ssl entropy file</parameter></link>
7314 directive. 255 bytes of entropy will be retrieved from the daemon.
7315 </para>
7317 <para>Default: <emphasis>none</emphasis></para>
7318 </listitem>
7319 </varlistentry>
7322 <varlistentry>
7323 <term><anchor id="SSLENTROPYBYTES">ssl entropy bytes (G)</term>
7324 <listitem><para>This variable is part of SSL-enabled Samba. This
7325 is only available if the SSL libraries have been compiled on your
7326 system and the configure option <command>--with-ssl</command> was
7327 given at configure time.</para>
7329 <para>
7330 This parameter is used to define the number of bytes which should
7331 be read from the <link linkend="SSLENTROPYFILE"><parameter>ssl entropy
7332 file</parameter></link> If a -1 is specified, the entire file will
7333 be read.
7334 </para>
7336 <para>Default: <command>ssl entropy bytes = 255</command></para>
7337 </listitem>
7338 </varlistentry>
7342 <varlistentry>
7343 <term><anchor id="SSLENTROPYFILE">ssl entropy file (G)</term>
7344 <listitem><para>This variable is part of SSL-enabled Samba. This
7345 is only available if the SSL libraries have been compiled on your
7346 system and the configure option <command>--with-ssl</command> was
7347 given at configure time.</para>
7349 <para>
7350 This parameter is used to specify a file from which processes will
7351 read "random bytes" on startup. In order to seed the internal pseudo
7352 random number generator, entropy must be provided. On system with a
7353 <filename>/dev/urandom</filename> device file, the processes
7354 will retrieve its entropy from the kernel. On systems without kernel
7355 entropy support, a file can be supplied that will be read on startup
7356 and that will be used to seed the PRNG.
7357 </para>
7359 <para>Default: <emphasis>none</emphasis></para>
7360 </listitem>
7361 </varlistentry>
7365 <varlistentry>
7366 <term><anchor id="SSLHOSTS">ssl hosts (G)</term>
7367 <listitem><para>See <link linkend="SSLHOSTSRESIGN"><parameter>
7368 ssl hosts resign</parameter></link>.</para>
7369 </listitem>
7370 </varlistentry>
7373 <varlistentry>
7374 <term><anchor id="SSLHOSTSRESIGN">ssl hosts resign (G)</term>
7375 <listitem><para>This variable is part of SSL-enabled Samba. This
7376 is only available if the SSL libraries have been compiled on your
7377 system and the configure option <command>--with-ssl</command> was
7378 given at configure time.</para>
7380 <para>These two variables define whether Samba will go
7381 into SSL mode or not. If none of them is defined, Samba will
7382 allow only SSL connections. If the <link linkend="SSLHOSTS">
7383 <parameter>ssl hosts</parameter></link> variable lists
7384 hosts (by IP-address, IP-address range, net group or name),
7385 only these hosts will be forced into SSL mode. If the <parameter>
7386 ssl hosts resign</parameter> variable lists hosts, only these
7387 hosts will <emphasis>NOT</emphasis> be forced into SSL mode. The syntax for these two
7388 variables is the same as for the <link linkend="HOSTSALLOW"><parameter>
7389 hosts allow</parameter></link> and <link linkend="HOSTSDENY">
7390 <parameter>hosts deny</parameter></link> pair of variables, only
7391 that the subject of the decision is different: It's not the access
7392 right but whether SSL is used or not. </para>
7394 <para>The example below requires SSL connections from all hosts
7395 outside the local net (which is 192.168.*.*).</para>
7397 <para>Default: <command>ssl hosts = &lt;empty string&gt;</command></para>
7398 <para><command>ssl hosts resign = &lt;empty string&gt;</command></para>
7400 <para>Example: <command>ssl hosts resign = 192.168.</command></para>
7401 </listitem>
7402 </varlistentry>
7406 <varlistentry>
7407 <term><anchor id="SSLREQUIRECLIENTCERT">ssl require clientcert (G)</term>
7408 <listitem><para>This variable is part of SSL-enabled Samba. This
7409 is only available if the SSL libraries have been compiled on your
7410 system and the configure option <command>--with-ssl</command> was
7411 given at configure time.</para>
7413 <para>If this variable is set to <constant>yes</constant>, the
7414 server will not tolerate connections from clients that don't
7415 have a valid certificate. The directory/file given in <link
7416 linkend="SSLCACERTDIR"><parameter>ssl CA certDir</parameter>
7417 </link> and <link linkend="SSLCACERTFILE"><parameter>ssl CA certFile
7418 </parameter></link> will be used to look up the CAs that issued
7419 the client's certificate. If the certificate can't be verified
7420 positively, the connection will be terminated. If this variable
7421 is set to <constant>no</constant>, clients don't need certificates.
7422 Contrary to web applications you really <emphasis>should</emphasis>
7423 require client certificates. In the web environment the client's
7424 data is sensitive (credit card numbers) and the server must prove
7425 to be trustworthy. In a file server environment the server's data
7426 will be sensitive and the clients must prove to be trustworthy.</para>
7428 <para>Default: <command>ssl require clientcert = no</command></para>
7429 </listitem>
7430 </varlistentry>
7434 <varlistentry>
7435 <term><anchor id="SSLREQUIRESERVERCERT">ssl require servercert (G)</term>
7436 <listitem><para>This variable is part of SSL-enabled Samba. This
7437 is only available if the SSL libraries have been compiled on your
7438 system and the configure option <command>--with-ssl</command> was
7439 given at configure time.</para>
7441 <para>If this variable is set to <constant>yes</constant>, the
7442 <ulink url="smbclient.1.html"><command>smbclient(1)</command>
7443 </ulink> will request a certificate from the server. Same as
7444 <link linkend="SSLREQUIRECLIENTCERT"><parameter>ssl require
7445 clientcert</parameter></link> for the server.</para>
7447 <para>Default: <command>ssl require servercert = no</command>
7448 </para>
7449 </listitem>
7450 </varlistentry>
7452 <varlistentry>
7453 <term><anchor id="SSLSERVERCERT">ssl server cert (G)</term>
7454 <listitem><para>This variable is part of SSL-enabled Samba. This
7455 is only available if the SSL libraries have been compiled on your
7456 system and the configure option <command>--with-ssl</command> was
7457 given at configure time.</para>
7459 <para>This is the file containing the server's certificate.
7460 The server <emphasis>must</emphasis> have a certificate. The
7461 file may also contain the server's private key. See later for
7462 how certificates and private keys are created.</para>
7464 <para>Default: <command>ssl server cert = &lt;empty string&gt;
7465 </command></para>
7466 </listitem>
7467 </varlistentry>
7470 <varlistentry>
7471 <term><anchor id="SSLSERVERKEY">ssl server key (G)</term>
7472 <listitem><para>This variable is part of SSL-enabled Samba. This
7473 is only available if the SSL libraries have been compiled on your
7474 system and the configure option <command>--with-ssl</command> was
7475 given at configure time.</para>
7477 <para>This file contains the private key of the server. If
7478 this variable is not defined, the key is looked up in the
7479 certificate file (it may be appended to the certificate).
7480 The server <emphasis>must</emphasis> have a private key
7481 and the certificate <emphasis>must</emphasis>
7482 match this private key.</para>
7484 <para>Default: <command>ssl server key = &lt;empty string&gt;
7485 </command></para>
7486 </listitem>
7487 </varlistentry>
7490 <varlistentry>
7491 <term><anchor id="SSLVERSION">ssl version (G)</term>
7492 <listitem><para>This variable is part of SSL-enabled Samba. This
7493 is only available if the SSL libraries have been compiled on your
7494 system and the configure option <command>--with-ssl</command> was
7495 given at configure time.</para>
7497 <para>This enumeration variable defines the versions of the
7498 SSL protocol that will be used. <constant>ssl2or3</constant> allows
7499 dynamic negotiation of SSL v2 or v3, <constant>ssl2</constant> results
7500 in SSL v2, <constant>ssl3</constant> results in SSL v3 and
7501 <constant>tls1</constant> results in TLS v1. TLS (Transport Layer
7502 Security) is the new standard for SSL.</para>
7504 <para>Default: <command>ssl version = "ssl2or3"</command></para>
7505 </listitem>
7506 </varlistentry>
7510 <varlistentry>
7511 <term><anchor id="STATCACHE">stat cache (G)</term>
7512 <listitem><para>This parameter determines if <ulink
7513 url="smbd.8.html">smbd(8)</ulink> will use a cache in order to
7514 speed up case insensitive name mappings. You should never need
7515 to change this parameter.</para>
7517 <para>Default: <command>stat cache = yes</command></para>
7518 </listitem>
7519 </varlistentry>
7521 <varlistentry>
7522 <term><anchor id="STATCACHESIZE">stat cache size (G)</term>
7523 <listitem><para>This parameter determines the number of
7524 entries in the <parameter>stat cache</parameter>. You should
7525 never need to change this parameter.</para>
7527 <para>Default: <command>stat cache size = 50</command></para>
7528 </listitem>
7529 </varlistentry>
7533 <varlistentry>
7534 <term><anchor id="STATUS">status (G)</term>
7535 <listitem><para>This enables or disables logging of connections
7536 to a status file that <ulink url="smbstatus.1.html">smbstatus(1)</ulink>
7537 can read.</para>
7539 <para>With this disabled <command>smbstatus</command> won't be able
7540 to tell you what connections are active. You should never need to
7541 change this parameter.</para>
7543 <para>Default: <command>status = yes</command></para>
7544 </listitem>
7545 </varlistentry>
7549 <varlistentry>
7550 <term><anchor id="STRICTALLOCATE">strict allocate (S)</term>
7551 <listitem><para>This is a boolean that controls the handling of
7552 disk space allocation in the server. When this is set to <constant>yes</constant>
7553 the server will change from UNIX behaviour of not committing real
7554 disk storage blocks when a file is extended to the Windows behaviour
7555 of actually forcing the disk system to allocate real storage blocks
7556 when a file is created or extended to be a given size. In UNIX
7557 terminology this means that Samba will stop creating sparse files.
7558 This can be slow on some systems.</para>
7560 <para>When strict allocate is <constant>no</constant> the server does sparse
7561 disk block allocation when a file is extended.</para>
7563 <para>Setting this to <constant>yes</constant> can help Samba return
7564 out of quota messages on systems that are restricting the disk quota
7565 of users.</para>
7567 <para>Default: <command>strict allocate = no</command></para>
7568 </listitem>
7569 </varlistentry>
7573 <varlistentry>
7574 <term><anchor id="STRICTLOCKING">strict locking (S)</term>
7575 <listitem><para>This is a boolean that controls the handling of
7576 file locking in the server. When this is set to <constant>yes</constant>
7577 the server will check every read and write access for file locks, and
7578 deny access if locks exist. This can be slow on some systems.</para>
7580 <para>When strict locking is <constant>no</constant> the server does file
7581 lock checks only when the client explicitly asks for them.</para>
7583 <para>Well-behaved clients always ask for lock checks when it
7584 is important, so in the vast majority of cases <command>strict
7585 locking = no</command> is preferable.</para>
7587 <para>Default: <command>strict locking = no</command></para>
7588 </listitem>
7589 </varlistentry>
7593 <varlistentry>
7594 <term><anchor id="STRICTSYNC">strict sync (S)</term>
7595 <listitem><para>Many Windows applications (including the Windows
7596 98 explorer shell) seem to confuse flushing buffer contents to
7597 disk with doing a sync to disk. Under UNIX, a sync call forces
7598 the process to be suspended until the kernel has ensured that
7599 all outstanding data in kernel disk buffers has been safely stored
7600 onto stable storage. This is very slow and should only be done
7601 rarely. Setting this parameter to <constant>no</constant> (the
7602 default) means that <ulink url="smbd.8.html">smbd</ulink> ignores the Windows applications requests for
7603 a sync call. There is only a possibility of losing data if the
7604 operating system itself that Samba is running on crashes, so there is
7605 little danger in this default setting. In addition, this fixes many
7606 performance problems that people have reported with the new Windows98
7607 explorer shell file copies.</para>
7609 <para>See also the <link linkend="SYNCALWAYS"><parameter>sync
7610 always></parameter></link> parameter.</para>
7612 <para>Default: <command>strict sync = no</command></para>
7613 </listitem>
7614 </varlistentry>
7617 <varlistentry>
7618 <term><anchor id="STRIPDOT">strip dot (G)</term>
7619 <listitem><para>This parameter is now unused in Samba (2.2.5 and above).
7620 It used strip trailing dots off UNIX filenames but was not correctly implmented.
7621 In Samba 2.2.5 and above UNIX filenames ending in a dot are invalid Windows long
7622 filenames (as they are in Windows NT and above) and are mangled to 8.3 before
7623 being returned to a client.</para>
7625 <para>Default: <command>strip dot = no</command></para>
7626 </listitem>
7627 </varlistentry>
7631 <varlistentry>
7632 <term><anchor id="SYNCALWAYS">sync always (S)</term>
7633 <listitem><para>This is a boolean parameter that controls
7634 whether writes will always be written to stable storage before
7635 the write call returns. If this is <constant>no</constant> then the server will be
7636 guided by the client's request in each write call (clients can
7637 set a bit indicating that a particular write should be synchronous).
7638 If this is <constant>yes</constant> then every write will be followed by a <command>fsync()
7639 </command> call to ensure the data is written to disk. Note that
7640 the <parameter>strict sync</parameter> parameter must be set to
7641 <constant>yes</constant> in order for this parameter to have
7642 any affect.</para>
7644 <para>See also the <link linkend="STRICTSYNC"><parameter>strict
7645 sync</parameter></link> parameter.</para>
7647 <para>Default: <command>sync always = no</command></para>
7648 </listitem>
7649 </varlistentry>
7653 <varlistentry>
7654 <term><anchor id="SYSLOG">syslog (G)</term>
7655 <listitem><para>This parameter maps how Samba debug messages
7656 are logged onto the system syslog logging levels. Samba debug
7657 level zero maps onto syslog <constant>LOG_ERR</constant>, debug
7658 level one maps onto <constant>LOG_WARNING</constant>, debug level
7659 two maps onto <constant>LOG_NOTICE</constant>, debug level three
7660 maps onto LOG_INFO. All higher levels are mapped to <constant>
7661 LOG_DEBUG</constant>.</para>
7663 <para>This parameter sets the threshold for sending messages
7664 to syslog. Only messages with debug level less than this value
7665 will be sent to syslog.</para>
7667 <para>Default: <command>syslog = 1</command></para>
7668 </listitem>
7669 </varlistentry>
7673 <varlistentry>
7674 <term><anchor id="SYSLOGONLY">syslog only (G)</term>
7675 <listitem><para>If this parameter is set then Samba debug
7676 messages are logged into the system syslog only, and not to
7677 the debug log files.</para>
7679 <para>Default: <command>syslog only = no</command></para>
7680 </listitem>
7681 </varlistentry>
7685 <varlistentry>
7686 <term><anchor id="TEMPLATEHOMEDIR">template homedir (G)</term>
7687 <listitem><para>When filling out the user information for a Windows NT
7688 user, the <ulink url="winbindd.8.html">winbindd(8)</ulink> daemon
7689 uses this parameter to fill in the home directory for that user.
7690 If the string <parameter>%D</parameter> is present it is substituted
7691 with the user's Windows NT domain name. If the string <parameter>%U
7692 </parameter> is present it is substituted with the user's Windows
7693 NT user name.</para>
7695 <para>Default: <command>template homedir = /home/%D/%U</command></para>
7696 </listitem>
7697 </varlistentry>
7701 <varlistentry>
7702 <term><anchor id="TEMPLATESHELL">template shell (G)</term>
7703 <listitem><para>When filling out the user information for a Windows NT
7704 user, the <ulink url="winbindd.8.html">winbindd(8)</ulink> daemon
7705 uses this parameter to fill in the login shell for that user.</para>
7707 <para>Default: <command>template shell = /bin/false</command></para>
7708 </listitem>
7709 </varlistentry>
7713 <varlistentry>
7714 <term><anchor id="TIMEOFFSET">time offset (G)</term>
7715 <listitem><para>This parameter is a setting in minutes to add
7716 to the normal GMT to local time conversion. This is useful if
7717 you are serving a lot of PCs that have incorrect daylight
7718 saving time handling.</para>
7720 <para>Default: <command>time offset = 0</command></para>
7721 <para>Example: <command>time offset = 60</command></para>
7722 </listitem>
7723 </varlistentry>
7727 <varlistentry>
7728 <term><anchor id="TIMESERVER">time server (G)</term>
7729 <listitem><para>This parameter determines if <ulink url="nmbd.8.html">
7730 nmbd(8)</ulink> advertises itself as a time server to Windows
7731 clients.</para>
7733 <para>Default: <command>time server = no</command></para>
7734 </listitem>
7735 </varlistentry>
7738 <varlistentry>
7739 <term><anchor id="TIMESTAMPLOGS">timestamp logs (G)</term>
7740 <listitem><para>Synonym for <link linkend="DEBUGTIMESTAMP"><parameter>
7741 debug timestamp</parameter></link>.</para>
7742 </listitem>
7743 </varlistentry>
7749 <varlistentry>
7750 <term><anchor id="TOTALPRINTJOBS">total print jobs (G)</term>
7751 <listitem><para>This parameter accepts an integer value which defines
7752 a limit on the maximum number of print jobs that will be accepted
7753 system wide at any given time. If a print job is submitted
7754 by a client which will exceed this number, then <ulink url="smbd.8.html">smbd</ulink> will return an
7755 error indicating that no space is available on the server. The
7756 default value of 0 means that no such limit exists. This parameter
7757 can be used to prevent a server from exceeding its capacity and is
7758 designed as a printing throttle. See also
7759 <link linkend="MAXPRINTJOBS"><parameter>max print jobs</parameter</link>.
7760 </para>
7762 <para>Default: <command>total print jobs = 0</command></para>
7763 <para>Example: <command>total print jobs = 5000</command></para>
7764 </listitem>
7765 </varlistentry>
7770 <varlistentry>
7771 <term><anchor id="UNIXEXTENSIONS">unix extensions(G)</term>
7772 <listitem><para>This boolean parameter controls whether Samba
7773 implments the CIFS UNIX extensions, as defined by HP.
7774 These extensions enable Samba to better serve UNIX CIFS clients
7775 by supporting features such as symbolic links, hard links, etc...
7776 These extensions require a similarly enabled client, and are of
7777 no current use to Windows clients.</para>
7779 <para>Default: <command>unix extensions = no</command></para>
7780 </listitem>
7781 </varlistentry>
7786 <varlistentry>
7787 <term><anchor id="UNIXPASSWORDSYNC">unix password sync (G)</term>
7788 <listitem><para>This boolean parameter controls whether Samba
7789 attempts to synchronize the UNIX password with the SMB password
7790 when the encrypted SMB password in the smbpasswd file is changed.
7791 If this is set to <constant>yes</constant> the program specified in the <parameter>passwd
7792 program</parameter>parameter is called <emphasis>AS ROOT</emphasis> -
7793 to allow the new UNIX password to be set without access to the
7794 old UNIX password (as the SMB password change code has no
7795 access to the old password cleartext, only the new).</para>
7797 <para>See also <link linkend="PASSWDPROGRAM"><parameter>passwd
7798 program</parameter></link>, <link linkend="PASSWDCHAT"><parameter>
7799 passwd chat</parameter></link>.</para>
7801 <para>Default: <command>unix password sync = no</command></para>
7802 </listitem>
7803 </varlistentry>
7807 <varlistentry>
7808 <term><anchor id="UPDATEENCRYPTED">update encrypted (G)</term>
7809 <listitem><para>This boolean parameter allows a user logging
7810 on with a plaintext password to have their encrypted (hashed)
7811 password in the smbpasswd file to be updated automatically as
7812 they log on. This option allows a site to migrate from plaintext
7813 password authentication (users authenticate with plaintext
7814 password over the wire, and are checked against a UNIX account
7815 database) to encrypted password authentication (the SMB
7816 challenge/response authentication mechanism) without forcing
7817 all users to re-enter their passwords via smbpasswd at the time the
7818 change is made. This is a convenience option to allow the change over
7819 to encrypted passwords to be made over a longer period. Once all users
7820 have encrypted representations of their passwords in the smbpasswd
7821 file this parameter should be set to <constant>no</constant>.</para>
7823 <para>In order for this parameter to work correctly the <link
7824 linkend="ENCRYPTPASSWORDS"><parameter>encrypt passwords</parameter>
7825 </link> parameter must be set to <constant>no</constant> when
7826 this parameter is set to <constant>yes</constant>.</para>
7828 <para>Note that even when this parameter is set a user
7829 authenticating to <command>smbd</command> must still enter a valid
7830 password in order to connect correctly, and to update their hashed
7831 (smbpasswd) passwords.</para>
7833 <para>Default: <command>update encrypted = no</command></para>
7834 </listitem>
7835 </varlistentry>
7838 <varlistentry>
7839 <term><anchor id="USECLIENTDRIVER">use client driver (S)</term>
7840 <listitem><para>This parameter applies only to Windows NT/2000
7841 clients. It has no affect on Windows 95/98/ME clients. When
7842 serving a printer to Windows NT/2000 clients without first installing
7843 a valid printer driver on the Samba host, the client will be required
7844 to install a local printer driver. From this point on, the client
7845 will treat the print as a local printer and not a network printer
7846 connection. This is much the same behavior that will occur
7847 when <command>disable spoolss = yes</command>. </para>
7849 <para>The differentiating
7850 factor is that under normal circumstances, the NT/2000 client will
7851 attempt to open the network printer using MS-RPC. The problem is that
7852 because the client considers the printer to be local, it will attempt
7853 to issue the OpenPrinterEx() call requesting access rights associated
7854 with the logged on user. If the user possesses local administator rights
7855 but not root privilegde on the Samba host (often the case), the OpenPrinterEx()
7856 call will fail. The result is that the client will now display an "Access
7857 Denied; Unable to connect" message in the printer queue window (even though
7858 jobs may successfully be printed). </para>
7860 <para>If this parameter is enabled for a printer, then any attempt
7861 to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped
7862 to PRINTER_ACCESS_USE instead. Thus allowing the OpenPrinterEx()
7863 call to succeed. <emphasis>This parameter MUST not be able enabled
7864 on a print share which has valid print driver installed on the Samba
7865 server.</emphasis></para>
7867 <para>See also <link linkend="DISABLESPOOLSS">disable spoolss</link>
7868 </para>
7870 <para>Default: <command>use client driver = no</command></para>
7871 </listitem>
7872 </varlistentry>
7876 <varlistentry>
7877 <term><anchor id="USEMMAP">use mmap (G)</term>
7878 <listitem><para>This global parameter determines if the tdb internals of Samba can
7879 depend on mmap working correctly on the running system. Samba requires a coherent
7880 mmap/read-write system memory cache. Currently only HPUX does not have such a
7881 coherent cache, and so this parameter is set to <constant>no</constant> by
7882 default on HPUX. On all other systems this parameter should be left alone. This
7883 parameter is provided to help the Samba developers track down problems with
7884 the tdb internal code.
7885 </para>
7887 <para>Default: <command>use mmap = yes</command></para>
7888 </listitem>
7889 </varlistentry>
7894 <varlistentry>
7895 <term><anchor id="USERHOSTS">use rhosts (G)</term>
7896 <listitem><para>If this global parameter is <constant>yes</constant>, it specifies
7897 that the UNIX user's <filename>.rhosts</filename> file in their home directory
7898 will be read to find the names of hosts and users who will be allowed
7899 access without specifying a password.</para>
7901 <para><emphasis>NOTE:</emphasis> The use of <parameter>use rhosts
7902 </parameter> can be a major security hole. This is because you are
7903 trusting the PC to supply the correct username. It is very easy to
7904 get a PC to supply a false username. I recommend that the <parameter>
7905 use rhosts</parameter> option be only used if you really know what
7906 you are doing.</para>
7908 <para>Default: <command>use rhosts = no</command></para>
7909 </listitem>
7910 </varlistentry>
7914 <varlistentry>
7915 <term><anchor id="USESENDFILE">use sendfile (S)</term>
7916 <listitem><para>If this parameter is <constant>yes</constant>, and Samba
7917 was built with the --with-sendfile-support option, and the underlying operating
7918 system supports sendfile system call, then some SMB read calls (mainly ReadAndX
7919 and ReadRaw) will use the more efficient sendfile system call for files that
7920 are exclusively oplocked. This may make more efficient use of the system CPU's
7921 and cause Samba to be faster. This is off by default as it's effects are unknown
7922 as yet.
7923 </para>
7925 <para>Default: <command>use sendfile = no</command></para>
7926 </listitem>
7927 </varlistentry>
7931 <varlistentry>
7932 <term><anchor id="USER">user (S)</term>
7933 <listitem><para>Synonym for <link linkend="USERNAME"><parameter>
7934 username</parameter></link>.</para>
7935 </listitem>
7936 </varlistentry>
7940 <varlistentry>
7941 <term><anchor id="USERS">users (S)</term>
7942 <listitem><para>Synonym for <link linkend="USERNAME"><parameter>
7943 username</parameter></link>.</para>
7944 </listitem>
7945 </varlistentry>
7948 <varlistentry>
7949 <term><anchor id="USERNAME">username (S)</term>
7950 <listitem><para>Multiple users may be specified in a comma-delimited
7951 list, in which case the supplied password will be tested against
7952 each username in turn (left to right).</para>
7954 <para>The <parameter>username</parameter> line is needed only when
7955 the PC is unable to supply its own username. This is the case
7956 for the COREPLUS protocol or where your users have different WfWg
7957 usernames to UNIX usernames. In both these cases you may also be
7958 better using the \\server\share%user syntax instead.</para>
7960 <para>The <parameter>username</parameter> line is not a great
7961 solution in many cases as it means Samba will try to validate
7962 the supplied password against each of the usernames in the
7963 <parameter>username</parameter> line in turn. This is slow and
7964 a bad idea for lots of users in case of duplicate passwords.
7965 You may get timeouts or security breaches using this parameter
7966 unwisely.</para>
7968 <para>Samba relies on the underlying UNIX security. This
7969 parameter does not restrict who can login, it just offers hints
7970 to the Samba server as to what usernames might correspond to the
7971 supplied password. Users can login as whoever they please and
7972 they will be able to do no more damage than if they started a
7973 telnet session. The daemon runs as the user that they log in as,
7974 so they cannot do anything that user cannot do.</para>
7976 <para>To restrict a service to a particular set of users you
7977 can use the <link linkend="VALIDUSERS"><parameter>valid users
7978 </parameter></link> parameter.</para>
7980 <para>If any of the usernames begin with a '@' then the name
7981 will be looked up first in the NIS netgroups list (if Samba
7982 is compiled with netgroup support), followed by a lookup in
7983 the UNIX groups database and will expand to a list of all users
7984 in the group of that name.</para>
7986 <para>If any of the usernames begin with a '+' then the name
7987 will be looked up only in the UNIX groups database and will
7988 expand to a list of all users in the group of that name.</para>
7990 <para>If any of the usernames begin with a '&'then the name
7991 will be looked up only in the NIS netgroups database (if Samba
7992 is compiled with netgroup support) and will expand to a list
7993 of all users in the netgroup group of that name.</para>
7995 <para>Note that searching though a groups database can take
7996 quite some time, and some clients may time out during the
7997 search.</para>
7999 <para>See the section <link linkend="VALIDATIONSECT">NOTE ABOUT
8000 USERNAME/PASSWORD VALIDATION</link> for more information on how
8001 this parameter determines access to the services.</para>
8003 <para>Default: <command>The guest account if a guest service,
8004 else &lt;empty string&gt;.</command></para>
8006 <para>Examples:<command>username = fred, mary, jack, jane,
8007 @users, @pcgroup</command></para>
8008 </listitem>
8009 </varlistentry>
8013 <varlistentry>
8014 <term><anchor id="USERNAMELEVEL">username level (G)</term>
8015 <listitem><para>This option helps Samba to try and 'guess' at
8016 the real UNIX username, as many DOS clients send an all-uppercase
8017 username. By default Samba tries all lowercase, followed by the
8018 username with the first letter capitalized, and fails if the
8019 username is not found on the UNIX machine.</para>
8021 <para>If this parameter is set to non-zero the behavior changes.
8022 This parameter is a number that specifies the number of uppercase
8023 combinations to try while trying to determine the UNIX user name. The
8024 higher the number the more combinations will be tried, but the slower
8025 the discovery of usernames will be. Use this parameter when you have
8026 strange usernames on your UNIX machine, such as <constant>AstrangeUser
8027 </constant>.</para>
8029 <para>Default: <command>username level = 0</command></para>
8030 <para>Example: <command>username level = 5</command></para>
8031 </listitem>
8032 </varlistentry>
8036 <varlistentry>
8037 <term><anchor id="USERNAMEMAP">username map (G)</term>
8038 <listitem><para>This option allows you to specify a file containing
8039 a mapping of usernames from the clients to the server. This can be
8040 used for several purposes. The most common is to map usernames
8041 that users use on DOS or Windows machines to those that the UNIX
8042 box uses. The other is to map multiple users to a single username
8043 so that they can more easily share files.</para>
8045 <para>The map file is parsed line by line. Each line should
8046 contain a single UNIX username on the left then a '=' followed
8047 by a list of usernames on the right. The list of usernames on the
8048 right may contain names of the form @group in which case they
8049 will match any UNIX username in that group. The special client
8050 name '*' is a wildcard and matches any name. Each line of the
8051 map file may be up to 1023 characters long.</para>
8053 <para>The file is processed on each line by taking the
8054 supplied username and comparing it with each username on the right
8055 hand side of the '=' signs. If the supplied name matches any of
8056 the names on the right hand side then it is replaced with the name
8057 on the left. Processing then continues with the next line.</para>
8059 <para>If any line begins with a '#' or a ';' then it is
8060 ignored</para>
8062 <para>If any line begins with an '!' then the processing
8063 will stop after that line if a mapping was done by the line.
8064 Otherwise mapping continues with every line being processed.
8065 Using '!' is most useful when you have a wildcard mapping line
8066 later in the file.</para>
8068 <para>For example to map from the name <constant>admin</constant>
8069 or <constant>administrator</constant> to the UNIX name <constant>
8070 root</constant> you would use:</para>
8072 <para><command>root = admin administrator</command></para>
8074 <para>Or to map anyone in the UNIX group <constant>system</constant>
8075 to the UNIX name <constant>sys</constant> you would use:</para>
8077 <para><command>sys = @system</command></para>
8079 <para>You can have as many mappings as you like in a username
8080 map file.</para>
8083 <para>If your system supports the NIS NETGROUP option then
8084 the netgroup database is checked before the <filename>/etc/group
8085 </filename> database for matching groups.</para>
8087 <para>You can map Windows usernames that have spaces in them
8088 by using double quotes around the name. For example:</para>
8090 <para><command>tridge = "Andrew Tridgell"</command></para>
8092 <para>would map the windows username "Andrew Tridgell" to the
8093 unix username "tridge".</para>
8095 <para>The following example would map mary and fred to the
8096 unix user sys, and map the rest to guest. Note the use of the
8097 '!' to tell Samba to stop processing if it gets a match on
8098 that line.</para>
8100 <para><programlisting>
8101 !sys = mary fred
8102 guest = *
8103 </programlisting></para>
8105 <para>Note that the remapping is applied to all occurrences
8106 of usernames. Thus if you connect to \\server\fred and <constant>
8107 fred</constant> is remapped to <constant>mary</constant> then you
8108 will actually be connecting to \\server\mary and will need to
8109 supply a password suitable for <constant>mary</constant> not
8110 <constant>fred</constant>. The only exception to this is the
8111 username passed to the <link linkend="PASSWORDSERVER"><parameter>
8112 password server</parameter></link> (if you have one). The password
8113 server will receive whatever username the client supplies without
8114 modification.</para>
8116 <para>Also note that no reverse mapping is done. The main effect
8117 this has is with printing. Users who have been mapped may have
8118 trouble deleting print jobs as PrintManager under WfWg will think
8119 they don't own the print job.</para>
8121 <para>Default: <emphasis>no username map</emphasis></para>
8122 <para>Example: <command>username map = /usr/local/samba/lib/users.map
8123 </command></para>
8124 </listitem>
8125 </varlistentry>
8129 <varlistentry>
8130 <term><anchor id="UTMP">utmp (G)</term>
8131 <listitem><para>This boolean parameter is only available if
8132 Samba has been configured and compiled with the option <command>
8133 --with-utmp</command>. If set to <constant>yes</constant> then Samba will attempt
8134 to add utmp or utmpx records (depending on the UNIX system) whenever a
8135 connection is made to a Samba server. Sites may use this to record the
8136 user connecting to a Samba share.</para>
8138 <para>See also the <link linkend="UTMPDIRECTORY"><parameter>
8139 utmp directory</parameter></link> parameter.</para>
8141 <para>Default: <command>utmp = no</command></para>
8142 </listitem>
8143 </varlistentry>
8147 <varlistentry>
8148 <term><anchor id="UTMPDIRECTORY">utmp directory(G)</term>
8149 <listitem><para>This parameter is only available if Samba has
8150 been configured and compiled with the option <command>
8151 --with-utmp</command>. It specifies a directory pathname that is
8152 used to store the utmp or utmpx files (depending on the UNIX system) that
8153 record user connections to a Samba server. See also the <link linkend="UTMP">
8154 <parameter>utmp</parameter></link> parameter. By default this is
8155 not set, meaning the system will use whatever utmp file the
8156 native system is set to use (usually
8157 <filename>/var/run/utmp</filename> on Linux).</para>
8159 <para>Default: <emphasis>no utmp directory</emphasis></para>
8160 </listitem>
8161 </varlistentry>
8165 <varlistentry>
8166 <term><anchor id="VALIDCHARS">valid chars (G)</term>
8167 <listitem><para>The option allows you to specify additional
8168 characters that should be considered valid by the server in
8169 filenames. This is particularly useful for national character
8170 sets, such as adding u-umlaut or a-ring.</para>
8172 <para>The option takes a list of characters in either integer
8173 or character form with spaces between them. If you give two
8174 characters with a colon between them then it will be taken as
8175 an lowercase:uppercase pair.</para>
8177 <para>If you have an editor capable of entering the characters
8178 into the config file then it is probably easiest to use this
8179 method. Otherwise you can specify the characters in octal,
8180 decimal or hexadecimal form using the usual C notation.</para>
8182 <para>For example to add the single character 'Z' to the charset
8183 (which is a pointless thing to do as it's already there) you could
8184 do one of the following</para>
8186 <para><programlisting>
8187 valid chars = Z
8188 valid chars = z:Z
8189 valid chars = 0132:0172
8190 </programlisting></para>
8192 <para>The last two examples above actually add two characters,
8193 and alter the uppercase and lowercase mappings appropriately.</para>
8195 <para>Note that you <emphasis>MUST</emphasis> specify this parameter
8196 after the <parameter>client code page</parameter> parameter if you
8197 have both set. If <parameter>client code page</parameter> is set after
8198 the <parameter>valid chars</parameter> parameter the <parameter>valid
8199 chars</parameter> settings will be overwritten.</para>
8201 <para>See also the <link linkend="CLIENTCODEPAGE"><parameter>client
8202 code page</parameter></link> parameter.</para>
8204 <para>Default: <emphasis>Samba defaults to using a reasonable set
8205 of valid characters for English systems</emphasis></para>
8207 <para>Example: <command>valid chars = 0345:0305 0366:0326 0344:0304
8208 </command></para>
8210 <para>The above example allows filenames to have the Swedish
8211 characters in them.</para>
8213 <para><emphasis>NOTE:</emphasis> It is actually quite difficult to
8214 correctly produce a <parameter>valid chars</parameter> line for
8215 a particular system. To automate the process <ulink
8216 url="mailto:tino@augsburg.net">tino@augsburg.net</ulink> has written
8217 a package called <command>validchars</command> which will automatically
8218 produce a complete <parameter>valid chars</parameter> line for
8219 a given client system. Look in the <filename>examples/validchars/
8220 </filename> subdirectory of your Samba source code distribution
8221 for this package.</para>
8222 </listitem>
8223 </varlistentry>
8227 <varlistentry>
8228 <term><anchor id="VALIDUSERS">valid users (S)</term>
8229 <listitem><para>This is a list of users that should be allowed
8230 to login to this service. Names starting with '@', '+' and '&'
8231 are interpreted using the same rules as described in the
8232 <parameter>invalid users</parameter> parameter.</para>
8234 <para>If this is empty (the default) then any user can login.
8235 If a username is in both this list and the <parameter>invalid
8236 users</parameter> list then access is denied for that user.</para>
8238 <para>The current servicename is substituted for <parameter>%S
8239 </parameter>. This is useful in the [homes] section.</para>
8241 <para>See also <link linkend="INVALIDUSERS"><parameter>invalid users
8242 </parameter></link></para>
8244 <para>Default: <emphasis>No valid users list (anyone can login)
8245 </emphasis></para>
8247 <para>Example: <command>valid users = greg, @pcusers</command></para>
8248 </listitem>
8249 </varlistentry>
8254 <varlistentry>
8255 <term><anchor id="VETOFILES">veto files(S)</term>
8256 <listitem><para>This is a list of files and directories that
8257 are neither visible nor accessible. Each entry in the list must
8258 be separated by a '/', which allows spaces to be included
8259 in the entry. '*' and '?' can be used to specify multiple files
8260 or directories as in DOS wildcards.</para>
8262 <para>Each entry must be a unix path, not a DOS path and
8263 must <emphasis>not</emphasis> include the unix directory
8264 separator '/'.</para>
8266 <para>Note that the <parameter>case sensitive</parameter> option
8267 is applicable in vetoing files.</para>
8269 <para>One feature of the veto files parameter that it
8270 is important to be aware of is Samba's behaviour when
8271 trying to delete a directory. If a directory that is
8272 to be deleted contains nothing but veto files this
8273 deletion will <emphasis>fail</emphasis> unless you also set
8274 the <parameter>delete veto files</parameter> parameter to
8275 <parameter>yes</parameter>.</para>
8277 <para>Setting this parameter will affect the performance
8278 of Samba, as it will be forced to check all files and directories
8279 for a match as they are scanned.</para>
8281 <para>See also <link linkend="HIDEFILES"><parameter>hide files
8282 </parameter></link> and <link linkend="CASESENSITIVE"><parameter>
8283 case sensitive</parameter></link>.</para>
8285 <para>Default: <emphasis>No files or directories are vetoed.
8286 </emphasis></para>
8288 <para>Examples:<programlisting>
8289 ; Veto any files containing the word Security,
8290 ; any ending in .tmp, and any directory containing the
8291 ; word root.
8292 veto files = /*Security*/*.tmp/*root*/
8294 ; Veto the Apple specific files that a NetAtalk server
8295 ; creates.
8296 veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
8297 </programlisting></para>
8298 </listitem>
8299 </varlistentry>
8302 <varlistentry>
8303 <term><anchor id="VETOOPLOCKFILES">veto oplock files (S)</term>
8304 <listitem><para>This parameter is only valid when the <link
8305 linkend="OPLOCKS"><parameter>oplocks</parameter></link>
8306 parameter is turned on for a share. It allows the Samba administrator
8307 to selectively turn off the granting of oplocks on selected files that
8308 match a wildcarded list, similar to the wildcarded list used in the
8309 <link linkend="VETOFILES"><parameter>veto files</parameter></link>
8310 parameter.</para>
8312 <para>Default: <emphasis>No files are vetoed for oplock
8313 grants</emphasis></para>
8315 <para>You might want to do this on files that you know will
8316 be heavily contended for by clients. A good example of this
8317 is in the NetBench SMB benchmark program, which causes heavy
8318 client contention for files ending in <filename>.SEM</filename>.
8319 To cause Samba not to grant oplocks on these files you would use
8320 the line (either in the [global] section or in the section for
8321 the particular NetBench share :</para>
8323 <para>Example: <command>veto oplock files = /*.SEM/
8324 </command></para>
8325 </listitem>
8326 </varlistentry>
8330 <varlistentry>
8331 <term><anchor id="VFSOBJECT">vfs object (S)</term>
8332 <listitem><para>This parameter specifies a shared object file that
8333 is used for Samba VFS I/O operations. By default, normal
8334 disk I/O operations are used but these can be overloaded
8335 with a VFS object. The Samba VFS layer is new to Samba 2.2 and
8336 must be enabled at compile time with --with-vfs.</para>
8338 <para>Default : <emphasis>no value</emphasis></para>
8339 </listitem>
8340 </varlistentry>
8345 <varlistentry>
8346 <term><anchor id="VFSOPTIONS">vfs options (S)</term>
8347 <listitem><para>This parameter allows parameters to be passed
8348 to the vfs layer at initialization time. The Samba VFS layer
8349 is new to Samba 2.2 and must be enabled at compile time
8350 with --with-vfs. See also <link linkend="VFSOBJECT"><parameter>
8351 vfs object</parameter></link>.</para>
8353 <para>Default : <emphasis>no value</emphasis></para>
8354 </listitem>
8355 </varlistentry>
8359 <varlistentry>
8360 <term><anchor id="VOLUME">volume (S)</term>
8361 <listitem><para> This allows you to override the volume label
8362 returned for a share. Useful for CDROMs with installation programs
8363 that insist on a particular volume label.</para>
8365 <para>Default: <emphasis>the name of the share</emphasis></para>
8366 </listitem>
8367 </varlistentry>
8371 <varlistentry>
8372 <term><anchor id="WIDELINKS">wide links (S)</term>
8373 <listitem><para>This parameter controls whether or not links
8374 in the UNIX file system may be followed by the server. Links
8375 that point to areas within the directory tree exported by the
8376 server are always allowed; this parameter controls access only
8377 to areas that are outside the directory tree being exported.</para>
8379 <para>Note that setting this parameter can have a negative
8380 effect on your server performance due to the extra system calls
8381 that Samba has to do in order to perform the link checks.</para>
8383 <para>Default: <command>wide links = yes</command></para>
8384 </listitem>
8385 </varlistentry>
8390 <varlistentry>
8391 <term><anchor id="WINBINDCACHETIME">winbind cache time (G)</term>
8392 <listitem><para>This parameter specifies the number of seconds the
8393 <ulink url="winbindd.8.html">winbindd(8)</ulink> daemon will cache
8394 user and group information before querying a Windows NT server
8395 again.</para>
8397 <para>Default: <command>winbind cache type = 15</command></para>
8398 </listitem>
8399 </varlistentry>
8402 <varlistentry>
8403 <term><anchor id="WINBINDENUMUSERS">winbind enum users (G)</term>
8404 <listitem><para>On large installations using
8405 <ulink url="winbindd.8.html">winbindd(8)</ulink> it may be
8406 necessary to suppress the enumeration of users through the
8407 <command> setpwent()</command>,
8408 <command>getpwent()</command> and
8409 <command>endpwent()</command> group of system calls. If
8410 the <parameter>winbind enum users</parameter> parameter is
8411 <constant>no</constant>, calls to the <command>getpwent</command> system call
8412 will not return any data. </para>
8414 <para><emphasis>Warning:</emphasis> Turning off user
8415 enumeration may cause some programs to behave oddly. For
8416 example, the finger program relies on having access to the
8417 full user list when searching for matching
8418 usernames. </para>
8420 <para>Default: <command>winbind enum users = yes </command></para>
8421 </listitem>
8422 </varlistentry>
8424 <varlistentry>
8425 <term><anchor id="WINBINDENUMGROUPS">winbind enum groups (G)</term>
8426 <listitem><para>On large installations using
8427 <ulink url="winbindd.8.html">winbindd(8)</ulink> it may be
8428 necessary to suppress the enumeration of groups through the
8429 <command> setgrent()</command>,
8430 <command>getgrent()</command> and
8431 <command>endgrent()</command> group of system calls. If
8432 the <parameter>winbind enum groups</parameter> parameter is
8433 <constant>no</constant>, calls to the <command>getgrent()</command> system
8434 call will not return any data. </para>
8436 <para><emphasis>Warning:</emphasis> Turning off group
8437 enumeration may cause some programs to behave oddly.
8438 </para>
8440 <para>Default: <command>winbind enum groups = yes </command>
8441 </para></listitem>
8442 </varlistentry>
8445 <varlistentry>
8446 <term><anchor id="WINBINDGID">winbind gid (G)</term>
8447 <listitem><para>The winbind gid parameter specifies the range of group
8448 ids that are allocated by the <ulink url="winbindd.8.html">
8449 winbindd(8)</ulink> daemon. This range of group ids should have no
8450 existing local or NIS groups within it as strange conflicts can
8451 occur otherwise.</para>
8453 <para>Default: <command>winbind gid = &lt;empty string&gt;
8454 </command></para>
8456 <para>Example: <command>winbind gid = 10000-20000</command></para>
8457 </listitem>
8458 </varlistentry>
8461 <varlistentry>
8462 <term><anchor id="WINBINDSEPARATOR">winbind separator (G)</term>
8463 <listitem><para>This parameter allows an admin to define the character
8464 used when listing a username of the form of <replaceable>DOMAIN
8465 </replaceable>\<replaceable>user</replaceable>. This parameter
8466 is only applicable when using the <filename>pam_winbind.so</filename>
8467 and <filename>nss_winbind.so</filename> modules for UNIX services.
8468 </para>
8470 <para>Please note that setting this parameter to + causes problems
8471 with group membership at least on glibc systems, as the character +
8472 is used as a special character for NIS in /etc/group.</para>
8474 <para>Default: <command>winbind separator = '\'</command></para>
8475 <para>Example: <command>winbind separator = +</command></para>
8476 </listitem>
8477 </varlistentry>
8482 <varlistentry>
8483 <term><anchor id="WINBINDUID">winbind uid (G)</term>
8484 <listitem><para>The winbind gid parameter specifies the range of group
8485 ids that are allocated by the <ulink url="winbindd.8.html">
8486 winbindd(8)</ulink> daemon. This range of ids should have no
8487 existing local or NIS users within it as strange conflicts can
8488 occur otherwise.</para>
8490 <para>Default: <command>winbind uid = &lt;empty string&gt;
8491 </command></para>
8493 <para>Example: <command>winbind uid = 10000-20000</command></para>
8494 </listitem>
8495 </varlistentry>
8498 <varlistentry>
8499 <term>winbind use default domain</term>
8501 <term><anchor id="WINBINDUSEDEFAULTDOMAIN">winbind use default domain</term>
8502 <listitem><para>This parameter specifies whether the <ulink url="winbindd.8.html">
8503 winbindd(8)</ulink>
8504 daemon should operate on users without domain component in their username.
8505 Users without a domain component are treated as is part of the winbindd server's
8506 own domain. While this does not benifit Windows users, it makes SSH, FTP and e-mail
8507 function in a way much closer to the way they would in a native unix system.</para>
8509 <para>Default: <command>winbind use default domain = &lt;no&gt;
8510 </command></para>
8511 <para>Example: <command>winbind use default domain = yes</command></para>
8512 </listitem>
8513 </varlistentry>
8516 <varlistentry>
8517 <term><anchor id="WINSHOOK">wins hook (G)</term>
8518 <listitem><para>When Samba is running as a WINS server this
8519 allows you to call an external program for all changes to the
8520 WINS database. The primary use for this option is to allow the
8521 dynamic update of external name resolution databases such as
8522 dynamic DNS.</para>
8524 <para>The wins hook parameter specifies the name of a script
8525 or executable that will be called as follows:</para>
8527 <para><command>wins_hook operation name nametype ttl IP_list
8528 </command></para>
8530 <itemizedlist>
8531 <listitem><para>The first argument is the operation and is one
8532 of "add", "delete", or "refresh". In most cases the operation can
8533 be ignored as the rest of the parameters provide sufficient
8534 information. Note that "refresh" may sometimes be called when the
8535 name has not previously been added, in that case it should be treated
8536 as an add.</para></listitem>
8538 <listitem><para>The second argument is the NetBIOS name. If the
8539 name is not a legal name then the wins hook is not called.
8540 Legal names contain only letters, digits, hyphens, underscores
8541 and periods.</para></listitem>
8543 <listitem><para>The third argument is the NetBIOS name
8544 type as a 2 digit hexadecimal number. </para></listitem>
8546 <listitem><para>The fourth argument is the TTL (time to live)
8547 for the name in seconds.</para></listitem>
8549 <listitem><para>The fifth and subsequent arguments are the IP
8550 addresses currently registered for that name. If this list is
8551 empty then the name should be deleted.</para></listitem>
8552 </itemizedlist>
8554 <para>An example script that calls the BIND dynamic DNS update
8555 program <command>nsupdate</command> is provided in the examples
8556 directory of the Samba source code. </para>
8557 </listitem>
8558 </varlistentry>
8564 <varlistentry>
8565 <term><anchor id="WINSPROXY">wins proxy (G)</term>
8566 <listitem><para>This is a boolean that controls if <ulink
8567 url="nmbd.8.html">nmbd(8)</ulink> will respond to broadcast name
8568 queries on behalf of other hosts. You may need to set this
8569 to <constant>yes</constant> for some older clients.</para>
8571 <para>Default: <command>wins proxy = no</command></para>
8572 </listitem>
8573 </varlistentry>
8578 <varlistentry>
8579 <term><anchor id="WINSSERVER">wins server (G)</term>
8580 <listitem><para>This specifies the IP address (or DNS name: IP
8581 address for preference) of the WINS server that <ulink url="nmbd.8.html">
8582 nmbd(8)</ulink> should register with. If you have a WINS server on
8583 your network then you should set this to the WINS server's IP.</para>
8585 <para>You should point this at your WINS server if you have a
8586 multi-subnetted network.</para>
8588 <para><emphasis>NOTE</emphasis>. You need to set up Samba to point
8589 to a WINS server if you have multiple subnets and wish cross-subnet
8590 browsing to work correctly.</para>
8592 <para>See the documentation file <filename>BROWSING.txt</filename>
8593 in the docs/ directory of your Samba source distribution.</para>
8595 <para>Default: <emphasis>not enabled</emphasis></para>
8596 <para>Example: <command>wins server = 192.9.200.1</command></para>
8597 </listitem>
8598 </varlistentry>
8602 <varlistentry>
8603 <term><anchor id="WINSSUPPORT">wins support (G)</term>
8604 <listitem><para>This boolean controls if the <ulink url="nmbd.8.html">
8605 nmbd(8)</ulink> process in Samba will act as a WINS server. You should
8606 not set this to <constant>yes</constant> unless you have a multi-subnetted network and
8607 you wish a particular <command>nmbd</command> to be your WINS server.
8608 Note that you should <emphasis>NEVER</emphasis> set this to <constant>yes</constant>
8609 on more than one machine in your network.</para>
8611 <para>Default: <command>wins support = no</command></para>
8612 </listitem>
8613 </varlistentry>
8617 <varlistentry>
8618 <term><anchor id="WORKGROUP">workgroup (G)</term>
8619 <listitem><para>This controls what workgroup your server will
8620 appear to be in when queried by clients. Note that this parameter
8621 also controls the Domain name used with the <link
8622 linkend="SECURITYEQUALSDOMAIN"><command>security = domain</command></link>
8623 setting.</para>
8625 <para>Default: <emphasis>set at compile time to WORKGROUP</emphasis></para>
8626 <para>Example: <command>workgroup = MYGROUP</command></para>
8627 </listitem>
8628 </varlistentry>
8633 <varlistentry>
8634 <term><anchor id="WRITABLE">writable (S)</term>
8635 <listitem><para>Synonym for <link linkend="WRITEABLE"><parameter>
8636 writeable</parameter></link> for people who can't spell :-).</para>
8637 </listitem>
8638 </varlistentry>
8642 <varlistentry>
8643 <term><anchor id="WRITECACHESIZE">write cache size (S)</term>
8644 <listitem><para>If this integer parameter is set to non-zero value,
8645 Samba will create an in-memory cache for each oplocked file
8646 (it does <emphasis>not</emphasis> do this for
8647 non-oplocked files). All writes that the client does not request
8648 to be flushed directly to disk will be stored in this cache if possible.
8649 The cache is flushed onto disk when a write comes in whose offset
8650 would not fit into the cache or when the file is closed by the client.
8651 Reads for the file are also served from this cache if the data is stored
8652 within it.</para>
8654 <para>This cache allows Samba to batch client writes into a more
8655 efficient write size for RAID disks (i.e. writes may be tuned to
8656 be the RAID stripe size) and can improve performance on systems
8657 where the disk subsystem is a bottleneck but there is free
8658 memory for userspace programs.</para>
8660 <para>The integer parameter specifies the size of this cache
8661 (per oplocked file) in bytes.</para>
8663 <para>Default: <command>write cache size = 0</command></para>
8664 <para>Example: <command>write cache size = 262144</command></para>
8666 <para>for a 256k cache size per file.</para>
8667 </listitem>
8668 </varlistentry>
8674 <varlistentry>
8675 <term><anchor id="WRITELIST">write list (S)</term>
8676 <listitem><para>This is a list of users that are given read-write
8677 access to a service. If the connecting user is in this list then
8678 they will be given write access, no matter what the <link
8679 linkend="READONLY"><parameter>read only</parameter></link>
8680 option is set to. The list can include group names using the
8681 @group syntax.</para>
8683 <para>Note that if a user is in both the read list and the
8684 write list then they will be given write access.</para>
8686 <para>See also the <link linkend="READLIST"><parameter>read list
8687 </parameter></link> option.</para>
8689 <para>Default: <command>write list = &lt;empty string&gt;
8690 </command></para>
8692 <para>Example: <command>write list = admin, root, @staff
8693 </command></para>
8694 </listitem>
8695 </varlistentry>
8701 <varlistentry>
8702 <term><anchor id="WRITEOK">write ok (S)</term>
8703 <listitem><para>Inverted synonym for <link linkend="READONLY"><parameter>
8704 read only</parameter></link>.</para>
8705 </listitem>
8706 </varlistentry>
8710 <varlistentry>
8711 <term><anchor id="WRITERAW">write raw (G)</term>
8712 <listitem><para>This parameter controls whether or not the server
8713 will support raw write SMB's when transferring data from clients.
8714 You should never need to change this parameter.</para>
8716 <para>Default: <command>write raw = yes</command></para>
8717 </listitem>
8718 </varlistentry>
8722 <varlistentry>
8723 <term><anchor id="WRITEABLE">writeable (S)</term>
8724 <listitem><para>Inverted synonym for <link linkend="READONLY"><parameter>
8725 read only</parameter></link>.</para>
8726 </listitem>
8727 </varlistentry>
8730 </variablelist>
8732 </refsect1>
8734 <refsect1>
8735 <title>WARNINGS</title>
8737 <para>Although the configuration file permits service names
8738 to contain spaces, your client software may not. Spaces will
8739 be ignored in comparisons anyway, so it shouldn't be a
8740 problem - but be aware of the possibility.</para>
8742 <para>On a similar note, many clients - especially DOS clients -
8743 limit service names to eight characters. <ulink url="smbd.8.html">smbd(8)
8744 </ulink> has no such limitation, but attempts to connect from such
8745 clients will fail if they truncate the service names. For this reason
8746 you should probably keep your service names down to eight characters
8747 in length.</para>
8749 <para>Use of the [homes] and [printers] special sections make life
8750 for an administrator easy, but the various combinations of default
8751 attributes can be tricky. Take extreme care when designing these
8752 sections. In particular, ensure that the permissions on spool
8753 directories are correct.</para>
8754 </refsect1>
8756 <refsect1>
8757 <title>VERSION</title>
8759 <para>This man page is correct for version 2.2 of
8760 the Samba suite.</para>
8761 </refsect1>
8763 <refsect1>
8764 <title>SEE ALSO</title>
8765 <para><ulink url="samba.7.html">samba(7)</ulink>,
8766 <ulink url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink>,
8767 <ulink url="swat.8.html"><command>swat(8)</command></ulink>,
8768 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>,
8769 <ulink url="nmbd.8.html"><command>nmbd(8)</command></ulink>,
8770 <ulink url="smbclient.1.html"><command>smbclient(1)</command></ulink>,
8771 <ulink url="nmblookup.1.html"><command>nmblookup(1)</command></ulink>,
8772 <ulink url="testparm.1.html"><command>testparm(1)</command></ulink>,
8773 <ulink url="testprns.1.html"><command>testprns(1)</command></ulink>
8774 </para>
8775 </refsect1>
8777 <refsect1>
8778 <title>AUTHOR</title>
8780 <para>The original Samba software and related utilities
8781 were created by Andrew Tridgell. Samba is now developed
8782 by the Samba Team as an Open Source project similar
8783 to the way the Linux kernel is developed.</para>
8785 <para>The original Samba man pages were written by Karl Auer.
8786 The man page sources were converted to YODL format (another
8787 excellent piece of Open Source software, available at
8788 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
8789 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
8790 release by Jeremy Allison. The conversion to DocBook for
8791 Samba 2.2 was done by Gerald Carter</para>
8792 </refsect1>
8794 </refentry>