3cea2d51bc19970d6b0aee312b96049f699de9c8
[samba.git] / docs / docbook / manpages / smb.conf.5.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="smb.conf">
3
4 <refmeta>
5         <refentrytitle>smb.conf</refentrytitle>
6         <manvolnum>5</manvolnum>
7 </refmeta>
8
9
10 <refnamediv>
11         <refname>smb.conf</refname>
12         <refpurpose>The configuration file for the Samba suite</refpurpose>
13 </refnamediv>
14
15 <refsect1>
16         <title>SYNOPSIS</title>
17
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>
26
27 <refsect1>
28         <title id="FILEFORMATSECT">FILE FORMAT</title>
29
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>
34
35         <para><replaceable>name</replaceable> = <replaceable>value
36         </replaceable></para>
37
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>
40
41         <para>Section and parameter names are not case sensitive.</para>
42
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>
49
50         <para>Any line beginning with a semicolon (';') or a hash ('#') 
51         character is ignored, as are lines containing only whitespace.</para>
52
53         <para>Any line ending in a '\' is continued
54         on the next line in the customary UNIX fashion.</para>
55
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>
62
63 <refsect1>
64         <title>SECTION DESCRIPTIONS</title>
65
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>
71
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>
76
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>
81         
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>
86         
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>
91
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>
98
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>
103         
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>
107
108         <screen>
109         <computeroutput>
110         [foo]
111                 path = /home/bar
112                 writeable = true
113         </computeroutput>
114         </screen>
115
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>
122
123         <screen>
124         <computeroutput>
125         [aprinter]
126                 path = /usr/spool/public
127                 writeable = false
128                 printable = true
129                 guest ok = true
130         </computeroutput>
131         </screen>
132 </refsect1>
133
134 <refsect1>
135         <title>SPECIAL SECTIONS</title>
136         
137         <refsect2>
138                 <title>The [global] section</title>
139                 
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>
145         
146         <refsect2>
147                 <title id="HOMESECT">The [homes] section</title>
148                 
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>
152
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>
159                 
160                 <para>Some modifications are then made to the newly 
161                 created share:</para>
162                 
163                 <itemizedlist>
164                 <listitem><para>The share name is changed from homes to 
165                 the located username.</para></listitem>
166
167                 <listitem><para>If no path was given, the path is set to
168                 the user's home directory.</para></listitem>
169                 </itemizedlist>
170
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>
174
175                 <para><userinput>path = /data/pchome/%S</userinput></para>
176
177                 <para>would be useful if you have different home directories 
178                 for your PCs than for UNIX access.</para>
179
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>
183
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>
189                 
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>
194
195                 <screen>
196                 <computeroutput>
197                 [homes]
198                         writeable = yes
199                 </computeroutput>
200                 </screen>
201         
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>
208
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>
216         
217         <refsect2>
218                 <title id="PRINTERSSECT">The [printers] section</title>
219                 
220                 <para>This section works like [homes], 
221                 but for printers.</para>
222
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>
226
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>
235
236                 <para>A few modifications are then made to the newly created 
237                 share:</para>
238
239                 <itemizedlist>
240                 <listitem><para>The share name is set to the located printer 
241                 name</para></listitem>
242
243                 <listitem><para>If no printer name was given, the printer name 
244                 is set to the located printer name</para></listitem>
245
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>
250
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>
254                 
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>
259
260                 <screen><computeroutput>
261                 [printers]
262                         path = /usr/spool/public
263                         guest ok = yes
264                         printable = yes 
265                 </computeroutput></screen>
266
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>
272
273                 <screen>
274                 <computeroutput>
275                 alias|alias|alias|alias...    
276                 </computeroutput>
277                 </screen>
278
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>
285
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>
290                 
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>
298
299 <refsect1>
300         <title>PARAMETERS</title>
301
302         <para>parameters define the specific attributes of sections.</para>
303
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>
316
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>
322
323 <refsect1>
324         <title>VARIABLE SUBSTITUTIONS</title>
325
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>
330
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>
334
335         <variablelist>
336                 <varlistentry>
337                 <term>%S</term>
338                 <listitem><para>the name of the current service, if any.</para>
339                 </listitem>
340                 </varlistentry>
341                 
342                 <varlistentry>
343                 <term>%P</term>
344                 <listitem><para>the root directory of the current service, 
345                 if any.</para></listitem>
346                 </varlistentry>
347                 
348                 <varlistentry>
349                 <term>%u</term>
350                 <listitem><para>user name of the current service, if any.</para>
351                 </listitem>
352                 </varlistentry>
353                 
354                 <varlistentry>
355                 <term>%g</term>
356                 <listitem><para>primary group name of %u.</para></listitem>
357                 </varlistentry>
358                 
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>
364                 
365                 <varlistentry>
366                 <term>%G</term>
367                 <listitem><para>primary group name of %U.</para></listitem>
368                 </varlistentry>
369
370                 <varlistentry>
371                 <term>%H</term>
372                 <listitem><para>the home directory of the user given 
373                 by %u.</para></listitem>
374                 </varlistentry>
375                 
376                 <varlistentry>
377                 <term>%v</term>
378                 <listitem><para>the Samba version.</para></listitem>
379                 </varlistentry>
380                 
381                 <varlistentry>
382                 <term>%h</term>
383                 <listitem><para>the Internet hostname that Samba is running 
384                 on.</para></listitem>
385                 </varlistentry>
386
387                 <varlistentry>
388                 <term>%m</term>
389                 <listitem><para>the NetBIOS name of the client machine 
390                 (very useful).</para></listitem>
391                 </varlistentry>
392                 
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>
398
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>
402
403                 </varlistentry>
404                 
405                 <varlistentry>
406                 <term>%M</term>
407                 <listitem><para>the Internet name of the client machine.
408                 </para></listitem>
409                 </varlistentry>
410                 
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>
419                 
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>
426                 
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>
433
434                 <varlistentry>
435                 <term>%d</term>
436                 <listitem><para>The process id of the current server 
437                 process.</para></listitem>
438                 </varlistentry>
439                 
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>
450                 
451                 <varlistentry>
452                 <term>%I</term>
453                 <listitem><para>The IP address of the client machine.</para>
454                 </listitem>
455                 </varlistentry>
456
457                 <varlistentry>
458                 <term>%T</term>
459                 <listitem><para>the current date and time.</para></listitem>
460                 </varlistentry>
461                 
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>
468
469         <para>There are some quite creative things that can be done 
470         with these substitutions and other smb.conf options.</para
471 </refsect1>
472
473 <refsect1>
474         <title id="NAMEMANGLINGSECT">NAME MANGLING</title>
475         
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>
479
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>
483
484         <para>All of these options can be set separately for each service 
485         (or globally, of course). </para>
486
487         <para>The options are: </para>
488         
489         <variablelist>
490         
491         <varlistentry>
492                 <term>mangle case = yes/no</term>
493                 <listitem><para> controls if names that have characters that 
494                 aren't of the "default" case are mangled. For example, 
495                 if this is yes then a name like "Mail" would be mangled. 
496                 Default <emphasis>no</emphasis>.</para></listitem>
497                 </varlistentry> 
498         
499                 <varlistentry>
500                 <term>case sensitive = yes/no</term>
501                 <listitem><para>controls whether filenames are case sensitive. If 
502                 they aren't then Samba must do a filename search and match on passed 
503                 names. Default <emphasis>no</emphasis>.</para></listitem>
504                 </varlistentry> 
505
506                 <varlistentry>
507                 <term>default case = upper/lower</term>
508                 <listitem><para>controls what the default case is for new 
509                 filenames. Default <emphasis>lower</emphasis>.</para></listitem>
510                 </varlistentry> 
511         
512                 <varlistentry>
513                 <term>preserve case = yes/no</term>
514                 <listitem><para>controls if new files are created with the 
515                 case that the client passes, or if they are forced to be the 
516                 "default" case. Default <emphasis>yes</emphasis>.
517                 </para></listitem>
518                 </varlistentry> 
519
520                 <varlistentry>
521                 <term>short preserve case = yes/no</term>
522                 <listitem><para>controls if new files which conform to 8.3 syntax, 
523                 that is all in upper case and of suitable length, are created 
524                 upper case, or if they are forced to be the "default" 
525                 case. This option can be use with "preserve case = yes" 
526                 to permit long filenames to retain their case, while short names 
527                 are lowercased. Default <emphasis>yes</emphasis>.</para></listitem>
528                 </varlistentry> 
529         </variablelist>
530         
531         <para>By default, Samba 2.2 has the same semantics as a Windows 
532         NT server, in that it is case insensitive but case preserving.</para>
533         
534 </refsect1>
535
536 <refsect1>
537         <title id="VALIDATIONSECT">NOTE ABOUT USERNAME/PASSWORD VALIDATION</title>
538
539         <para>There are a number of ways in which a user can connect 
540         to a service. The server uses the following steps in determining 
541         if it will allow a connection to a specified service. If all the 
542         steps fail, then the connection request is rejected.  However, if one of the 
543         steps succeeds, then the following steps are not checked.</para>
544
545         <para>If the service is marked "guest only = yes" then
546         steps 1 to 5 are skipped.</para>
547
548         <orderedlist numeration="Arabic">
549                 <listitem><para>If the client has passed a username/password 
550                 pair and that username/password pair is validated by the UNIX 
551                 system's password programs then the connection is made as that 
552                 username. Note that this includes the 
553                 \\server\service%<replaceable>username</replaceable> method of passing 
554                 a username.</para></listitem>
555
556                 <listitem><para>If the client has previously registered a username 
557                 with the system and now supplies a correct password for that 
558                 username then the connection is allowed.</para></listitem>
559                 
560                 <listitem><para>The client's NetBIOS name and any previously 
561                 used user names are checked against the supplied password, if 
562                 they match then the connection is allowed as the corresponding 
563                 user.</para></listitem>
564                 
565                 <listitem><para>If the client has previously validated a
566                 username/password pair with the server and the client has passed 
567                 the validation token then that username is used. </para></listitem>
568
569                 <listitem><para>If a "user = " field is given in the
570                 <filename>smb.conf</filename> file for the service and the client 
571                 has supplied a password, and that password matches (according to 
572                 the UNIX system's password checking) with one of the usernames 
573                 from the "user =" field then the connection is made as 
574                 the username in the "user =" line. If one 
575                 of the username in the "user =" list begins with a
576                 '@' then that name expands to a list of names in 
577                 the group of the same name.</para></listitem>
578
579                 <listitem><para>If the service is a guest service then a 
580                 connection is made as the username given in the "guest 
581                 account =" for the service, irrespective of the 
582                 supplied password.</para></listitem>
583         </orderedlist>
584
585 </refsect1>
586
587 <refsect1>
588         <title>COMPLETE LIST OF GLOBAL PARAMETERS</title>
589
590         <para>Here is a list of all global parameters. See the section of 
591         each parameter for details.  Note that some are synonyms.</para>
592
593         <itemizedlist>
594                 <listitem><para><link linkend="ABORTSHUTDOWNSCRIPT"><parameter>abort shutdown script</parameter></link></para></listitem>
595                 <listitem><para><link linkend="ADDPRINTERCOMMAND"><parameter>add printer command</parameter></link></para></listitem>
596                 <listitem><para><link linkend="ADDSHARECOMMAND"><parameter>add share command</parameter></link></para></listitem>
597                 <listitem><para><link linkend="ADDUSERSCRIPT"><parameter>add user script</parameter></link></para></listitem>
598                 <listitem><para><link linkend="ADDMACHINESCRIPT"><parameter>add machine script</parameter></link></para></listitem>
599                 <listitem><para><link linkend="ALLOWTRUSTEDDOMAINS"><parameter>allow trusted domains</parameter></link></para></listitem>
600                 <listitem><para><link linkend="ANNOUNCEAS"><parameter>announce as</parameter></link></para></listitem>
601                 <listitem><para><link linkend="ANNOUNCEVERSION"><parameter>announce version</parameter></link></para></listitem>
602                 <listitem><para><link linkend="AUTHMETHODS"><parameter>auth methods</parameter></link></para></listitem>
603                 <listitem><para><link linkend="AUTOSERVICES"><parameter>auto services</parameter></link></para></listitem>
604                 <listitem><para><link linkend="BINDINTERFACESONLY"><parameter>bind interfaces only</parameter></link></para></listitem>
605                 <listitem><para><link linkend="BROWSELIST"><parameter>browse list</parameter></link></para></listitem>
606                 <listitem><para><link linkend="CHANGENOTIFYTIMEOUT"><parameter>change notify timeout</parameter></link></para></listitem>
607                 <listitem><para><link linkend="CHANGESHARECOMMAND"><parameter>change share command</parameter></link></para></listitem>
608                 <listitem><para><link linkend="CONFIGFILE"><parameter>config file</parameter></link></para></listitem>
609                 <listitem><para><link linkend="DEADTIME"><parameter>deadtime</parameter></link></para></listitem>
610                 <listitem><para><link linkend="DEBUGHIRESTIMESTAMP"><parameter>debug hires timestamp</parameter></link></para></listitem>
611                 <listitem><para><link linkend="DEBUGPID"><parameter>debug pid</parameter></link></para></listitem>
612                 <listitem><para><link linkend="DEBUGTIMESTAMP"><parameter>debug timestamp</parameter></link></para></listitem>
613                 <listitem><para><link linkend="DEBUGUID"><parameter>debug uid</parameter></link></para></listitem>
614                 <listitem><para><link linkend="DEBUGLEVEL"><parameter>debuglevel</parameter></link></para></listitem>
615                 <listitem><para><link linkend="DEFAULT"><parameter>default</parameter></link></para></listitem>
616                 <listitem><para><link linkend="DEFAULTSERVICE"><parameter>default service</parameter></link></para></listitem>
617                 <listitem><para><link linkend="DELETEPRINTERCOMMAND"><parameter>delete printer command</parameter></link></para></listitem>
618                 <listitem><para><link linkend="DELETESHARECOMMAND"><parameter>delete share command</parameter></link></para></listitem>
619                 <listitem><para><link linkend="DELETEUSERSCRIPT"><parameter>delete user script</parameter></link></para></listitem>
620                 <listitem><para><link linkend="DFREECOMMAND"><parameter>dfree command</parameter></link></para></listitem>
621                 <listitem><para><link linkend="DISABLESPOOLSS"><parameter>disable spoolss</parameter></link></para></listitem>
622                 <listitem><para><link linkend="DNSPROXY"><parameter>dns proxy</parameter></link></para></listitem>
623                 <listitem><para><link linkend="DOMAINADMINGROUP"><parameter>domain admin group</parameter></link></para></listitem>
624                 <listitem><para><link linkend="DOMAINGUESTGROUP"><parameter>domain guest group</parameter></link></para></listitem>
625                 <listitem><para><link linkend="DOMAINLOGONS"><parameter>domain logons</parameter></link></para></listitem>
626                 <listitem><para><link linkend="DOMAINMASTER"><parameter>domain master</parameter></link></para></listitem>
627                 <listitem><para><link linkend="ENCRYPTPASSWORDS"><parameter>encrypt passwords</parameter></link></para></listitem>
628                 <listitem><para><link linkend="ENHANCEDBROWSING"><parameter>enhanced browsing</parameter></link></para></listitem>
629                 <listitem><para><link linkend="ENUMPORTSCOMMAND"><parameter>enumports command</parameter></link></para></listitem>
630                 <listitem><para><link linkend="GETWDCACHE"><parameter>getwd cache</parameter></link></para></listitem>
631                 <listitem><para><link linkend="HIDELOCALUSERS"><parameter>hide local users</parameter></link></para></listitem>
632                 <listitem><para><link linkend="HIDEUNREADABLE"><parameter>hide unreadable</parameter></link></para></listitem>
633                 <listitem><para><link linkend="HOMEDIRMAP"><parameter>homedir map</parameter></link></para></listitem>
634                 <listitem><para><link linkend="HOSTMSDFS"><parameter>host msdfs</parameter></link></para></listitem>
635                 <listitem><para><link linkend="HOSTSEQUIV"><parameter>hosts equiv</parameter></link></para></listitem>
636                 <listitem><para><link linkend="INTERFACES"><parameter>interfaces</parameter></link></para></listitem>
637                 <listitem><para><link linkend="KEEPALIVE"><parameter>keepalive</parameter></link></para></listitem>
638                 <listitem><para><link linkend="KERNELOPLOCKS"><parameter>kernel oplocks</parameter></link></para></listitem>
639                 <listitem><para><link linkend="LANMANAUTH"><parameter>lanman auth</parameter></link></para></listitem>
640                 <listitem><para><link linkend="LARGEREADWRITE"><parameter>large readwrite</parameter></link></para></listitem>
641                 
642                 <listitem><para><link linkend="LDAPADMINDN"><parameter>ldap admin dn</parameter></link></para></listitem>
643                 <listitem><para><link linkend="LDAPFILTER"><parameter>ldap filter</parameter></link></para></listitem>
644                 <listitem><para><link linkend="LDAPPORT"><parameter>ldap port</parameter></link></para></listitem>
645                 <listitem><para><link linkend="LDAPSERVER"><parameter>ldap server</parameter></link></para></listitem>
646                 <listitem><para><link linkend="LDAPSSL"><parameter>ldap ssl</parameter></link></para></listitem>
647                 <listitem><para><link linkend="LDAPSUFFIX"><parameter>ldap suffix</parameter></link></para></listitem>
648
649                 <listitem><para><link linkend="LMANNOUNCE"><parameter>lm announce</parameter></link></para></listitem>
650                 <listitem><para><link linkend="LMINTERVAL"><parameter>lm interval</parameter></link></para></listitem>
651                 <listitem><para><link linkend="LOADPRINTERS"><parameter>load printers</parameter></link></para></listitem>
652                 <listitem><para><link linkend="LOCALMASTER"><parameter>local master</parameter></link></para></listitem>
653                 <listitem><para><link linkend="LOCKDIR"><parameter>lock dir</parameter></link></para></listitem>
654                 <listitem><para><link linkend="LOCKDIRECTORY"><parameter>lock directory</parameter></link></para></listitem>
655                 <listitem><para><link linkend="LOGFILE"><parameter>log file</parameter></link></para></listitem>
656                 <listitem><para><link linkend="LOGLEVEL"><parameter>log level</parameter></link></para></listitem>
657                 <listitem><para><link linkend="LOGONDRIVE"><parameter>logon drive</parameter></link></para></listitem>
658                 <listitem><para><link linkend="LOGONHOME"><parameter>logon home</parameter></link></para></listitem>
659                 <listitem><para><link linkend="LOGONPATH"><parameter>logon path</parameter></link></para></listitem>
660                 <listitem><para><link linkend="LOGONSCRIPT"><parameter>logon script</parameter></link></para></listitem>
661                 <listitem><para><link linkend="LPQCACHETIME"><parameter>lpq cache time</parameter></link></para></listitem>
662                 <listitem><para><link linkend="MACHINEPASSWORDTIMEOUT"><parameter>machine password timeout</parameter></link></para></listitem>
663                 <listitem><para><link linkend="MANGLEDSTACK"><parameter>mangled stack</parameter></link></para></listitem>
664                 <listitem><para><link linkend="MAPTOGUEST"><parameter>map to guest</parameter></link></para></listitem>
665                 <listitem><para><link linkend="MAXDISKSIZE"><parameter>max disk size</parameter></link></para></listitem>
666                 <listitem><para><link linkend="MAXLOGSIZE"><parameter>max log size</parameter></link></para></listitem>
667                 <listitem><para><link linkend="MAXMUX"><parameter>max mux</parameter></link></para></listitem>
668                 <listitem><para><link linkend="MAXOPENFILES"><parameter>max open files</parameter></link></para></listitem>
669                 <listitem><para><link linkend="MAXPROTOCOL"><parameter>max protocol</parameter></link></para></listitem>
670                 <listitem><para><link linkend="MAXSMBDPROCESSES"><parameter>max smbd processes</parameter></link></para></listitem>
671                 <listitem><para><link linkend="MAXTTL"><parameter>max ttl</parameter></link></para></listitem>
672                 <listitem><para><link linkend="MAXWINSTTL"><parameter>max wins ttl</parameter></link></para></listitem>
673                 <listitem><para><link linkend="MAXXMIT"><parameter>max xmit</parameter></link></para></listitem>
674                 <listitem><para><link linkend="MESSAGECOMMAND"><parameter>message command</parameter></link></para></listitem>
675                 <listitem><para><link linkend="MINPASSWDLENGTH"><parameter>min passwd length</parameter></link></para></listitem>
676                 <listitem><para><link linkend="MINPASSWORDLENGTH"><parameter>min password length</parameter></link></para></listitem>
677                 <listitem><para><link linkend="MINPROTOCOL"><parameter>min protocol</parameter></link></para></listitem>
678                 <listitem><para><link linkend="MINWINSTTL"><parameter>min wins ttl</parameter></link></para></listitem>
679                 <listitem><para><link linkend="NAMERESOLVEORDER"><parameter>name resolve order</parameter></link></para></listitem>
680                 <listitem><para><link linkend="NETBIOSALIASES"><parameter>netbios aliases</parameter></link></para></listitem>
681                 <listitem><para><link linkend="NETBIOSNAME"><parameter>netbios name</parameter></link></para></listitem>
682                 <listitem><para><link linkend="NETBIOSSCOPE"><parameter>netbios scope</parameter></link></para></listitem>
683                 <listitem><para><link linkend="NISHOMEDIR"><parameter>nis homedir</parameter></link></para></listitem>
684                 <listitem><para><link linkend="NONUNIXACCOUNTRANGE"><parameter>non unix account range</parameter></link></para></listitem>
685                 <listitem><para><link linkend="NTPIPESUPPORT"><parameter>nt pipe support</parameter></link></para></listitem>
686                 <listitem><para><link linkend="NULLPASSWORDS"><parameter>null passwords</parameter></link></para></listitem>
687                 <listitem><para><link linkend="OBEYPAMRESTRICTIONS"><parameter>obey pam restrictions</parameter></link></para></listitem>
688                 <listitem><para><link linkend="OPLOCKBREAKWAITTIME"><parameter>oplock break wait time</parameter></link></para></listitem>
689                 <listitem><para><link linkend="OSLEVEL"><parameter>os level</parameter></link></para></listitem>
690                 <listitem><para><link linkend="OS2DRIVERMAP"><parameter>os2 driver map</parameter></link></para></listitem>
691                 <listitem><para><link linkend="PAMPASSWORDCHANGE"><parameter>pam password change</parameter></link></para></listitem>
692                 <listitem><para><link linkend="PANICACTION"><parameter>panic action</parameter></link></para></listitem>
693                 <listitem><para><link linkend="PASSDBBACKEND"><parameter>passdb backend</parameter></link></para></listitem>
694                 <listitem><para><link linkend="PASSWDCHAT"><parameter>passwd chat</parameter></link></para></listitem>
695                 <listitem><para><link linkend="PASSWDCHATDEBUG"><parameter>passwd chat debug</parameter></link></para></listitem>
696                 <listitem><para><link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter></link></para></listitem>
697                 <listitem><para><link linkend="PASSWORDLEVEL"><parameter>password level</parameter></link></para></listitem>
698                 <listitem><para><link linkend="PASSWORDSERVER"><parameter>password server</parameter></link></para></listitem>
699                 <listitem><para><link linkend="PREFEREDMASTER"><parameter>prefered master</parameter></link></para></listitem>
700                 <listitem><para><link linkend="PREFERREDMASTER"><parameter>preferred master</parameter></link></para></listitem>
701                 <listitem><para><link linkend="PRELOAD"><parameter>preload</parameter></link></para></listitem>
702                 <listitem><para><link linkend="PRINTCAP"><parameter>printcap</parameter></link></para></listitem>
703                 <listitem><para><link linkend="PRINTCAPNAME"><parameter>printcap name</parameter></link></para></listitem>
704                 <listitem><para><link linkend="PRINTERDRIVERFILE"><parameter>printer driver file</parameter></link></para></listitem>
705                 <listitem><para><link linkend="PRIVATEDIR"><parameter>private dir</parameter></link></para></listitem>
706                 <listitem><para><link linkend="PROTOCOL"><parameter>protocol</parameter></link></para></listitem>
707                 <listitem><para><link linkend="READBMPX"><parameter>read bmpx</parameter></link></para></listitem>
708                 <listitem><para><link linkend="READRAW"><parameter>read raw</parameter></link></para></listitem>
709                 <listitem><para><link linkend="READSIZE"><parameter>read size</parameter></link></para></listitem>
710                 <listitem><para><link linkend="REMOTEANNOUNCE"><parameter>remote announce</parameter></link></para></listitem>
711                 <listitem><para><link linkend="REMOTEBROWSESYNC"><parameter>remote browse sync</parameter></link></para></listitem>
712                 <listitem><para><link linkend="RESTRICTANONYMOUS"><parameter>restrict anonymous</parameter></link></para></listitem>
713                 <listitem><para><link linkend="ROOT"><parameter>root</parameter></link></para></listitem>
714                 <listitem><para><link linkend="ROOTDIR"><parameter>root dir</parameter></link></para></listitem>
715                 <listitem><para><link linkend="ROOTDIRECTORY"><parameter>root directory</parameter></link></para></listitem>
716                 <listitem><para><link linkend="SECURITY"><parameter>security</parameter></link></para></listitem>
717                 <listitem><para><link linkend="SERVERSTRING"><parameter>server string</parameter></link></para></listitem>
718                 <listitem><para><link linkend="SHOWADDPRINTERWIZARD"><parameter>show add printer wizard</parameter></link></para></listitem>
719                 <listitem><para><link linkend="SHUTDOWNSCRIPT"><parameter>shutdown script</parameter></link></para></listitem>
720                 <listitem><para><link linkend="SMBPASSWDFILE"><parameter>smb passwd file</parameter></link></para></listitem>
721                 <listitem><para><link linkend="SOCKETADDRESS"><parameter>socket address</parameter></link></para></listitem>
722                 <listitem><para><link linkend="SOCKETOPTIONS"><parameter>socket options</parameter></link></para></listitem>
723                 <listitem><para><link linkend="SOURCEENVIRONMENT"><parameter>source environment</parameter></link></para></listitem>
724
725                 <listitem><para><link linkend="SSL"><parameter>ssl</parameter></link></para></listitem>
726                 <listitem><para><link linkend="SSLCACERTDIR"><parameter>ssl CA certDir</parameter></link></para></listitem>
727                 <listitem><para><link linkend="SSLCACERTFILE"><parameter>ssl CA certFile</parameter></link></para></listitem>
728                 <listitem><para><link linkend="SSLCIPHERS"><parameter>ssl ciphers</parameter></link></para></listitem>
729                 <listitem><para><link linkend="SSLCLIENTCERT"><parameter>ssl client cert</parameter></link></para></listitem>
730                 <listitem><para><link linkend="SSLCLIENTKEY"><parameter>ssl client key</parameter></link></para></listitem>
731                 <listitem><para><link linkend="SSLCOMPATIBILITY"><parameter>ssl compatibility</parameter></link></para></listitem>
732                 <listitem><para><link linkend="SSLEGDSOCKET"><parameter>ssl egd socket</parameter></link></para></listitem>
733                 <listitem><para><link linkend="SSLENTROPYBYTES"><parameter>ssl entropy bytes</parameter></link></para></listitem>
734                 <listitem><para><link linkend="SSLENTROPYFILE"><parameter>ssl entropy file</parameter></link></para></listitem>
735                 <listitem><para><link linkend="SSLHOSTS"><parameter>ssl hosts</parameter></link></para></listitem>
736                 <listitem><para><link linkend="SSLHOSTSRESIGN"><parameter>ssl hosts resign</parameter></link></para></listitem>
737                 <listitem><para><link linkend="SSLREQUIRECLIENTCERT"><parameter>ssl require clientcert</parameter></link></para></listitem>
738                 <listitem><para><link linkend="SSLREQUIRESERVERCERT"><parameter>ssl require servercert</parameter></link></para></listitem>
739                 <listitem><para><link linkend="SSLSERVERCERT"><parameter>ssl server cert</parameter></link></para></listitem>
740                 <listitem><para><link linkend="SSLSERVERKEY"><parameter>ssl server key</parameter></link></para></listitem>
741                 <listitem><para><link linkend="SSLVERSION"><parameter>ssl version</parameter></link></para></listitem>
742
743                 <listitem><para><link linkend="STATCACHE"><parameter>stat cache</parameter></link></para></listitem>
744                 <listitem><para><link linkend="STATCACHESIZE"><parameter>stat cache size</parameter></link></para></listitem>
745                 <listitem><para><link linkend="STRIPDOT"><parameter>strip dot</parameter></link></para></listitem>
746                 <listitem><para><link linkend="SYSLOG"><parameter>syslog</parameter></link></para></listitem>
747                 <listitem><para><link linkend="SYSLOGONLY"><parameter>syslog only</parameter></link></para></listitem>
748                 <listitem><para><link linkend="TEMPLATEHOMEDIR"><parameter>template homedir</parameter></link></para></listitem>
749                 <listitem><para><link linkend="TEMPLATESHELL"><parameter>template shell</parameter></link></para></listitem>
750                 <listitem><para><link linkend="TIMEOFFSET"><parameter>time offset</parameter></link></para></listitem>
751                 <listitem><para><link linkend="TIMESERVER"><parameter>time server</parameter></link></para></listitem>
752                 <listitem><para><link linkend="TIMESTAMPLOGS"><parameter>timestamp logs</parameter></link></para></listitem>
753                 <listitem><para><link linkend="TOTALPRINTJOBS"><parameter>total print jobs</parameter></link></para></listitem>
754                 <listitem><para><link linkend="UNIXEXTENSIONS"><parameter>unix extensions</parameter></link></para></listitem>
755                 <listitem><para><link linkend="UNIXPASSWORDSYNC"><parameter>unix password sync</parameter></link></para></listitem>
756                 <listitem><para><link linkend="UPDATEENCRYPTED"><parameter>update encrypted</parameter></link></para></listitem>
757                 <listitem><para><link linkend="USEMMAP"><parameter>use mmap</parameter></link></para></listitem>
758                 <listitem><para><link linkend="USERHOSTS"><parameter>use rhosts</parameter></link></para></listitem>
759                 <listitem><para><link linkend="USERNAMELEVEL"><parameter>username level</parameter></link></para></listitem>
760                 <listitem><para><link linkend="USERNAMEMAP"><parameter>username map</parameter></link></para></listitem>
761                 <listitem><para><link linkend="UTMP"><parameter>utmp</parameter></link></para></listitem>
762                 <listitem><para><link linkend="UTMPDIRECTORY"><parameter>utmp directory</parameter></link></para></listitem>
763                 <listitem><para><link linkend="WINBINDCACHETIME"><parameter>winbind cache time</parameter></link></para></listitem>
764                 <listitem><para><link linkend="WINBINDENUMUSERS"><parameter>winbind enum users</parameter></link></para></listitem>
765                 <listitem><para><link linkend="WINBINDENUMGROUPS"><parameter>winbind enum groups</parameter></link></para></listitem>
766                 <listitem><para><link linkend="WINBINDGID"><parameter>winbind gid</parameter></link></para></listitem>
767                 <listitem><para><link linkend="WINBINDSEPARATOR"><parameter>winbind separator</parameter></link></para></listitem>
768                 <listitem><para><link linkend="WINBINDUID"><parameter>winbind uid</parameter></link></para></listitem>
769                 <listitem><para><link linkend="WINBINDUSEDEFAULTDOMAIN"><parameter>winbind use default domain</parameter></link></para></listitem>
770                 <listitem><para><link linkend="WINSHOOK"><parameter>wins hook</parameter></link></para></listitem>
771                 <listitem><para><link linkend="WINSPROXY"><parameter>wins proxy</parameter></link></para></listitem>
772                 <listitem><para><link linkend="WINSSERVER"><parameter>wins server</parameter></link></para></listitem>
773                 <listitem><para><link linkend="WINSSUPPORT"><parameter>wins support</parameter></link></para></listitem>
774                 <listitem><para><link linkend="WORKGROUP"><parameter>workgroup</parameter></link></para></listitem>
775                 <listitem><para><link linkend="WRITERAW"><parameter>write raw</parameter></link></para></listitem>
776         </itemizedlist>
777
778 </refsect1>
779
780 <refsect1>
781         <title>COMPLETE LIST OF SERVICE PARAMETERS</title>
782         
783         <para>Here is a list of all service parameters. See the section on 
784         each parameter for details. Note that some are synonyms.</para>
785         
786         <itemizedlist>
787                 <listitem><para><link linkend="ADMINUSERS"><parameter>admin users</parameter></link></para></listitem>
788                 <listitem><para><link linkend="ALLOWHOSTS"><parameter>allow hosts</parameter></link></para></listitem>
789                 <listitem><para><link linkend="AVAILABLE"><parameter>available</parameter></link></para></listitem>
790                 <listitem><para><link linkend="BLOCKINGLOCKS"><parameter>blocking locks</parameter></link></para></listitem>
791                 <listitem><para><link linkend="BROWSABLE"><parameter>browsable</parameter></link></para></listitem>
792                 <listitem><para><link linkend="BROWSEABLE"><parameter>browseable</parameter></link></para></listitem>
793                 <listitem><para><link linkend="CASESENSITIVE"><parameter>case sensitive</parameter></link></para></listitem>
794                 <listitem><para><link linkend="CASESIGNAMES"><parameter>casesignames</parameter></link></para></listitem>
795                 <listitem><para><link linkend="COMMENT"><parameter>comment</parameter></link></para></listitem>
796                 <listitem><para><link linkend="COPY"><parameter>copy</parameter></link></para></listitem>
797                 <listitem><para><link linkend="CREATEMASK"><parameter>create mask</parameter></link></para></listitem>
798                 <listitem><para><link linkend="CREATEMODE"><parameter>create mode</parameter></link></para></listitem>
799                 <listitem><para><link linkend="DEFAULTCASE"><parameter>default case</parameter></link></para></listitem>
800                 <listitem><para><link linkend="DEFAULTDEVMODE"><parameter>default devmode</parameter></link></para></listitem>
801                 <listitem><para><link linkend="DELETEREADONLY"><parameter>delete readonly</parameter></link></para></listitem>
802                 <listitem><para><link linkend="DELETEVETOFILES"><parameter>delete veto files</parameter></link></para></listitem>
803                 <listitem><para><link linkend="DENYHOSTS"><parameter>deny hosts</parameter></link></para></listitem>
804                 <listitem><para><link linkend="DIRECTORY"><parameter>directory</parameter></link></para></listitem>
805                 <listitem><para><link linkend="DIRECTORYMASK"><parameter>directory mask</parameter></link></para></listitem>
806                 <listitem><para><link linkend="DIRECTORYMODE"><parameter>directory mode</parameter></link></para></listitem>
807                 <listitem><para><link linkend="DIRECTORYSECURITYMASK"><parameter>directory security mask</parameter></link></para></listitem>
808                 <listitem><para><link linkend="DONTDESCEND"><parameter>dont descend</parameter></link></para></listitem>
809                 <listitem><para><link linkend="DOSFILEMODE"><parameter>dos filemode</parameter></link></para></listitem>
810                 <listitem><para><link linkend="DOSFILETIMERESOLUTION"><parameter>dos filetime resolution</parameter></link></para></listitem>
811                 <listitem><para><link linkend="DOSFILETIMES"><parameter>dos filetimes</parameter></link></para></listitem>
812                 <listitem><para><link linkend="EXEC"><parameter>exec</parameter></link></para></listitem>
813                 <listitem><para><link linkend="FAKEDIRECTORYCREATETIMES"><parameter>fake directory create times</parameter></link></para></listitem>
814                 <listitem><para><link linkend="FAKEOPLOCKS"><parameter>fake oplocks</parameter></link></para></listitem>
815                 <listitem><para><link linkend="FOLLOWSYMLINKS"><parameter>follow symlinks</parameter></link></para></listitem>
816                 <listitem><para><link linkend="FORCECREATEMODE"><parameter>force create mode</parameter></link></para></listitem>
817                 <listitem><para><link linkend="FORCEDIRECTORYMODE"><parameter>force directory mode</parameter></link></para></listitem>
818                 <listitem><para><link linkend="FORCEDIRECTORYSECURITYMODE"><parameter>force directory security mode</parameter></link></para></listitem>
819                 <listitem><para><link linkend="FORCEGROUP"><parameter>force group</parameter></link></para></listitem>
820                 <listitem><para><link linkend="FORCESECURITYMODE"><parameter>force security mode</parameter></link></para></listitem>
821                 <listitem><para><link linkend="FORCEUSER"><parameter>force user</parameter></link></para></listitem>
822                 <listitem><para><link linkend="FSTYPE"><parameter>fstype</parameter></link></para></listitem>
823                 <listitem><para><link linkend="GROUP"><parameter>group</parameter></link></para></listitem>
824                 <listitem><para><link linkend="GUESTACCOUNT"><parameter>guest account</parameter></link></para></listitem>
825                 <listitem><para><link linkend="GUESTOK"><parameter>guest ok</parameter></link></para></listitem>
826                 <listitem><para><link linkend="GUESTONLY"><parameter>guest only</parameter></link></para></listitem>
827                 <listitem><para><link linkend="HIDEDOTFILES"><parameter>hide dot files</parameter></link></para></listitem>
828                 <listitem><para><link linkend="HIDEFILES"><parameter>hide files</parameter></link></para></listitem>
829                 <listitem><para><link linkend="HOSTSALLOW"><parameter>hosts allow</parameter></link></para></listitem>
830                 <listitem><para><link linkend="HOSTSDENY"><parameter>hosts deny</parameter></link></para></listitem>
831                 <listitem><para><link linkend="INCLUDE"><parameter>include</parameter></link></para></listitem>
832                 <listitem><para><link linkend="INHERITPERMISSIONS"><parameter>inherit permissions</parameter></link></para></listitem>
833                 <listitem><para><link linkend="INVALIDUSERS"><parameter>invalid users</parameter></link></para></listitem>
834                 <listitem><para><link linkend="LEVEL2OPLOCKS"><parameter>level2 oplocks</parameter></link></para></listitem>
835                 <listitem><para><link linkend="LOCKING"><parameter>locking</parameter></link></para></listitem>
836                 <listitem><para><link linkend="LPPAUSECOMMAND"><parameter>lppause command</parameter></link></para></listitem>
837                 <listitem><para><link linkend="LPQCOMMAND"><parameter>lpq command</parameter></link></para></listitem>
838                 <listitem><para><link linkend="LPRESUMECOMMAND"><parameter>lpresume command</parameter></link></para></listitem>
839                 <listitem><para><link linkend="LPRMCOMMAND"><parameter>lprm command</parameter></link></para></listitem>
840                 <listitem><para><link linkend="MAGICOUTPUT"><parameter>magic output</parameter></link></para></listitem>
841                 <listitem><para><link linkend="MAGICSCRIPT"><parameter>magic script</parameter></link></para></listitem>
842                 <listitem><para><link linkend="MANGLECASE"><parameter>mangle case</parameter></link></para></listitem>
843                 <listitem><para><link linkend="MANGLEDMAP"><parameter>mangled map</parameter></link></para></listitem>
844                 <listitem><para><link linkend="MANGLEDNAMES"><parameter>mangled names</parameter></link></para></listitem>
845                 <listitem><para><link linkend="MANGLINGCHAR"><parameter>mangling char</parameter></link></para></listitem>
846                 <listitem><para><link linkend="MAPARCHIVE"><parameter>map archive</parameter></link></para></listitem>
847                 <listitem><para><link linkend="MAPHIDDEN"><parameter>map hidden</parameter></link></para></listitem>
848                 <listitem><para><link linkend="MAPSYSTEM"><parameter>map system</parameter></link></para></listitem>
849                 <listitem><para><link linkend="MAXCONNECTIONS"><parameter>max connections</parameter></link></para></listitem>
850                 <listitem><para><link linkend="MAXPRINTJOBS"><parameter>max print jobs</parameter></link></para></listitem>
851                 <listitem><para><link linkend="MINPRINTSPACE"><parameter>min print space</parameter></link></para></listitem>
852                 <listitem><para><link linkend="MSDFSROOT"><parameter>msdfs root</parameter></link></para></listitem>
853                 <listitem><para><link linkend="NTACLSUPPORT"><parameter>nt acl support</parameter></link></para></listitem>
854                 <listitem><para><link linkend="ONLYGUEST"><parameter>only guest</parameter></link></para></listitem>
855                 <listitem><para><link linkend="ONLYUSER"><parameter>only user</parameter></link></para></listitem>
856                 <listitem><para><link linkend="OPLOCKCONTENTIONLIMIT"><parameter>oplock contention limit</parameter></link></para></listitem>
857                 <listitem><para><link linkend="OPLOCKS"><parameter>oplocks</parameter></link></para></listitem>
858                 <listitem><para><link linkend="PATH"><parameter>path</parameter></link></para></listitem>
859                 <listitem><para><link linkend="POSIXLOCKING"><parameter>posix locking</parameter></link></para></listitem>
860                 <listitem><para><link linkend="POSTEXEC"><parameter>postexec</parameter></link></para></listitem>
861                 <listitem><para><link linkend="POSTSCRIPT"><parameter>postscript</parameter></link></para></listitem>
862                 <listitem><para><link linkend="PREEXEC"><parameter>preexec</parameter></link></para></listitem>
863                 <listitem><para><link linkend="PREEXECCLOSE"><parameter>preexec close</parameter></link></para></listitem>
864                 <listitem><para><link linkend="PRESERVECASE"><parameter>preserve case</parameter></link></para></listitem>
865                 <listitem><para><link linkend="PRINTCOMMAND"><parameter>print command</parameter></link></para></listitem>
866                 <listitem><para><link linkend="PRINTOK"><parameter>print ok</parameter></link></para></listitem>
867                 <listitem><para><link linkend="PRINTABLE"><parameter>printable</parameter></link></para></listitem>
868                 <listitem><para><link linkend="PRINTER"><parameter>printer</parameter></link></para></listitem>
869                 <listitem><para><link linkend="PRINTERADMIN"><parameter>printer admin</parameter></link></para></listitem>
870                 <listitem><para><link linkend="PRINTERDRIVER"><parameter>printer driver</parameter></link></para></listitem>
871                 <listitem><para><link linkend="PRINTERDRIVERLOCATION"><parameter>printer driver location</parameter></link></para></listitem>
872                 <listitem><para><link linkend="PRINTERNAME"><parameter>printer name</parameter></link></para></listitem>
873                 <listitem><para><link linkend="PRINTING"><parameter>printing</parameter></link></para></listitem>
874                 <listitem><para><link linkend="PUBLIC"><parameter>public</parameter></link></para></listitem>
875                 <listitem><para><link linkend="QUEUEPAUSECOMMAND"><parameter>queuepause command</parameter></link></para></listitem>
876                 <listitem><para><link linkend="QUEUERESUMECOMMAND"><parameter>queueresume command</parameter></link></para></listitem>
877                 <listitem><para><link linkend="READLIST"><parameter>read list</parameter></link></para></listitem>
878                 <listitem><para><link linkend="READONLY"><parameter>read only</parameter></link></para></listitem>
879                 <listitem><para><link linkend="ROOTPOSTEXEC"><parameter>root postexec</parameter></link></para></listitem>
880                 <listitem><para><link linkend="ROOTPREEXEC"><parameter>root preexec</parameter></link></para></listitem>
881                 <listitem><para><link linkend="ROOTPREEXECCLOSE"><parameter>root preexec close</parameter></link></para></listitem>
882                 <listitem><para><link linkend="SECURITYMASK"><parameter>security mask</parameter></link></para></listitem>
883                 <listitem><para><link linkend="SETDIRECTORY"><parameter>set directory</parameter></link></para></listitem>
884                 <listitem><para><link linkend="SHORTPRESERVECASE"><parameter>short preserve case</parameter></link></para></listitem>
885                 <listitem><para><link linkend="STATUS"><parameter>status</parameter></link></para></listitem>
886                 <listitem><para><link linkend="STRICTALLOCATE"><parameter>strict allocate</parameter></link></para></listitem>
887                 <listitem><para><link linkend="STRICTLOCKING"><parameter>strict locking</parameter></link></para></listitem>
888                 <listitem><para><link linkend="STRICTSYNC"><parameter>strict sync</parameter></link></para></listitem>
889                 <listitem><para><link linkend="SYNCALWAYS"><parameter>sync always</parameter></link></para></listitem>
890                 <listitem><para><link linkend="USECLIENTDRIVER"><parameter>use client driver</parameter></link></para></listitem>
891                 <listitem><para><link linkend="USER"><parameter>user</parameter></link></para></listitem>
892                 <listitem><para><link linkend="USERNAME"><parameter>username</parameter></link></para></listitem>
893                 <listitem><para><link linkend="USERS"><parameter>users</parameter></link></para></listitem>
894                 <listitem><para><link linkend="VALIDUSERS"><parameter>valid users</parameter></link></para></listitem>
895                 <listitem><para><link linkend="VETOFILES"><parameter>veto files</parameter></link></para></listitem>
896                 <listitem><para><link linkend="VETOOPLOCKFILES"><parameter>veto oplock files</parameter></link></para></listitem>
897                 <listitem><para><link linkend="VFSOBJECT"><parameter>vfs object</parameter></link></para></listitem>
898                 <listitem><para><link linkend="VFSOPTIONS"><parameter>vfs options</parameter></link></para></listitem>
899                 <listitem><para><link linkend="VOLUME"><parameter>volume</parameter></link></para></listitem>
900                 <listitem><para><link linkend="WIDELINKS"><parameter>wide links</parameter></link></para></listitem>
901                 <listitem><para><link linkend="WRITABLE"><parameter>writable</parameter></link></para></listitem>
902                 <listitem><para><link linkend="WRITECACHESIZE"><parameter>write cache size</parameter></link></para></listitem>
903                 <listitem><para><link linkend="WRITELIST"><parameter>write list</parameter></link></para></listitem>
904                 <listitem><para><link linkend="WRITEOK"><parameter>write ok</parameter></link></para></listitem>
905                 <listitem><para><link linkend="WRITEABLE"><parameter>writeable</parameter></link></para></listitem>
906         </itemizedlist>
907
908 </refsect1>
909
910 <refsect1>
911         <title>EXPLANATION OF EACH PARAMETER</title>
912         
913         <variablelist>
914
915                 <varlistentry>
916                 <term><anchor id="ABORTSHUTDOWNSCRIPT">abort shutdown script (G)</term>
917                 <listitem><para><emphasis>This parameter only exists in the HEAD cvs branch</emphasis>
918                 This a full path name to a script called by
919                 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>  that
920                 should stop a shutdown procedure issued by the <link 
921                 linkend="SHUTDOWNSCRIPT"><parameter>shutdown script</parameter></link>.</para>
922                 
923                 <para>This command will be run as user.</para>
924
925                 <para>Default: <emphasis>None</emphasis>.</para>
926                 <para>Example: <command>abort shutdown script = /sbin/shutdown -c</command></para>
927                 </listitem>
928                 </varlistentry>
929
930
931                 <varlistentry>
932                 <term><anchor id="ADDPRINTERCOMMAND">add printer command (G)</term>
933                 <listitem><para>With the introduction of MS-RPC based printing
934                 support for Windows NT/2000 clients in Samba 2.2, The MS Add
935                 Printer Wizard (APW) icon is now also available in the 
936                 "Printers..." folder displayed a share listing.  The APW
937                 allows for printers to be add remotely to a Samba or Windows 
938                 NT/2000 print server.</para>
939                 
940                 <para>For a Samba host this means that the printer must be 
941                 physically added to the underlying printing system.  The <parameter>add 
942                 printer command</parameter> defines a script to be run which 
943                 will perform the necessary operations for adding the printer
944                 to the print system and to add the appropriate service definition 
945                 to the  <filename>smb.conf</filename> file in order that it can be 
946                 shared by <ulink url="smbd.8.html"><command>smbd(8)</command>
947                 </ulink>.</para>
948                 
949                 <para>The <parameter>add printer command</parameter> is
950                 automatically invoked with the following parameter (in 
951                 order:</para>
952                 
953                 <itemizedlist>
954                         <listitem><para><parameter>printer name</parameter></para></listitem>
955                         <listitem><para><parameter>share name</parameter></para></listitem>
956                         <listitem><para><parameter>port name</parameter></para></listitem>
957                         <listitem><para><parameter>driver name</parameter></para></listitem>
958                         <listitem><para><parameter>location</parameter></para></listitem>
959                         <listitem><para><parameter>Windows 9x driver location</parameter>
960                         </para></listitem>
961                 </itemizedlist>
962                 
963                 <para>All parameters are filled in from the PRINTER_INFO_2 structure sent 
964                 by the Windows NT/2000 client with one exception.  The "Windows 9x
965                 driver location" parameter is included for backwards compatibility
966                 only.  The remaining fields in the structure are generated from answers
967                 to the APW questions.</para>
968                 
969                 <para>Once the <parameter>add printer command</parameter> has 
970                 been executed, <command>smbd</command> will reparse the <filename>
971                 smb.conf</filename> to determine if the share defined by the APW
972                 exists.  If the sharename is still invalid, then <command>smbd
973                 </command> will return an ACCESS_DENIED error to the client.</para>
974                 
975                 <para>See also <link linkend="DELETEPRINTERCOMMAND"><parameter>
976                 delete printer command</parameter></link>, <link 
977                 linkend="printing"><parameter>printing</parameter></link>,
978                 <link linkend="SHOWADDPRINTERWIZARD"><parameter>show add
979                 printer wizard</parameter></link></para>
980                 
981                 <para>Default: <emphasis>none</emphasis></para>
982                 <para>Example: <command>addprinter command = /usr/bin/addprinter
983                 </command></para>
984                 </listitem>
985                 </varlistentry>
986
987
988
989                 <varlistentry>
990                 <term><anchor id="ADDSHARECOMMAND">add share command (G)</term>
991                 <listitem><para>Samba 2.2.0 introduced the ability to dynamically 
992                 add and delete shares via the Windows NT 4.0 Server Manager.  The 
993                 <parameter>add share command</parameter> is used to define an 
994                 external program or script which will add a new service definition 
995                 to <filename>smb.conf</filename>.  In order to successfully 
996                 execute the <parameter>add share command</parameter>, <command>smbd</command>
997                 requires that the administrator be connected using a root account (i.e. 
998                 uid == 0).
999                 </para>
1000                 
1001                 <para>
1002                 When executed, <command>smbd</command> will automatically invoke the 
1003                 <parameter>add share command</parameter> with four parameters.
1004                 </para>
1005                 
1006                 <itemizedlist>
1007                         <listitem><para><parameter>configFile</parameter> - the location 
1008                         of the global <filename>smb.conf</filename> file. 
1009                         </para></listitem>
1010                         
1011                         <listitem><para><parameter>shareName</parameter> - the name of the new 
1012                         share.
1013                         </para></listitem>
1014                         
1015                         <listitem><para><parameter>pathName</parameter> - path to an **existing**
1016                         directory on disk.
1017                         </para></listitem>
1018                         
1019                         <listitem><para><parameter>comment</parameter> - comment string to associate 
1020                         with the new share.
1021                         </para></listitem>
1022                 </itemizedlist>
1023                 
1024                 <para>
1025                 This parameter is only used for add file shares.  To add printer shares, 
1026                 see the <link linkend="ADDPRINTERCOMMAND"><parameter>add printer 
1027                 command</parameter></link>.
1028                 </para>
1029                 
1030                 <para>
1031                 See also <link linkend="CHANGESHARECOMMAND"><parameter>change share 
1032                 command</parameter></link>, <link linkend="DELETESHARECOMMAND"><parameter>delete share
1033                 command</parameter></link>.
1034                 </para>
1035                 
1036                 <para>Default: <emphasis>none</emphasis></para>
1037                 <para>Example: <command>add share command = /usr/local/bin/addshare</command></para>
1038                 </listitem>
1039                 </varlistentry>
1040
1041
1042
1043                 <varlistentry>
1044                 <term><anchor id="ADDMACHINESCRIPT">add machine script (G)</term>
1045                 <listitem><para>This is the full pathname to a script that will 
1046                 be run by <ulink url="smbd.8.html">smbd(8)</ulink>  when a machine is added
1047                 to it's domain using the administrator username and password method. </para>
1048
1049                 <para>This option is only required when using sam back-ends tied to the
1050                 Unix uid method of RID calculation such as smbpasswd.  This option is only
1051                 available in Samba 3.0.</para>
1052
1053                 <para>Default: <command>add machine script = &lt;empty string&gt;
1054                 </command></para>       
1055
1056                 <para>Example: <command>add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
1057                 </command></para>
1058                 </listitem>
1059                 </varlistentry>
1060
1061
1062                 <varlistentry>
1063                 <term><anchor id="ADDUSERSCRIPT">add user script (G)</term>
1064                 <listitem><para>This is the full pathname to a script that will 
1065                 be run <emphasis>AS ROOT</emphasis> by <ulink url="smbd.8.html">smbd(8)
1066                 </ulink> under special circumstances described below.</para>
1067
1068                 <para>Normally, a Samba server requires that UNIX users are 
1069                 created for all users accessing files on this server. For sites 
1070                 that use Windows NT account databases as their primary user database 
1071                 creating these users and keeping the user list in sync with the 
1072                 Windows NT PDC is an onerous task. This option allows <ulink 
1073                 url="smbd.8.html">smbd</ulink> to create the required UNIX users 
1074                 <emphasis>ON DEMAND</emphasis> when a user accesses the Samba server.</para>
1075
1076                 <para>In order to use this option, <ulink url="smbd.8.html">smbd</ulink> 
1077                 must <emphasis>NOT</emphasis> be set to <parameter>security = share</parameter>
1078                 and <parameter>add user script</parameter>
1079                 must be set to a full pathname for a script that will create a UNIX 
1080                 user given one argument of <parameter>%u</parameter>, which expands into 
1081                 the UNIX user name to create.</para>
1082
1083                 <para>When the Windows user attempts to access the Samba server, 
1084                 at login (session setup in the SMB protocol) time, <ulink url="smbd.8.html">
1085                 smbd</ulink> contacts the <parameter>password server</parameter> and 
1086                 attempts to authenticate the given user with the given password. If the 
1087                 authentication succeeds then <command>smbd</command> 
1088                 attempts to find a UNIX user in the UNIX password database to map the 
1089                 Windows user into. If this lookup fails, and <parameter>add user script
1090                 </parameter> is set then <command>smbd</command> will
1091                 call the specified script <emphasis>AS ROOT</emphasis>, expanding 
1092                 any <parameter>%u</parameter> argument to be the user name to create.</para>
1093
1094                 <para>If this script successfully creates the user then <command>smbd
1095                 </command> will continue on as though the UNIX user
1096                 already existed. In this way, UNIX users are dynamically created to
1097                 match existing Windows NT accounts.</para>
1098
1099                 <para>See also <link linkend="SECURITY"><parameter>
1100                 security</parameter></link>, <link linkend="PASSWORDSERVER">
1101                 <parameter>password server</parameter></link>, 
1102                 <link linkend="DELETEUSERSCRIPT"><parameter>delete user 
1103                 script</parameter></link>.</para>
1104
1105                 <para>Default: <command>add user script = &lt;empty string&gt;
1106                 </command></para>       
1107
1108                 <para>Example: <command>add user script = /usr/local/samba/bin/add_user 
1109                 %u</command></para>
1110                 </listitem>
1111                 </varlistentry>
1112
1113
1114
1115                 <varlistentry>
1116                 <term><anchor id="ADMINUSERS">admin users (S)</term>
1117                 <listitem><para>This is a list of users who will be granted 
1118                 administrative privileges on the share. This means that they 
1119                 will do all file operations as the super-user (root).</para>
1120
1121                 <para>You should use this option very carefully, as any user in 
1122                 this list will be able to do anything they like on the share, 
1123                 irrespective of file permissions.</para>
1124
1125                 <para>Default: <emphasis>no admin users</emphasis></para>
1126
1127                 <para>Example: <command>admin users = jason</command></para>
1128                 </listitem>
1129                 </varlistentry>
1130                 
1131
1132
1133                 <varlistentry>
1134                 <term><anchor id="ALLOWHOSTS">allow hosts (S)</term>
1135                 <listitem><para>Synonym for <link linkend="HOSTSALLOW">
1136                 <parameter>hosts allow</parameter></link>.</para></listitem>
1137                 </varlistentry>
1138                 
1139
1140
1141                 <varlistentry>
1142                 <term><anchor id="ALLOWTRUSTEDDOMAINS">allow trusted domains (G)</term>
1143                 <listitem><para>This option only takes effect when the <link 
1144                 linkend="SECURITY"><parameter>security</parameter></link> option is set to 
1145                 <constant>server</constant> or <constant>domain</constant>.  
1146                 If it is set to no, then attempts to connect to a resource from 
1147                 a domain or workgroup other than the one which <ulink url="smbd.8.html">smbd</ulink> is running 
1148                 in will fail, even if that domain is trusted by the remote server 
1149                 doing the authentication.</para>
1150                 
1151                 <para>This is useful if you only want your Samba server to 
1152                 serve resources to users in the domain it is a member of. As 
1153                 an example, suppose that there are two domains DOMA and DOMB.  DOMB 
1154                 is trusted by DOMA, which contains the Samba server.  Under normal 
1155                 circumstances, a user with an account in DOMB can then access the 
1156                 resources of a UNIX account with the same account name on the 
1157                 Samba server even if they do not have an account in DOMA.  This 
1158                 can make implementing a security boundary difficult.</para>
1159
1160                 <para>Default: <command>allow trusted domains = yes</command></para>
1161
1162                 </listitem>
1163                 </varlistentry>
1164                 
1165
1166
1167                 <varlistentry>
1168                 <term><anchor id="ANNOUNCEAS">announce as (G)</term>
1169                 <listitem><para>This specifies what type of server 
1170                 <ulink url="nmbd.8.html"><command>nmbd</command></ulink> 
1171                 will announce itself as, to a network neighborhood browse 
1172                 list. By default this is set to Windows NT. The valid options 
1173                 are : "NT Server" (which can also be written as "NT"), 
1174                 "NT Workstation", "Win95" or "WfW" meaning Windows NT Server, 
1175                 Windows NT Workstation, Windows 95 and Windows for Workgroups 
1176                 respectively. Do not change this parameter unless you have a 
1177                 specific need to stop Samba appearing as an NT server as this 
1178                 may prevent Samba servers from participating as browser servers 
1179                 correctly.</para>
1180
1181                 <para>Default: <command>announce as = NT Server</command></para>
1182                 
1183                 <para>Example: <command>announce as = Win95</command></para>
1184                 </listitem>
1185                 </varlistentry>
1186                 
1187
1188
1189                 <varlistentry>
1190                 <term><anchor id="ANNOUNCEVERSION">announce version (G)</term>
1191                 <listitem><para>This specifies the major and minor version numbers 
1192                 that nmbd will use when announcing itself as a server. The default 
1193                 is 4.2.  Do not change this parameter unless you have a specific 
1194                 need to set a Samba server to be a downlevel server.</para>
1195
1196                 <para>Default: <command>announce version = 4.5</command></para>
1197
1198                 <para>Example: <command>announce version = 2.0</command></para>
1199                 </listitem>
1200                 </varlistentry>
1201
1202
1203
1204                 <varlistentry>
1205                 <term><anchor id="AUTOSERVICES">auto services (G)</term>
1206                 <listitem><para>This is a synonym for the <link linkend="PRELOAD">
1207                 <parameter>preload</parameter></link>.</para>
1208                 </listitem>
1209                 </varlistentry>
1210                 
1211
1212
1213                 <varlistentry>
1214                 <term><anchor id="AUTHMETHODS">auth methods (G)</term>
1215                 <listitem><para>This option allows the administrator to chose what
1216                 authentication methods <command>smbd</command> will use when authenticating
1217                 a user.  This option defaults to sensible values based on <link linkend="SECURITY"><parameter>
1218                 security</parameter></link>.
1219
1220                 Each entry in the list attempts to authenticate the user in turn, until
1221                 the user authenticates.  In practice only one method will ever actually 
1222                 be able to complete the authentication.
1223                 </para>
1224
1225                 <para>Default: <command>auth methods = &lt;empty string&gt;</command></para>
1226                 <para>Example: <command>auth methods = guest sam ntdomain</command></para>
1227                 </listitem>
1228                 </varlistentry>
1229
1230
1231                 <varlistentry>
1232                 <term><anchor id="AVAILABLE">available (S)</term>
1233                 <listitem><para>This parameter lets you "turn off" a service. If 
1234                 <parameter>available = no</parameter>, then <emphasis>ALL</emphasis> 
1235                 attempts to connect to the service will fail. Such failures are 
1236                 logged.</para>
1237
1238                 <para>Default: <command>available = yes</command></para>
1239                 
1240                 </listitem>
1241                 </varlistentry>
1242                 
1243
1244
1245                 <varlistentry>
1246                 <term><anchor id="BINDINTERFACESONLY">bind interfaces only (G)</term>
1247                 <listitem><para>This global parameter allows the Samba admin 
1248                 to limit what interfaces on a machine will serve SMB requests. If 
1249                 affects file service <ulink url="smbd.8.html">smbd(8)</ulink> and 
1250                 name service <ulink url="nmbd.8.html">nmbd(8)</ulink> in slightly 
1251                 different ways.</para>
1252
1253                 <para>For name service it causes <command>nmbd</command> to bind 
1254                 to ports 137 and 138 on the interfaces listed in the <link 
1255                 linkend="INTERFACES">interfaces</link> parameter. <command>nmbd
1256                 </command> also binds to the "all addresses" interface (0.0.0.0) 
1257                 on ports 137 and 138 for the purposes of reading broadcast messages. 
1258                 If this option is not set then <command>nmbd</command> will service 
1259                 name requests on all of these sockets. If <parameter>bind interfaces
1260                 only</parameter> is set then <command>nmbd</command> will check the 
1261                 source address of any packets coming in on the broadcast sockets 
1262                 and discard any that don't match the broadcast addresses of the 
1263                 interfaces in the <parameter>interfaces</parameter> parameter list. 
1264                 As unicast packets are received on the other sockets it allows 
1265                 <command>nmbd</command> to refuse to serve names to machines that 
1266                 send packets that arrive through any interfaces not listed in the
1267                 <parameter>interfaces</parameter> list.  IP Source address spoofing
1268                 does defeat this simple check, however so it must not be used
1269                 seriously as a security feature for <command>nmbd</command>.</para>
1270
1271                 <para>For file service it causes <ulink url="smbd.8.html">smbd(8)</ulink>
1272                 to bind only to the interface list given in the <link linkend="INTERFACES">
1273                 interfaces</link> parameter. This restricts the networks that 
1274                 <command>smbd</command> will serve to packets coming in those 
1275                 interfaces.  Note that you should not use this parameter for machines 
1276                 that are serving PPP or other intermittent or non-broadcast network 
1277                 interfaces as it will not cope with non-permanent interfaces.</para>
1278
1279                 <para>If <parameter>bind interfaces only</parameter> is set then 
1280                 unless the network address <emphasis>127.0.0.1</emphasis> is added 
1281                 to the <parameter>interfaces</parameter> parameter list <ulink
1282                 url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink> 
1283                 and <ulink url="swat.8.html"><command>swat(8)</command></ulink> may 
1284                 not work as expected due to the reasons covered below.</para>
1285
1286                 <para>To change a users SMB password, the <command>smbpasswd</command>
1287                 by default connects to the <emphasis>localhost - 127.0.0.1</emphasis> 
1288                 address as an SMB client to issue the password change request. If 
1289                 <parameter>bind interfaces only</parameter> is set then unless the 
1290                 network address <emphasis>127.0.0.1</emphasis> is added to the
1291                 <parameter>interfaces</parameter> parameter list then <command>
1292                 smbpasswd</command> will fail to connect in it's default mode. 
1293                 <command>smbpasswd</command> can be forced to use the primary IP interface 
1294                 of the local host by using its <ulink url="smbpasswd.8.html#minusr">
1295                 <parameter>-r <replaceable>remote machine</replaceable></parameter>
1296                 </ulink> parameter, with <replaceable>remote machine</replaceable> set 
1297                 to the IP name of the primary interface of the local host.</para>
1298
1299                 <para>The <command>swat</command> status page tries to connect with
1300                 <command>smbd</command> and <command>nmbd</command> at the address 
1301                 <emphasis>127.0.0.1</emphasis> to determine if they are running.  
1302                 Not adding <emphasis>127.0.0.1</emphasis>  will cause <command>
1303                 smbd</command> and <command>nmbd</command> to always show
1304                 "not running" even if they really are.  This can prevent <command>
1305                 swat</command> from starting/stopping/restarting <command>smbd</command>
1306                 and <command>nmbd</command>.</para>
1307
1308                 <para>Default: <command>bind interfaces only = no</command></para>
1309                 
1310                 </listitem>
1311                 </varlistentry>
1312
1313
1314
1315                 <varlistentry>
1316                 <term><anchor id="BLOCKINGLOCKS">blocking locks (S)</term>
1317                 <listitem><para>This parameter controls the behavior of <ulink 
1318                 url="smbd.8.html">smbd(8)</ulink> when given a request by a client 
1319                 to obtain a byte range lock on a region of an open file, and the 
1320                 request has a time limit associated with it.</para>
1321                 
1322                 <para>If this parameter is set and the lock range requested 
1323                 cannot be immediately satisfied, Samba 2.2 will internally 
1324                 queue the lock request, and periodically attempt to obtain 
1325                 the lock until the timeout period expires.</para>
1326
1327                 <para>If this parameter is set to <constant>false</constant>, then 
1328                 Samba 2.2 will behave as previous versions of Samba would and 
1329                 will fail the lock request immediately if the lock range 
1330                 cannot be obtained.</para>
1331
1332                 <para>Default: <command>blocking locks = yes</command></para>
1333
1334                 </listitem>
1335                 </varlistentry>
1336                 
1337
1338
1339                 <varlistentry>
1340                 <term><anchor id="BROWSABLE">browsable (S)</term>
1341                 <listitem><para>See the <link linkend="BROWSEABLE"><parameter>
1342                 browseable</parameter></link>.</para></listitem>
1343                 </varlistentry>
1344                 
1345
1346
1347                 <varlistentry>
1348                 <term><anchor id="BROWSELIST">browse list (G)</term>
1349                 <listitem><para>This controls whether <ulink url="smbd.8.html">
1350                 <command>smbd(8)</command></ulink> will serve a browse list to 
1351                 a client doing a <command>NetServerEnum</command> call. Normally 
1352                 set to <constant>true</constant>. You should never need to change 
1353                 this.</para>
1354                 
1355                 <para>Default: <command>browse list = yes</command></para></listitem>
1356                 </varlistentry>
1357                 
1358
1359
1360                 <varlistentry>
1361                 <term><anchor id="BROWSEABLE">browseable (S)</term>
1362                 <listitem><para>This controls whether this share is seen in 
1363                 the list of available shares in a net view and in the browse list.</para>
1364
1365                 <para>Default: <command>browseable = yes</command></para>
1366                 </listitem>
1367                 </varlistentry>
1368                 
1369
1370
1371                 <varlistentry>
1372                 <term><anchor id="CASESENSITIVE">case sensitive (S)</term>
1373                 <listitem><para>See the discussion in the section <link 
1374                 linkend="NAMEMANGLINGSECT">NAME MANGLING</link>.</para>
1375                 
1376                 <para>Default: <command>case sensitive = no</command></para>
1377                 </listitem>
1378                 </varlistentry>
1379
1380
1381
1382                 <varlistentry>
1383                 <term><anchor id="CASESIGNAMES">casesignames (S)</term>
1384                 <listitem><para>Synonym for <link linkend="CASESENSITIVE">case 
1385                 sensitive</link>.</para></listitem>
1386                 </varlistentry>
1387                 
1388                 
1389                 
1390                 <varlistentry>
1391                 <term><anchor id="CHANGENOTIFYTIMEOUT">change notify timeout (G)</term>
1392                 <listitem><para>This SMB allows a client to tell a server to 
1393                 "watch" a particular directory for any changes and only reply to
1394                 the SMB request when a change has occurred. Such constant scanning of
1395                 a directory is expensive under UNIX, hence an <ulink url="smbd.8.html">
1396                 <command>smbd(8)</command></ulink> daemon only performs such a scan 
1397                 on each requested directory once every <parameter>change notify 
1398                 timeout</parameter> seconds.</para>
1399
1400                 <para>Default: <command>change notify timeout = 60</command></para>
1401                 <para>Example: <command>change notify timeout = 300</command></para>
1402
1403                 <para>Would change the scan time to every 5 minutes.</para></listitem>
1404                 </varlistentry>
1405                 
1406
1407
1408                 <varlistentry>
1409                 <term><anchor id="CHANGESHARECOMMAND">change share command (G)</term>
1410                 <listitem><para>Samba 2.2.0 introduced the ability to dynamically 
1411                 add and delete shares via the Windows NT 4.0 Server Manager.  The 
1412                 <parameter>change share command</parameter> is used to define an 
1413                 external program or script which will modify an existing service definition 
1414                 in <filename>smb.conf</filename>.  In order to successfully 
1415                 execute the <parameter>change share command</parameter>, <command>smbd</command>
1416                 requires that the administrator be connected using a root account (i.e. 
1417                 uid == 0).
1418                 </para>
1419                 
1420                 <para>
1421                 When executed, <command>smbd</command> will automatically invoke the 
1422                 <parameter>change share command</parameter> with four parameters.
1423                 </para>
1424                 
1425                 <itemizedlist>
1426                         <listitem><para><parameter>configFile</parameter> - the location 
1427                         of the global <filename>smb.conf</filename> file. 
1428                         </para></listitem>
1429                         
1430                         <listitem><para><parameter>shareName</parameter> - the name of the new 
1431                         share.
1432                         </para></listitem>
1433                         
1434                         <listitem><para><parameter>pathName</parameter> - path to an **existing**
1435                         directory on disk.
1436                         </para></listitem>
1437                         
1438                         <listitem><para><parameter>comment</parameter> - comment string to associate 
1439                         with the new share.
1440                         </para></listitem>
1441                 </itemizedlist>
1442                 
1443                 <para>
1444                 This parameter is only used modify existing file shares definitions.  To modify 
1445                 printer shares, use the "Printers..." folder as seen when browsing the Samba host.
1446                 </para>
1447                 
1448                 <para>
1449                 See also <link linkend="ADDSHARECOMMAND"><parameter>add share
1450                 command</parameter></link>, <link linkend="DELETESHARECOMMAND"><parameter>delete 
1451                 share command</parameter></link>.
1452                 </para>
1453                 
1454                 <para>Default: <emphasis>none</emphasis></para>
1455                 <para>Example: <command>change share command = /usr/local/bin/addshare</command></para>
1456                 </listitem>
1457                 </varlistentry>
1458
1459
1460                 
1461
1462                 
1463                 <varlistentry>
1464                 <term><anchor id="COMMENT">comment (S)</term>
1465                 <listitem><para>This is a text field that is seen next to a share 
1466                 when a client does a queries the server, either via the network 
1467                 neighborhood or via <command>net view</command> to list what shares 
1468                 are available.</para>
1469
1470                 <para>If you want to set the string that is displayed next to the 
1471                 machine name then see the <link linkend="SERVERSTRING"><parameter>
1472                 server string</parameter></link> parameter.</para>
1473
1474                 <para>Default: <emphasis>No comment string</emphasis></para>
1475                 <para>Example: <command>comment = Fred's Files</command></para></listitem>
1476                 </varlistentry>
1477                 
1478                 
1479                 
1480                 <varlistentry>
1481                 <term><anchor id="CONFIGFILE">config file (G)</term>
1482                 <listitem><para>This allows you to override the config file 
1483                 to use, instead of the default (usually <filename>smb.conf</filename>). 
1484                 There is a chicken and egg problem here as this option is set 
1485                 in the config file!</para>
1486
1487                 <para>For this reason, if the name of the config file has changed 
1488                 when the parameters are loaded then it will reload them from 
1489                 the new config file.</para>
1490
1491                 <para>This option takes the usual substitutions, which can 
1492                 be very useful.</para>
1493
1494                 <para>If the config file doesn't exist then it won't be loaded 
1495                 (allowing you to special case the config files of just a few 
1496                 clients).</para>
1497
1498                 <para>Example: <command>config file = /usr/local/samba/lib/smb.conf.%m
1499                 </command></para></listitem>
1500                 </varlistentry>
1501                 
1502                 
1503                 
1504                 <varlistentry>
1505                 <term><anchor id="COPY">copy (S)</term>
1506                 <listitem><para>This parameter allows you to "clone" service 
1507                 entries. The specified service is simply duplicated under the 
1508                 current service's name. Any parameters specified in the current 
1509                 section will override those in the section being copied.</para>
1510
1511                 <para>This feature lets you set up a 'template' service and 
1512                 create similar services easily. Note that the service being 
1513                 copied must occur earlier in the configuration file than the 
1514                 service doing the copying.</para>
1515
1516                 <para>Default: <emphasis>no value</emphasis></para>
1517                 <para>Example: <command>copy = otherservice</command></para></listitem>
1518                 </varlistentry>
1519                 
1520                 
1521                 
1522                 <varlistentry>
1523                 <term><anchor id="CREATEMASK">create mask (S)</term>
1524                 <listitem><para>A synonym for this parameter is 
1525                 <link linkend="CREATEMODE"><parameter>create mode</parameter>
1526                 </link>.</para>
1527
1528                 <para>When a file is created, the necessary permissions are 
1529                 calculated according to the mapping from DOS modes to UNIX 
1530                 permissions, and the resulting UNIX mode is then bit-wise 'AND'ed 
1531                 with this parameter. This parameter may be thought of as a bit-wise 
1532                 MASK for the UNIX modes of a file. Any bit <emphasis>not</emphasis> 
1533                 set here will be removed from the modes set on a file when it is 
1534                 created.</para>
1535
1536                 <para>The default value of this parameter removes the 
1537                 'group' and 'other' write and execute bits from the UNIX modes.</para>
1538
1539                 <para>Following this Samba will bit-wise 'OR' the UNIX mode created 
1540                 from this parameter with the value of the <link
1541                 linkend="FORCECREATEMODE"><parameter>force create mode</parameter></link>
1542                 parameter which is set to 000 by default.</para>
1543
1544                 <para>This parameter does not affect directory modes. See the 
1545                 parameter <link linkend="DIRECTORYMODE"><parameter>directory mode
1546                 </parameter></link> for details.</para>
1547
1548                 <para>See also the <link linkend="FORCECREATEMODE"><parameter>force 
1549                 create mode</parameter></link> parameter for forcing particular mode 
1550                 bits to be set on created files. See also the <link linkend="DIRECTORYMODE">
1551                 <parameter>directory mode</parameter></link> parameter for masking 
1552                 mode bits on created directories.  See also the <link linkend="INHERITPERMISSIONS">
1553                 <parameter>inherit permissions</parameter></link> parameter.</para>
1554
1555                 <para>Note that this parameter does not apply to permissions
1556                 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
1557                 a mask on access control lists also, they need to set the <link 
1558                 linkend="SECURITYMASK"><parameter>security mask</parameter></link>.</para>
1559
1560                 <para>Default: <command>create mask = 0744</command></para>
1561                 <para>Example: <command>create mask = 0775</command></para></listitem>
1562                 </varlistentry>
1563                 
1564                 
1565                 
1566                 <varlistentry>
1567                 <term><anchor id="CREATEMODE">create mode (S)</term>
1568                 <listitem><para>This is a synonym for <link linkend="CREATEMASK"><parameter>
1569                 create mask</parameter></link>.</para></listitem>
1570                 </varlistentry>
1571                 
1572                 
1573                 
1574                 <varlistentry>
1575                 <term><anchor id="DEADTIME">deadtime (G)</term>
1576                 <listitem><para>The value of the parameter (a decimal integer) 
1577                 represents the number of minutes of inactivity before a connection 
1578                 is considered dead, and it is disconnected. The deadtime only takes 
1579                 effect if the number of open files is zero.</para>
1580                 
1581                 <para>This is useful to stop a server's resources being 
1582                 exhausted by a large number of inactive connections.</para>
1583
1584                 <para>Most clients have an auto-reconnect feature when a 
1585                 connection is broken so in most cases this parameter should be 
1586                 transparent to users.</para>
1587
1588                 <para>Using this parameter with a timeout of a few minutes 
1589                 is recommended for most systems.</para>
1590
1591                 <para>A deadtime of zero indicates that no auto-disconnection 
1592                 should be performed.</para>
1593
1594                 <para>Default: <command>deadtime = 0</command></para>
1595                 <para>Example: <command>deadtime = 15</command></para></listitem>
1596                 </varlistentry>
1597
1598
1599
1600                 <varlistentry>
1601                 <term><anchor id="DEBUGHIRESTIMESTAMP">debug hires timestamp (G)</term>
1602                 <listitem><para>Sometimes the timestamps in the log messages 
1603                 are needed with a resolution of higher that seconds, this 
1604                 boolean parameter adds microsecond resolution to the timestamp 
1605                 message header when turned on.</para>
1606
1607                 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter>
1608                 debug timestamp</parameter></link> must be on for this to have an 
1609                 effect.</para>
1610
1611                 <para>Default: <command>debug hires timestamp = no</command></para>
1612                 </listitem>
1613                 </varlistentry>
1614                 
1615
1616
1617                 <varlistentry>
1618                 <term><anchor id="DEBUGPID">debug pid (G)</term>
1619                 <listitem><para>When using only one log file for more then one 
1620                 forked <ulink url="smbd.8.html">smbd</ulink>-process there may be hard to follow which process 
1621                 outputs which message. This boolean parameter is adds the process-id 
1622                 to the timestamp message headers in the logfile when turned on.</para>
1623
1624                 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter>
1625                 debug timestamp</parameter></link> must be on for this to have an 
1626                 effect.</para>
1627
1628                 <para>Default: <command>debug pid = no</command></para></listitem>
1629                 </varlistentry>
1630
1631
1632                 <varlistentry>
1633                 <term><anchor id="DEBUGTIMESTAMP">debug timestamp (G)</term>
1634                 <listitem><para>Samba 2.2 debug log messages are timestamped 
1635                 by default. If you are running at a high <link linkend="DEBUGLEVEL">
1636                 <parameter>debug level</parameter></link> these timestamps
1637                 can be distracting. This boolean parameter allows timestamping 
1638                 to be turned off.</para>
1639
1640                 <para>Default: <command>debug timestamp = yes</command></para></listitem>
1641                 </varlistentry>
1642
1643
1644
1645                 <varlistentry>
1646                 <term><anchor id="DEBUGUID">debug uid (G)</term>
1647                 <listitem><para>Samba is sometimes run as root and sometime 
1648                 run as the connected user, this boolean parameter inserts the 
1649                 current euid, egid, uid and gid to the timestamp message headers 
1650                 in the log file if turned on.</para>
1651                 
1652                 <para>Note that the parameter <link linkend="DEBUGTIMESTAMP"><parameter>
1653                 debug timestamp</parameter></link> must be on for this to have an 
1654                 effect.</para>
1655
1656                 <para>Default: <command>debug uid = no</command></para></listitem>
1657                 </varlistentry>
1658
1659
1660
1661                 <varlistentry>
1662                 <term><anchor id="DEBUGLEVEL">debuglevel (G)</term>
1663                 <listitem><para>Synonym for <link linkend="LOGLEVEL"><parameter>
1664                 log level</parameter></link>.</para>
1665                 </listitem>
1666                 </varlistentry>
1667
1668
1669
1670                 <varlistentry>
1671                 <term><anchor id="DEFAULT">default (G)</term>
1672                 <listitem><para>A synonym for <link linkend="DEFAULTSERVICE"><parameter>
1673                 default service</parameter></link>.</para></listitem>
1674                 </varlistentry>
1675                 
1676                 
1677                 
1678                 <varlistentry>
1679                 <term><anchor id="DEFAULTCASE">default case (S)</term>
1680                 <listitem><para>See the section on <link linkend="NAMEMANGLINGSECT">
1681                 NAME MANGLING</link>. Also note the <link linkend="SHORTPRESERVECASE">
1682                 <parameter>short preserve case</parameter></link> parameter.</para>
1683
1684                 <para>Default: <command>default case = lower</command></para>
1685                 </listitem>
1686                 </varlistentry>
1687
1688
1689
1690                 <varlistentry>
1691                 <term><anchor id="DEFAULTDEVMODE">default devmode (S)</term>
1692                 <listitem><para>This parameter is only applicable to <link
1693                 linkend="PRINTOK">printable</link> services.  When smbd is serving
1694                 Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba
1695                 server has a Device Mode which defines things such as paper size and
1696                 orientation and duplex settings.  The device mode can only correctly be
1697                 generated by the printer driver itself (which can only be executed on a
1698                 Win32 platform).  Because smbd is unable to execute the driver code
1699                 to generate the device mode, the default behavior is to set this field
1700                 to NULL.
1701                 </para>
1702
1703                 <para>Most problems with serving printer drivers to Windows NT/2k/XP clients
1704                 can be traced to a problem with the generated device mode.  Certain drivers
1705                 will do things such as crashing the client's Explorer.exe with a NULL devmode.
1706                 However, other printer drivers can cause the client's spooler service
1707                 (spoolsv.exe) to die if the devmode was not created by the driver itself
1708                 (i.e. smbd generates a default devmode).
1709                 </para>
1710
1711                 <para>This parameter should be used with care and tested with the printer
1712                 driver in question.  It is better to leave the device mode to NULL
1713                 and let the Windows client set the correct values.  Because drivers do not
1714                 do this all the time, setting <command>default devmode = yes</command>
1715                 will instruct smbd to generate a default one.
1716                 </para>
1717
1718                 <para>For more information on Windows NT/2k printing and Device Modes,
1719                 see the <ulink url="http://msdn.microsoft.com/">MSDN documentation</ulink>.
1720                 </para>
1721
1722                 <para>Default: <command>default devmode = no</command></para>
1723                 </listitem>
1724                 </varlistentry>
1725
1726
1727
1728                 <varlistentry>
1729                 <term><anchor id="DEFAULTSERVICE">default service (G)</term>
1730                 <listitem><para>This parameter specifies the name of a service
1731                 which will be connected to if the service actually requested cannot
1732                 be found. Note that the square brackets are <emphasis>NOT</emphasis>
1733                 given in the parameter value (see example below).</para>
1734
1735                 <para>There is no default value for this parameter. If this 
1736                 parameter is not given, attempting to connect to a nonexistent 
1737                 service results in an error.</para>
1738
1739                 <para>Typically the default service would be a <link linkend="GUESTOK">
1740                 <parameter>guest ok</parameter></link>, <link linkend="READONLY">
1741                 <parameter>read-only</parameter></link> service.</para>
1742
1743                 <para>Also note that the apparent service name will be changed 
1744                 to equal that of the requested service, this is very useful as it 
1745                 allows you to use macros like <parameter>%S</parameter> to make 
1746                 a wildcard service.</para>
1747
1748                 <para>Note also that any "_" characters in the name of the service 
1749                 used in the default service will get mapped to a "/". This allows for
1750                 interesting things.</para>
1751
1752
1753                 <para>Example:</para>
1754                 
1755                 <para><programlisting>
1756 [global]
1757         default service = pub
1758         
1759 [pub]
1760         path = /%S
1761                 </programlisting></para>
1762                 </listitem>
1763                 </varlistentry>
1764                 
1765
1766
1767                 <varlistentry>
1768                 <term><anchor id="DELETEPRINTERCOMMAND">delete printer command (G)</term>
1769                 <listitem><para>With the introduction of MS-RPC based printer
1770                 support for Windows NT/2000 clients in Samba 2.2, it is now 
1771                 possible to delete printer at run time by issuing the 
1772                 DeletePrinter() RPC call.</para>
1773                 
1774                 <para>For a Samba host this means that the printer must be 
1775                 physically deleted from underlying printing system.  The <parameter>
1776                 deleteprinter command</parameter> defines a script to be run which 
1777                 will perform the necessary operations for removing the printer
1778                 from the print system and from <filename>smb.conf</filename>.
1779                 </para>
1780                 
1781                 <para>The <parameter>delete printer command</parameter> is 
1782                 automatically called with only one parameter: <parameter>
1783                 "printer name"</parameter>.</para>
1784                 
1785                                 
1786                 <para>Once the <parameter>delete printer command</parameter> has 
1787                 been executed, <command>smbd</command> will reparse the <filename>
1788                 smb.conf</filename> to associated printer no longer exists.  
1789                 If the sharename is still valid, then <command>smbd
1790                 </command> will return an ACCESS_DENIED error to the client.</para>
1791                 
1792                 <para>See also <link linkend="ADDPRINTERCOMMAND"><parameter>
1793                 add printer command</parameter></link>, <link 
1794                 linkend="printing"><parameter>printing</parameter></link>,
1795                 <link linkend="SHOWADDPRINTERWIZARD"><parameter>show add
1796                 printer wizard</parameter></link></para>
1797                 
1798                 <para>Default: <emphasis>none</emphasis></para>
1799                 <para>Example: <command>deleteprinter command = /usr/bin/removeprinter
1800                 </command></para>
1801                 </listitem>
1802                 </varlistentry>
1803
1804
1805
1806
1807
1808
1809                 <varlistentry>
1810                 <term><anchor id="DELETEREADONLY">delete readonly (S)</term>
1811                 <listitem><para>This parameter allows readonly files to be deleted.  
1812                 This is not normal DOS semantics, but is allowed by UNIX.</para>
1813                 
1814                 <para>This option may be useful for running applications such 
1815                 as rcs, where UNIX file ownership prevents changing file 
1816                 permissions, and DOS semantics prevent deletion of a read only file.</para>
1817
1818                 <para>Default: <command>delete readonly = no</command></para></listitem>
1819                 </varlistentry>
1820
1821
1822
1823                 <varlistentry>
1824                 <term><anchor id="DELETESHARECOMMAND">delete share command (G)</term>
1825                 <listitem><para>Samba 2.2.0 introduced the ability to dynamically 
1826                 add and delete shares via the Windows NT 4.0 Server Manager.  The 
1827                 <parameter>delete share command</parameter> is used to define an 
1828                 external program or script which will remove an existing service 
1829                 definition from <filename>smb.conf</filename>.  In order to successfully 
1830                 execute the <parameter>delete share command</parameter>, <command>smbd</command>
1831                 requires that the administrator be connected using a root account (i.e. 
1832                 uid == 0).
1833                 </para>
1834                 
1835                 <para>
1836                 When executed, <command>smbd</command> will automatically invoke the 
1837                 <parameter>delete share command</parameter> with two parameters.
1838                 </para>
1839                 
1840                 <itemizedlist>
1841                         <listitem><para><parameter>configFile</parameter> - the location 
1842                         of the global <filename>smb.conf</filename> file. 
1843                         </para></listitem>
1844                         
1845                         <listitem><para><parameter>shareName</parameter> - the name of 
1846                         the existing service.
1847                         </para></listitem>
1848                 </itemizedlist>
1849                 
1850                 <para>
1851                 This parameter is only used to remove file shares.  To delete printer shares, 
1852                 see the <link linkend="DELETEPRINTERCOMMAND"><parameter>delete printer 
1853                 command</parameter></link>.
1854                 </para>
1855                 
1856                 <para>
1857                 See also <link linkend="ADDSHARECOMMAND"><parameter>add share
1858                 command</parameter></link>, <link linkend="CHANGESHARECOMMAND"><parameter>change 
1859                 share command</parameter></link>.
1860                 </para>
1861                 
1862                 <para>Default: <emphasis>none</emphasis></para>
1863                 <para>Example: <command>delete share command = /usr/local/bin/delshare</command></para>
1864                 
1865                 </listitem>
1866                 </varlistentry>
1867
1868
1869                 
1870                 
1871                 <varlistentry>
1872                 <term><anchor id="DELETEUSERSCRIPT">delete user script (G)</term>
1873                 <listitem><para>This is the full pathname to a script that will 
1874                 be run <emphasis>AS ROOT</emphasis> by <ulink url="smbd.8.html">
1875                 <command>smbd(8)</command></ulink> under special circumstances 
1876                 described below.</para>
1877
1878                 <para>Normally, a Samba server requires that UNIX users are 
1879                 created for all users accessing files on this server. For sites 
1880                 that use Windows NT account databases as their primary user database 
1881                 creating these users and keeping the user list in sync with the 
1882                 Windows NT PDC is an onerous task. This option allows <command>
1883                 smbd</command> to delete the required UNIX users <emphasis>ON 
1884                 DEMAND</emphasis> when a user accesses the Samba server and the 
1885                 Windows NT user no longer exists.</para>
1886                 
1887                 <para>In order to use this option, <command>smbd</command> must be 
1888                 set to <parameter>security = domain</parameter> or <parameter>security =
1889                 user</parameter> and <parameter>delete user script</parameter> 
1890                 must be set to a full pathname for a script 
1891                 that will delete a UNIX user given one argument of <parameter>%u</parameter>, 
1892                 which expands into the UNIX user name to delete.</para>
1893
1894                 <para>When the Windows user attempts to access the Samba server, 
1895                 at <emphasis>login</emphasis> (session setup in the SMB protocol) 
1896                 time, <command>smbd</command> contacts the <link linkend="PASSWORDSERVER">
1897                 <parameter>password server</parameter></link> and attempts to authenticate 
1898                 the given user with the given password. If the authentication fails 
1899                 with the specific Domain error code meaning that the user no longer 
1900                 exists then <command>smbd</command> attempts to find a UNIX user in 
1901                 the UNIX password database that matches the Windows user account. If 
1902                 this lookup succeeds, and <parameter>delete user script</parameter> is 
1903                 set then <command>smbd</command> will all the specified script 
1904                 <emphasis>AS ROOT</emphasis>, expanding any <parameter>%u</parameter> 
1905                 argument to be the user name to delete.</para>
1906
1907                 <para>This script should delete the given UNIX username. In this way, 
1908                 UNIX users are dynamically deleted to match existing Windows NT 
1909                 accounts.</para>
1910
1911                 <para>See also <link linkend="SECURITYEQUALSDOMAIN">security = domain</link>,
1912                 <link linkend="PASSWORDSERVER"><parameter>password server</parameter>
1913                 </link>, <link linkend="ADDUSERSCRIPT"><parameter>add user script</parameter>
1914                 </link>.</para>
1915
1916                 <para>Default: <command>delete user script = &lt;empty string&gt;
1917                 </command></para>
1918                 <para>Example: <command>delete user script = /usr/local/samba/bin/del_user 
1919                 %u</command></para></listitem>
1920                 </varlistentry>
1921
1922
1923
1924
1925
1926                 <varlistentry>
1927                 <term><anchor id="DELETEVETOFILES">delete veto files (S)</term>
1928                 <listitem><para>This option is used when Samba is attempting to 
1929                 delete a directory that contains one or more vetoed directories 
1930                 (see the <link linkend="VETOFILES"><parameter>veto files</parameter></link>
1931                 option).  If this option is set to <constant>false</constant> (the default) then if a vetoed 
1932                 directory contains any non-vetoed files or directories then the 
1933                 directory delete will fail. This is usually what you want.</para>
1934
1935                 <para>If this option is set to <constant>true</constant>, then Samba 
1936                 will attempt to recursively delete any files and directories within 
1937                 the vetoed directory. This can be useful for integration with file 
1938                 serving systems such as NetAtalk which create meta-files within 
1939                 directories you might normally veto DOS/Windows users from seeing 
1940                 (e.g. <filename>.AppleDouble</filename>)</para>
1941
1942                 <para>Setting <command>delete veto files = yes</command> allows these 
1943                 directories to be  transparently deleted when the parent directory 
1944                 is deleted (so long as the user has permissions to do so).</para>
1945
1946                 <para>See also the <link linkend="VETOFILES"><parameter>veto 
1947                 files</parameter></link> parameter.</para>
1948
1949                 <para>Default: <command>delete veto files = no</command></para></listitem>
1950                 </varlistentry>
1951
1952
1953
1954
1955                 <varlistentry>
1956                 <term><anchor id="DENYHOSTS">deny hosts (S)</term>
1957                 <listitem><para>Synonym for <link linkend="HOSTSDENY"><parameter>hosts 
1958                 deny</parameter></link>.</para></listitem>
1959                 </varlistentry>
1960
1961                 
1962                 
1963                 
1964                 <varlistentry>
1965                 <term><anchor id="DFREECOMMAND">dfree command (G)</term>
1966                 <listitem><para>The <parameter>dfree command</parameter> setting should 
1967                 only be used on systems where a problem occurs with the internal 
1968                 disk space calculations. This has been known to happen with Ultrix, 
1969                 but may occur with other operating systems. The symptom that was 
1970                 seen was an error of "Abort Retry Ignore" at the end of each 
1971                 directory listing.</para>
1972                 
1973                 <para>This setting allows the replacement of the internal routines to
1974                 calculate the total disk space and amount available with an external
1975                 routine. The example below gives a possible script that might fulfill
1976                 this function.</para>
1977
1978                 <para>The external program will be passed a single parameter indicating 
1979                 a directory in the filesystem being queried. This will typically consist
1980                 of the string <filename>./</filename>. The script should return two 
1981                 integers in ASCII. The first should be the total disk space in blocks, 
1982                 and the second should be the number of available blocks. An optional 
1983                 third return value can give the block size in bytes. The default 
1984                 blocksize is 1024 bytes.</para>
1985
1986                 <para>Note: Your script should <emphasis>NOT</emphasis> be setuid or 
1987                 setgid and should be owned by (and writeable only by) root!</para>
1988
1989                 <para>Default: <emphasis>By default internal routines for 
1990                 determining the disk capacity and remaining space will be used.
1991                 </emphasis></para>
1992
1993                 <para>Example: <command>dfree command = /usr/local/samba/bin/dfree
1994                 </command></para>
1995
1996                 <para>Where the script dfree (which must be made executable) could be:</para>
1997
1998                 <para><programlisting> 
1999                 #!/bin/sh
2000                 df $1 | tail -1 | awk '{print $2" "$4}'
2001                 </programlisting></para>
2002
2003                 <para>or perhaps (on Sys V based systems):</para>
2004
2005                 <para><programlisting> 
2006                 #!/bin/sh
2007                 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
2008                 </programlisting></para>
2009                 
2010                 <para>Note that you may have to replace the command names 
2011                 with full path names on some systems.</para>
2012                 </listitem>
2013                 </varlistentry>
2014                 
2015                 
2016                 
2017                 
2018                 <varlistentry>
2019                 <term><anchor id="DIRECTORY">directory (S)</term>
2020                 <listitem><para>Synonym for <link linkend="PATH"><parameter>path
2021                 </parameter></link>.</para></listitem>
2022                 </varlistentry>
2023                 
2024                 
2025                 
2026                 <varlistentry>
2027                 <term><anchor id="DIRECTORYMASK">directory mask (S)</term>
2028                 <listitem><para>This parameter is the octal modes which are 
2029                 used when converting DOS modes to UNIX modes when creating UNIX 
2030                 directories.</para>
2031
2032                 <para>When a directory is created, the necessary permissions are 
2033                 calculated according to the mapping from DOS modes to UNIX permissions, 
2034                 and the resulting UNIX mode is then bit-wise 'AND'ed with this 
2035                 parameter. This parameter may be thought of as a bit-wise MASK for 
2036                 the UNIX modes of a directory. Any bit <emphasis>not</emphasis> set 
2037                 here will be removed from the modes set on a directory when it is 
2038                 created.</para>
2039
2040                 <para>The default value of this parameter removes the 'group' 
2041                 and 'other' write bits from the UNIX mode, allowing only the 
2042                 user who owns the directory to modify it.</para>
2043                 
2044                 <para>Following this Samba will bit-wise 'OR' the UNIX mode 
2045                 created from this parameter with the value of the <link
2046                 linkend="FORCEDIRECTORYMODE"><parameter>force directory mode
2047                 </parameter></link> parameter. This parameter is set to 000 by 
2048                 default (i.e. no extra mode bits are added).</para>
2049
2050                 <para>Note that this parameter does not apply to permissions
2051                 set by Windows NT/2000 ACL editors. If the administrator wishes to enforce
2052                 a mask on access control lists also, they need to set the <link 
2053                 linkend="DIRECTORYSECURITYMASK"><parameter>directory security mask</parameter></link>.</para>
2054
2055                 <para>See the <link linkend="FORCEDIRECTORYMODE"><parameter>force 
2056                 directory mode</parameter></link> parameter to cause particular mode 
2057                 bits to always be set on created directories.</para>
2058
2059                 <para>See also the <link linkend="CREATEMODE"><parameter>create mode
2060                 </parameter></link> parameter for masking mode bits on created files, 
2061                 and the <link linkend="DIRECTORYSECURITYMASK"><parameter>directory 
2062                 security mask</parameter></link> parameter.</para>
2063
2064                 <para>Also refer to the <link linkend="INHERITPERMISSIONS"><parameter>
2065                 inherit permissions</parameter></link> parameter.</para>
2066
2067                 <para>Default: <command>directory mask = 0755</command></para>
2068                 <para>Example: <command>directory mask = 0775</command></para>
2069                 </listitem>
2070                 </varlistentry>
2071
2072
2073
2074                 <varlistentry>
2075                 <term><anchor id="DIRECTORYMODE">directory mode (S)</term>
2076                 <listitem><para>Synonym for <link linkend="DIRECTORYMASK"><parameter>
2077                 directory mask</parameter></link></para></listitem>
2078                 </varlistentry>
2079                 
2080                 
2081                 
2082                 <varlistentry>
2083                 <term><anchor id="DIRECTORYSECURITYMASK">directory security mask (S)</term>
2084                 <listitem><para>This parameter controls what UNIX permission bits 
2085                 can be modified when a Windows NT client is manipulating the UNIX 
2086                 permission on a directory using the native NT security dialog 
2087                 box.</para>
2088
2089                 <para>This parameter is applied as a mask (AND'ed with) to 
2090                 the changed permission bits, thus preventing any bits not in 
2091                 this mask from being modified. Essentially, zero bits in this 
2092                 mask may be treated as a set of bits the user is not allowed 
2093                 to change.</para>
2094
2095                 <para>If not set explicitly this parameter is set to 0777
2096                 meaning a user is allowed to modify all the user/group/world
2097                 permissions on a directory.</para>
2098
2099                 <para><emphasis>Note</emphasis> that users who can access the 
2100                 Samba server through other means can easily bypass this restriction, 
2101                 so it is primarily useful for standalone "appliance" systems.  
2102                 Administrators of most normal systems will probably want to leave
2103                 it as the default of <constant>0777</constant>.</para>
2104
2105                 <para>See also the <link linkend="FORCEDIRECTORYSECURITYMODE"><parameter>
2106                 force directory security mode</parameter></link>, <link
2107                 linkend="SECURITYMASK"><parameter>security mask</parameter></link>, 
2108                 <link linkend="FORCESECURITYMODE"><parameter>force security mode
2109                 </parameter></link> parameters.</para>
2110
2111                 <para>Default: <command>directory security mask = 0777</command></para>
2112                 <para>Example: <command>directory security mask = 0700</command></para>
2113                 </listitem>
2114                 </varlistentry>
2115
2116
2117
2118                 <varlistentry>
2119                 <term><anchor id="DISABLESPOOLSS">disable spoolss (G)</term>
2120                 <listitem><para>Enabling this parameter will disables Samba's support
2121                 for the SPOOLSS set of MS-RPC's and will yield identical behavior
2122                 as Samba 2.0.x.  Windows NT/2000 clients will downgrade to using
2123                 Lanman style printing commands. Windows 9x/ME will be uneffected by
2124                 the parameter. However, this will also disable the ability to upload
2125                 printer drivers to a Samba server via the Windows NT Add Printer
2126                 Wizard or by using the NT printer properties dialog window.  It will
2127                 also disable the capability of Windows NT/2000 clients to download
2128                 print drivers from the Samba host upon demand.
2129                 <emphasis>Be very careful about enabling this parameter.</emphasis>
2130                 </para>
2131
2132                 <para>See also <link linkend="USECLIENTDRIVER">use client driver</link>
2133                 </para>
2134  
2135                 <para>Default : <command>disable spoolss = no</command></para>
2136                 </listitem>
2137                 </varlistentry>
2138                 
2139                 
2140                 
2141                 <varlistentry>
2142                 <term><anchor id="DNSPROXY">dns proxy (G)</term>
2143                 <listitem><para>Specifies that <ulink url="nmbd.8.html">nmbd(8)</ulink> 
2144                 when acting as a WINS server and finding that a NetBIOS name has not 
2145                 been registered, should treat the NetBIOS name word-for-word as a DNS 
2146                 name and do a lookup with the DNS server for that name on behalf of 
2147                 the name-querying client.</para>
2148
2149                 <para>Note that the maximum length for a NetBIOS name is 15 
2150                 characters, so the DNS name (or DNS alias) can likewise only be 
2151                 15 characters, maximum.</para>
2152
2153                 <para><command>nmbd</command> spawns a second copy of itself to do the
2154                 DNS name lookup requests, as doing a name lookup is a blocking 
2155                 action.</para>
2156
2157                 <para>See also the parameter <link linkend="WINSSUPPORT"><parameter>
2158                 wins support</parameter></link>.</para>
2159
2160                 <para>Default: <command>dns proxy = yes</command></para></listitem>
2161                 </varlistentry>
2162
2163
2164
2165                 <varlistentry>
2166                 <term><anchor id="DOMAINADMINGROUP">domain admin group (G)</term>
2167                 <listitem><para>This parameter is intended as a temporary solution
2168                 to enable users to be a member of the "Domain Admins" group when 
2169                 a Samba host is acting as a PDC.  A complete solution will be provided
2170                 by a system for mapping Windows NT/2000 groups onto UNIX groups.
2171                 Please note that this parameter has a somewhat confusing name.  It 
2172                 accepts a list of usernames and of group names in standard 
2173                 <filename>smb.conf</filename>   notation.
2174                 </para>
2175                 
2176                 <para>See also <link linkend="DOMAINGUESTGROUP"><parameter>domain
2177                 guest group</parameter></link>, <link linkend="DOMAINLOGONS"><parameter>domain
2178                 logons</parameter></link>
2179                 </para>
2180                 
2181                 <para>Default: <emphasis>no domain administrators</emphasis></para>
2182                 <para>Example: <command>domain admin group = root @wheel</command></para>
2183                 </listitem>
2184                 </varlistentry>
2185
2186
2187
2188
2189                 <varlistentry>
2190                 <term><anchor id="DOMAINGUESTGROUP">domain guest group (G)</term>
2191                 <listitem><para>This parameter is intended as a temporary solution
2192                 to enable users to be a member of the "Domain Guests" group when 
2193                 a Samba host is acting as a PDC.  A complete solution will be provided
2194                 by a system for mapping Windows NT/2000 groups onto UNIX groups.
2195                 Please note that this parameter has a somewhat confusing name.  It 
2196                 accepts a list of usernames and of group names in standard 
2197                 <filename>smb.conf</filename>   notation.
2198                 </para>
2199                 
2200                 <para>See also <link linkend="DOMAINADMINGROUP"><parameter>domain
2201                 admin group</parameter></link>, <link linkend="DOMAINLOGONS"><parameter>domain
2202                 logons</parameter></link>
2203                 </para>         
2204                 
2205                 <para>Default: <emphasis>no domain guests</emphasis></para>
2206                 <para>Example: <command>domain guest group = nobody @guest</command></para>
2207                 </listitem>
2208                 </varlistentry>
2209
2210
2211                 <varlistentry>
2212                 <term><anchor id="DOMAINLOGONS">domain logons (G)</term>
2213                 <listitem><para>If set to <constant>true</constant>, the Samba server will serve 
2214                 Windows 95/98 Domain logons for the <link linkend="WORKGROUP">
2215                 <parameter>workgroup</parameter></link> it is in. Samba 2.2 also 
2216                 has limited capability to act as a domain controller for Windows 
2217                 NT 4 Domains.  For more details on setting up this feature see 
2218                 the Samba-PDC-HOWTO included in the <filename>htmldocs/</filename>
2219                 directory shipped with the source code.</para>
2220                 
2221                 <para>Default: <command>domain logons = no</command></para></listitem>
2222                 </varlistentry>
2223                 
2224                 
2225                 
2226                 <varlistentry>
2227                 <term><anchor id="DOMAINMASTER">domain master (G)</term>
2228                 <listitem><para>Tell <ulink url="nmbd.8.html"><command>
2229                 nmbd(8)</command></ulink> to enable WAN-wide browse list
2230                 collation. Setting this option causes <command>nmbd</command> to
2231                 claim a special domain specific NetBIOS name that identifies 
2232                 it as a domain master browser for its given <link linkend="WORKGROUP">
2233                 <parameter>workgroup</parameter></link>. Local master browsers 
2234                 in the same <parameter>workgroup</parameter> on broadcast-isolated 
2235                 subnets will give this <command>nmbd</command> their local browse lists, 
2236                 and then ask <ulink url="smbd.8.html"><command>smbd(8)</command></ulink> 
2237                 for a complete copy of the browse list for the whole wide area 
2238                 network.  Browser clients will then contact their local master browser, 
2239                 and will receive the domain-wide browse list, instead of just the list 
2240                 for their broadcast-isolated subnet.</para>
2241
2242                 <para>Note that Windows NT Primary Domain Controllers expect to be 
2243                 able to claim this <parameter>workgroup</parameter> specific special 
2244                 NetBIOS name that identifies them as domain master browsers for 
2245                 that <parameter>workgroup</parameter> by default (i.e. there is no 
2246                 way to prevent a Windows NT PDC from attempting to do this). This 
2247                 means that if this parameter is set and <command>nmbd</command> claims 
2248                 the special name for a <parameter>workgroup</parameter> before a Windows 
2249                 NT PDC is able to do so then cross subnet browsing will behave 
2250                 strangely and may fail.</para>
2251                 
2252                 <para>If <link linkend="DOMAINLOGONS"><command>domain logons = yes</command>
2253                 </link>, then the default behavior is to enable the <parameter>domain 
2254                 master</parameter> parameter.  If <parameter>domain logons</parameter> is 
2255                 not enabled (the default setting), then neither will <parameter>domain 
2256                 master</parameter> be enabled by default.</para>
2257
2258                 <para>Default: <command>domain master = auto</command></para></listitem>
2259                 </varlistentry>
2260                 
2261                 
2262                 
2263                 
2264                 <varlistentry>
2265                 <term><anchor id="DONTDESCEND">dont descend (S)</term>
2266                 <listitem><para>There are certain directories on some systems 
2267                 (e.g., the <filename>/proc</filename> tree under Linux) that are either not 
2268                 of interest to clients or are infinitely deep (recursive). This 
2269                 parameter allows you to specify a comma-delimited list of directories 
2270                 that the server should always show as empty.</para>
2271
2272                 <para>Note that Samba can be very fussy about the exact format 
2273                 of the "dont descend" entries. For example you may need <filename>
2274                 ./proc</filename> instead of just <filename>/proc</filename>. 
2275                 Experimentation is the best policy :-)  </para>
2276                 
2277                 <para>Default: <emphasis>none (i.e., all directories are OK 
2278                 to descend)</emphasis></para>
2279                 <para>Example: <command>dont descend = /proc,/dev</command></para>
2280                 </listitem>
2281                 </varlistentry>
2282                 
2283
2284
2285                 <varlistentry>
2286                 <term><anchor id="DOSFILEMODE">dos filemode (S)</term>
2287                 <listitem><para> The default behavior in Samba is to provide 
2288                 UNIX-like behavior where only the owner of a file/directory is 
2289                 able to change the permissions on it.  However, this behavior
2290                 is often confusing to  DOS/Windows users.  Enabling this parameter 
2291                 allows a user who has write access to the file (by whatever 
2292                 means) to modify the permissions on it.  Note that a user
2293                 belonging to the group owning the file will not be allowed to
2294                 change permissions if the group is only granted read access.
2295                 Ownership of the file/directory is not changed, only the permissions 
2296                 are modified.</para>
2297                 
2298                 <para>Default: <command>dos filemode = no</command></para>
2299                 </listitem>
2300                 </varlistentry>
2301
2302                 
2303                 
2304                 <varlistentry>
2305                 <term><anchor id="DOSFILETIMERESOLUTION">dos filetime resolution (S)</term>
2306                 <listitem><para>Under the DOS and Windows FAT filesystem, the finest 
2307                 granularity on time resolution is two seconds. Setting this parameter 
2308                 for a share causes Samba to round the reported time down to the 
2309                 nearest two second boundary when a query call that requires one second 
2310                 resolution is made to <ulink url="smbd.8.html"><command>smbd(8)</command>
2311                 </ulink>.</para>
2312
2313                 <para>This option is mainly used as a compatibility option for Visual 
2314                 C++ when used against Samba shares. If oplocks are enabled on a 
2315                 share, Visual C++ uses two different time reading calls to check if a 
2316                 file has changed since it was last read. One of these calls uses a
2317                 one-second granularity, the other uses a two second granularity. As
2318                 the two second call rounds any odd second down, then if the file has a
2319                 timestamp of an odd number of seconds then the two timestamps will not
2320                 match and Visual C++ will keep reporting the file has changed. Setting
2321                 this option causes the two timestamps to match, and Visual C++ is
2322                 happy.</para>
2323
2324                 <para>Default: <command>dos filetime resolution = no</command></para>
2325                 </listitem>
2326                 </varlistentry>
2327
2328
2329
2330                 <varlistentry>
2331                 <term><anchor id="DOSFILETIMES">dos filetimes (S)</term>
2332                 <listitem><para>Under DOS and Windows, if a user can write to a 
2333                 file they can change the timestamp on it. Under POSIX semantics, 
2334                 only the owner of the file or root may change the timestamp. By 
2335                 default, Samba runs with POSIX semantics and refuses to change the 
2336                 timestamp on a file if the user <command>smbd</command> is acting 
2337                 on behalf of is not the file owner. Setting this option to <constant>
2338                 true</constant> allows DOS semantics and <ulink url="smbd.8.html">smbd</ulink> will change the file 
2339                 timestamp as DOS requires.</para>
2340
2341                 <para>Default: <command>dos filetimes = no</command></para></listitem>
2342                 </varlistentry>
2343
2344                 
2345
2346                 <varlistentry>
2347                 <term><anchor id="ENCRYPTPASSWORDS">encrypt passwords (G)</term>
2348                 <listitem><para>This boolean controls whether encrypted passwords 
2349                 will be negotiated with the client. Note that Windows NT 4.0 SP3 and 
2350                 above and also Windows 98 will by default expect encrypted passwords 
2351                 unless a registry entry is changed. To use encrypted passwords in 
2352                 Samba see the file ENCRYPTION.txt in the Samba documentation 
2353                 directory <filename>docs/</filename> shipped with the source code.</para>
2354
2355                 <para>In order for encrypted passwords to work correctly
2356                 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink> must either 
2357                 have access to a local <ulink url="smbpasswd.5.html"><filename>smbpasswd(5)
2358                 </filename></ulink> file (see the <ulink url="smbpasswd.8.html"><command>
2359                 smbpasswd(8)</command></ulink> program for information on how to set up 
2360                 and maintain this file), or set the <link
2361                 linkend="SECURITY">security = [server|domain|ads]</link> parameter which 
2362                 causes <command>smbd</command> to authenticate against another 
2363                 server.</para>
2364                 
2365                 <para>Default: <command>encrypt passwords = yes</command></para></listitem>
2366                 </varlistentry>
2367
2368
2369                 <varlistentry>
2370                 <term><anchor id="ENHANCEDBROWSING">enhanced browsing (G)</term>
2371                 <listitem><para>This option enables a couple of enhancements to 
2372                 cross-subnet browse propagation that have been added in Samba 
2373                 but which are not standard in Microsoft implementations.  
2374                 </para>
2375
2376                 <para>The first enhancement to browse propagation consists of a regular
2377                 wildcard query to a Samba WINS server for all Domain Master Browsers,
2378                 followed by a browse synchronization with each of the returned
2379                 DMBs. The second enhancement consists of a regular randomised browse
2380                 synchronization with all currently known DMBs.</para>
2381
2382                 <para>You may wish to disable this option if you have a problem with empty
2383                 workgroups not disappearing from browse lists. Due to the restrictions
2384                 of the browse protocols these enhancements can cause a empty workgroup
2385                 to stay around forever which can be annoying.</para>
2386
2387                 <para>In general you should leave this option enabled as it makes
2388                 cross-subnet browse propagation much more reliable.</para>
2389
2390                 <para>Default: <command>enhanced browsing = yes</command></para>
2391                 </listitem>
2392                 </varlistentry>
2393
2394
2395                 <varlistentry>
2396                 <term><anchor id="ENUMPORTSCOMMAND">enumports command (G)</term>
2397                 <listitem><para>The concept of a "port" is fairly foreign
2398                 to UNIX hosts.  Under Windows NT/2000 print servers, a port
2399                 is associated with a port monitor and generally takes the form of
2400                 a local port (i.e. LPT1:, COM1:, FILE:) or a remote port
2401                 (i.e. LPD Port Monitor, etc...).  By default, Samba has only one
2402                 port defined--<constant>"Samba Printer Port"</constant>.  Under 
2403                 Windows NT/2000, all printers must have a valid port name.  
2404                 If you wish to have a list of ports displayed (<command>smbd
2405                 </command> does not use a port name for anything) other than 
2406                 the default <constant>"Samba Printer Port"</constant>, you 
2407                 can define <parameter>enumports command</parameter> to point to
2408                 a program which should generate a list of ports, one per line,
2409                 to standard output.  This listing will then be used in response
2410                 to the level 1 and 2 EnumPorts() RPC.</para>
2411                 
2412                 <para>Default: <emphasis>no enumports command</emphasis></para>
2413                 <para>Example: <command>enumports command = /usr/bin/listports
2414                 </command></para>
2415                 </listitem>
2416                 </varlistentry>
2417                 
2418                 <varlistentry>
2419                 <term><anchor id="EXEC">exec (S)</term>
2420                 <listitem><para>This is a synonym for <link linkend="PREEXEC">
2421                 <parameter>preexec</parameter></link>.</para></listitem>
2422                 </varlistentry>
2423
2424
2425
2426                 <varlistentry>
2427                 <term><anchor id="FAKEDIRECTORYCREATETIMES">fake directory create times (S)</term>
2428                 <listitem><para>NTFS and Windows VFAT file systems keep a create 
2429                 time for all files and directories. This is not the same as the 
2430                 ctime - status change time - that Unix keeps, so Samba by default 
2431                 reports the earliest of the various times Unix does keep. Setting 
2432                 this parameter for a share causes Samba to always report midnight 
2433                 1-1-1980 as the create time for directories.</para>
2434
2435                 <para>This option is mainly used as a compatibility option for 
2436                 Visual C++ when used against Samba shares. Visual C++ generated 
2437                 makefiles have the object directory as a dependency for each object 
2438                 file, and a make rule to create the directory. Also, when NMAKE 
2439                 compares timestamps it uses the creation time when examining a 
2440                 directory. Thus the object directory will be created if it does not 
2441                 exist, but once it does exist it will always have an earlier 
2442                 timestamp than the object files it contains.</para>
2443
2444                 <para>However, Unix time semantics mean that the create time 
2445                 reported by Samba will be updated whenever a file is created or 
2446                 or deleted in the directory.  NMAKE finds all object files in 
2447                 the object directory.  The timestamp of the last one built is then 
2448                 compared to the timestamp of the object directory.  If the 
2449                 directory's timestamp if newer, then all object files
2450                 will be rebuilt.  Enabling this option 
2451                 ensures directories always predate their contents and an NMAKE build 
2452                 will proceed as expected.</para>
2453
2454                 <para>Default: <command>fake directory create times = no</command></para>
2455                 </listitem>
2456                 </varlistentry>
2457
2458
2459
2460                 <varlistentry>
2461                 <term><anchor id="FAKEOPLOCKS">fake oplocks (S)</term>
2462                 <listitem><para>Oplocks are the way that SMB clients get permission 
2463                 from a server to locally cache file operations. If a server grants 
2464                 an oplock (opportunistic lock) then the client is free to assume 
2465                 that it is the only one accessing the file and it will aggressively 
2466                 cache file data. With some oplock types the client may even cache 
2467                 file open/close operations. This can give enormous performance benefits.
2468                 </para>
2469
2470                 <para>When you set <command>fake oplocks = yes</command>, <ulink 
2471                 url="smbd.8.html"><command>smbd(8)</command></ulink> will
2472                 always grant oplock requests no matter how many clients are using 
2473                 the file.</para>
2474
2475                 <para>It is generally much better to use the real <link 
2476                 linkend="OPLOCKS"><parameter>oplocks</parameter></link> support rather 
2477                 than this parameter.</para>
2478                 
2479                 <para>If you enable this option on all read-only shares or 
2480                 shares that you know will only be accessed from one client at a 
2481                 time such as physically read-only media like CDROMs, you will see 
2482                 a big performance improvement on many operations. If you enable 
2483                 this option on shares where multiple clients may be accessing the 
2484                 files read-write at the same time you can get data corruption. Use 
2485                 this option carefully!</para>
2486                 
2487                 <para>Default: <command>fake oplocks = no</command></para></listitem>
2488                 </varlistentry>
2489
2490
2491
2492                 <varlistentry>
2493                 <term><anchor id="FOLLOWSYMLINKS">follow symlinks (S)</term>
2494                 <listitem><para>This parameter allows the Samba administrator 
2495                 to stop <ulink url="smbd.8.html"><command>smbd(8)</command></ulink> 
2496                 from following symbolic links in a particular share. Setting this 
2497                 parameter to <constant>no</constant> prevents any file or directory 
2498                 that is a symbolic link from being followed (the user will get an 
2499                 error).  This option is very useful to stop users from adding a 
2500                 symbolic link to <filename>/etc/passwd</filename> in their home 
2501                 directory for instance.  However it will slow filename lookups 
2502                 down slightly.</para>
2503
2504                 <para>This option is enabled (i.e. <command>smbd</command> will 
2505                 follow symbolic links) by default.</para>
2506                 
2507                 <para>Default: <command>follow symlinks = yes</command></para></listitem>
2508                 </varlistentry>
2509                 
2510                 
2511                 
2512                 <varlistentry>
2513                 <term><anchor id="FORCECREATEMODE">force create mode (S)</term>
2514                 <listitem><para>This parameter specifies a set of UNIX mode bit 
2515                 permissions that will <emphasis>always</emphasis> be set on a 
2516                 file created by Samba. This is done by bitwise 'OR'ing these bits onto 
2517                 the mode bits of a file that is being created or having its 
2518                 permissions changed. The default for this parameter is (in octal) 
2519                 000. The modes in this parameter are bitwise 'OR'ed onto the file 
2520                 mode after the mask set in the <parameter>create mask</parameter> 
2521                 parameter is applied.</para>
2522                 
2523                 <para>See also the parameter <link linkend="CREATEMASK"><parameter>create 
2524                 mask</parameter></link> for details on masking mode bits on files.</para>
2525
2526                 <para>See also the <link linkend="INHERITPERMISSIONS"><parameter>inherit 
2527                 permissions</parameter></link> parameter.</para>
2528
2529                 <para>Default: <command>force create mode = 000</command></para>
2530                 <para>Example: <command>force create mode = 0755</command></para>
2531
2532                 <para>would force all created files to have read and execute 
2533                 permissions set for 'group' and 'other' as well as the 
2534                 read/write/execute bits set for the 'user'.</para>
2535                 </listitem>
2536                 </varlistentry>
2537
2538
2539
2540                 <varlistentry>
2541                 <term><anchor id="FORCEDIRECTORYMODE">force directory mode (S)</term>
2542                 <listitem><para>This parameter specifies a set of UNIX mode bit 
2543                 permissions that will <emphasis>always</emphasis> be set on a directory 
2544                 created by Samba. This is done by bitwise 'OR'ing these bits onto the 
2545                 mode bits of a directory that is being created. The default for this 
2546                 parameter is (in octal) 0000 which will not add any extra permission 
2547                 bits to a created directory. This operation is done after the mode 
2548                 mask in the parameter <parameter>directory mask</parameter> is 
2549                 applied.</para>
2550
2551                 <para>See also the parameter <link linkend="DIRECTORYMASK"><parameter>
2552                 directory mask</parameter></link> for details on masking mode bits 
2553                 on created directories.</para>
2554                 
2555                 <para>See also the <link linkend="INHERITPERMISSIONS"><parameter>
2556                 inherit permissions</parameter></link> parameter.</para>
2557
2558                 <para>Default: <command>force directory mode = 000</command></para>
2559                 <para>Example: <command>force directory mode = 0755</command></para>
2560
2561                 <para>would force all created directories to have read and execute
2562                 permissions set for 'group' and 'other' as well as the
2563                 read/write/execute bits set for the 'user'.</para>
2564                 </listitem>
2565                 </varlistentry>
2566                 
2567                 
2568                 
2569                 <varlistentry>
2570                 <term><anchor id="FORCEDIRECTORYSECURITYMODE">force directory 
2571                 security mode (S)</term>
2572                 <listitem><para>This parameter controls what UNIX permission bits 
2573                 can be modified when a Windows NT client is manipulating the UNIX 
2574                 permission on a directory using the native NT security dialog box.</para>
2575
2576                 <para>This parameter is applied as a mask (OR'ed with) to the 
2577                 changed permission bits, thus forcing any bits in this mask that 
2578                 the user may have modified to be on. Essentially, one bits in this 
2579                 mask may be treated as a set of bits that, when modifying security 
2580                 on a directory, the user has always set to be 'on'.</para>
2581
2582                 <para>If not set explicitly this parameter is 000, which 
2583                 allows a user to modify all the user/group/world permissions on a 
2584                 directory without restrictions.</para>
2585
2586                 <para><emphasis>Note</emphasis> that users who can access the 
2587                 Samba server through other means can easily bypass this restriction, 
2588                 so it is primarily useful for standalone "appliance" systems.  
2589                 Administrators of most normal systems will probably want to leave
2590                 it set as 0000.</para>
2591
2592                 <para>See also the <link linkend="DIRECTORYSECURITYMASK"><parameter>
2593                 directory security mask</parameter></link>, <link linkend="SECURITYMASK">
2594                 <parameter>security mask</parameter></link>, 
2595                 <link linkend="FORCESECURITYMODE"><parameter>force security mode
2596                 </parameter></link> parameters.</para>
2597
2598                 <para>Default: <command>force directory security mode = 0</command></para>
2599                 <para>Example: <command>force directory security mode = 700</command></para>
2600                 </listitem>
2601                 </varlistentry>
2602
2603
2604
2605
2606                 <varlistentry>
2607                 <term><anchor id="FORCEGROUP">force group (S)</term>
2608                 <listitem><para>This specifies a UNIX group name that will be 
2609                 assigned as the default primary group for all users connecting 
2610                 to this service. This is useful for sharing files by ensuring 
2611                 that all access to files on service will use the named group for 
2612                 their permissions checking. Thus, by assigning permissions for this 
2613                 group to the files and directories within this service the Samba 
2614                 administrator can restrict or allow sharing of these files.</para>
2615
2616                 <para>In Samba 2.0.5 and above this parameter has extended 
2617                 functionality in the following way. If the group name listed here 
2618                 has a '+' character prepended to it then the current user accessing 
2619                 the share only has the primary group default assigned to this group 
2620                 if they are already assigned as a member of that group. This allows 
2621                 an administrator to decide that only users who are already in a 
2622                 particular group will create files with group ownership set to that 
2623                 group. This gives a finer granularity of ownership assignment. For 
2624                 example, the setting <filename>force group = +sys</filename> means 
2625                 that only users who are already in group sys will have their default
2626                 primary group assigned to sys when accessing this Samba share. All
2627                 other users will retain their ordinary primary group.</para>
2628
2629                 <para>If the <link linkend="FORCEUSER"><parameter>force user
2630                 </parameter></link> parameter is also set the group specified in 
2631                 <parameter>force group</parameter> will override the primary group
2632                 set in <parameter>force user</parameter>.</para>
2633
2634                 <para>See also <link linkend="FORCEUSER"><parameter>force 
2635                 user</parameter></link>.</para>
2636
2637                 <para>Default: <emphasis>no forced group</emphasis></para>
2638                 <para>Example: <command>force group = agroup</command></para>
2639                 </listitem>
2640                 </varlistentry>
2641
2642
2643
2644                 <varlistentry>
2645                 <term><anchor id="FORCESECURITYMODE">force security mode (S)</term>
2646                 <listitem><para>This parameter controls what UNIX permission 
2647                 bits can be modified when a Windows NT client is manipulating 
2648                 the UNIX permission on a file using the native NT security dialog 
2649                 box.</para>
2650                 
2651                 <para>This parameter is applied as a mask (OR'ed with) to the 
2652                 changed permission bits, thus forcing any bits in this mask that 
2653                 the user may have modified to be on. Essentially, one bits in this 
2654                 mask may be treated as a set of bits that, when modifying security 
2655                 on a file, the user has always set to be 'on'.</para>
2656
2657                 <para>If not set explicitly this parameter is set to 0,
2658                 and allows a user to modify all the user/group/world permissions on a file,
2659                 with no restrictions.</para>
2660                 
2661                 <para><emphasis>Note</emphasis> that users who can access 
2662                 the Samba server through other means can easily bypass this restriction, 
2663                 so it is primarily useful for standalone "appliance" systems.  
2664                 Administrators of most normal systems will probably want to leave
2665                 this set to 0000.</para>
2666
2667                 <para>See also the <link linkend="FORCEDIRECTORYSECURITYMODE"><parameter>
2668                 force directory security mode</parameter></link>,
2669                 <link linkend="DIRECTORYSECURITYMASK"><parameter>directory security
2670                 mask</parameter></link>, <link linkend="SECURITYMASK"><parameter>
2671                 security mask</parameter></link> parameters.</para>
2672
2673                 <para>Default: <command>force security mode = 0</command></para>
2674                 <para>Example: <command>force security mode = 700</command></para>
2675                 </listitem>
2676                 </varlistentry>
2677                 
2678                 
2679                 
2680                 <varlistentry>
2681                 <term><anchor id="FORCEUSER">force user (S)</term>
2682                 <listitem><para>This specifies a UNIX user name that will be 
2683                 assigned as the default user for all users connecting to this service. 
2684                 This is useful for sharing files. You should also use it carefully 
2685                 as using it incorrectly can cause security problems.</para>
2686
2687                 <para>This user name only gets used once a connection is established. 
2688                 Thus clients still need to connect as a valid user and supply a 
2689                 valid password. Once connected, all file operations will be performed 
2690                 as the "forced user", no matter what username the client connected 
2691                 as.  This can be very useful.</para>
2692
2693                 <para>In Samba 2.0.5 and above this parameter also causes the 
2694                 primary group of the forced user to be used as the primary group 
2695                 for all file activity. Prior to 2.0.5 the primary group was left 
2696                 as the primary group of the connecting user (this was a bug).</para>
2697
2698                 <para>See also <link linkend="FORCEGROUP"><parameter>force group
2699                 </parameter></link></para>
2700
2701                 <para>Default: <emphasis>no forced user</emphasis></para>
2702                 <para>Example: <command>force user = auser</command></para>
2703                 </listitem>
2704                 </varlistentry>
2705
2706
2707
2708                 <varlistentry>
2709                 <term><anchor id="FSTYPE">fstype (S)</term>
2710                 <listitem><para>This parameter allows the administrator to 
2711                 configure the string that specifies the type of filesystem a share 
2712                 is using that is reported by <ulink url="smbd.8.html"><command>smbd(8)
2713                 </command></ulink> when a client queries the filesystem type
2714                 for a share. The default type is <constant>NTFS</constant> for 
2715                 compatibility with Windows NT but this can be changed to other 
2716                 strings such as <constant>Samba</constant> or <constant>FAT
2717                 </constant> if required.</para>
2718                 
2719                 <para>Default: <command>fstype = NTFS</command></para>
2720                 <para>Example: <command>fstype = Samba</command></para></listitem>
2721                 </varlistentry>
2722                 
2723                 
2724                 
2725                 <varlistentry>
2726                 <term><anchor id="GETWDCACHE">getwd cache (G)</term>
2727                 <listitem><para>This is a tuning option. When this is enabled a 
2728                 caching algorithm will be used to reduce the time taken for getwd() 
2729                 calls. This can have a significant impact on performance, especially 
2730                 when the <link linkend="WIDELINKS"><parameter>wide links</parameter>
2731                 </link>parameter is set to <constant>false</constant>.</para>
2732
2733                 <para>Default: <command>getwd cache = yes</command></para>
2734                 </listitem>
2735                 </varlistentry>
2736
2737
2738
2739                 <varlistentry>
2740                 <term><anchor id="GROUP">group (S)</term>
2741                 <listitem><para>Synonym for <link linkend="FORCEGROUP"><parameter>force 
2742                 group</parameter></link>.</para></listitem>
2743                 </varlistentry>
2744                 
2745                 
2746                 
2747                 <varlistentry>
2748                 <term><anchor id="GUESTACCOUNT">guest account (S)</term>
2749                 <listitem><para>This is a username which will be used for access 
2750                 to services which are specified as <link linkend="GUESTOK"><parameter>
2751                 guest ok</parameter></link> (see below). Whatever privileges this 
2752                 user has will be available to any client connecting to the guest service. 
2753                 Typically this user will exist in the password file, but will not
2754                 have a valid login. The user account "ftp" is often a good choice 
2755                 for this parameter. If a username is specified in a given service, 
2756                 the specified username overrides this one.</para>
2757
2758                 <para>One some systems the default guest account "nobody" may not 
2759                 be able to print. Use another account in this case. You should test 
2760                 this by trying to log in as your guest user (perhaps by using the 
2761                 <command>su -</command> command) and trying to print using the 
2762                 system print command such as <command>lpr(1)</command> or <command>
2763                 lp(1)</command>.</para>
2764                 
2765                 <para>Default: <emphasis>specified at compile time, usually 
2766                 "nobody"</emphasis></para>
2767
2768                 <para>Example: <command>guest account = ftp</command></para></listitem>
2769                 </varlistentry>
2770
2771                 
2772                 
2773                 <varlistentry>
2774                 <term><anchor id="GUESTOK">guest ok (S)</term>
2775                 <listitem><para>If this parameter is <constant>yes</constant> for 
2776                 a service, then no password is required to connect to the service. 
2777                 Privileges will be those of the <link linkend="GUESTACCOUNT"><parameter>
2778                 guest account</parameter></link>.</para>
2779
2780                 <para>See the section below on <link linkend="SECURITY"><parameter>
2781                 security</parameter></link> for more information about this option.
2782                 </para>
2783
2784                 <para>Default: <command>guest ok = no</command></para></listitem>
2785                 </varlistentry>
2786                 
2787                 
2788                 
2789                 <varlistentry>
2790                 <term><anchor id="GUESTONLY">guest only (S)</term>
2791                 <listitem><para>If this parameter is <constant>yes</constant> for 
2792                 a service, then only guest connections to the service are permitted. 
2793                 This parameter will have no effect if <link linkend="GUESTOK">
2794                 <parameter>guest ok</parameter></link> is not set for the service.</para>
2795
2796                 <para>See the section below on <link linkend="SECURITY"><parameter>
2797                 security</parameter></link> for more information about this option.
2798                 </para>
2799
2800                 <para>Default: <command>guest only = no</command></para></listitem>
2801                 </varlistentry>
2802
2803
2804                 
2805                 <varlistentry>
2806                 <term><anchor id="HIDEDOTFILES">hide dot files (S)</term>
2807                 <listitem><para>This is a boolean parameter that controls whether 
2808                 files starting with a dot appear as hidden files.</para>
2809
2810                 <para>Default: <command>hide dot files = yes</command></para></listitem>
2811                 </varlistentry>
2812
2813
2814         
2815                 <varlistentry>
2816                 <term><anchor id="HIDEFILES">hide files(S)</term>
2817                 <listitem><para>This is a list of files or directories that are not 
2818                 visible but are accessible.  The DOS 'hidden' attribute is applied 
2819                 to any files or directories that match.</para>
2820
2821                 <para>Each entry in the list must be separated by a '/', 
2822                 which allows spaces to be included in the entry.  '*'
2823                 and '?' can be used to specify multiple files or directories 
2824                 as in DOS wildcards.</para>
2825
2826                 <para>Each entry must be a Unix path, not a DOS path and must 
2827                 not include the Unix directory separator '/'.</para>
2828
2829                 <para>Note that the case sensitivity option is applicable 
2830                 in hiding files.</para>
2831                 
2832                 <para>Setting this parameter will affect the performance of Samba, 
2833                 as it will be forced to check all files and directories for a match 
2834                 as they are scanned.</para>
2835
2836                 <para>See also <link linkend="HIDEDOTFILES"><parameter>hide 
2837                 dot files</parameter></link>, <link linkend="VETOFILES"><parameter>
2838                 veto files</parameter></link> and <link linkend="CASESENSITIVE">
2839                 <parameter>case sensitive</parameter></link>.</para>
2840
2841                 <para>Default: <emphasis>no file are hidden</emphasis></para>
2842                 <para>Example: <command>hide files =
2843                 /.*/DesktopFolderDB/TrashFor%m/resource.frk/</command></para>
2844
2845                 <para>The above example is based on files that the Macintosh 
2846                 SMB client (DAVE) available from <ulink url="http://www.thursby.com"> 
2847                 Thursby</ulink> creates for internal use, and also still hides 
2848                 all files beginning with a dot.</para></listitem>
2849                 </varlistentry>
2850                 
2851                 
2852                 
2853                 <varlistentry>
2854                 <term><anchor id="HIDELOCALUSERS">hide local users(G)</term>
2855                 <listitem><para>This parameter toggles the hiding of local UNIX 
2856                 users (root, wheel, floppy, etc) from remote clients.</para>
2857
2858                 <para>Default: <command>hide local users = no</command></para></listitem>
2859                 </varlistentry>
2860
2861
2862
2863                 <varlistentry>
2864                 <term><anchor id="HIDEUNREADABLE">hide unreadable (S)</term>
2865                 <listitem><para>This parameter prevents clients from seeing the
2866                 existance of files that cannot be read. Defaults to off.</para>
2867
2868                 <para>Default: <command>hide unreadable = no</command></para></listitem>
2869                 </varlistentry>
2870
2871
2872
2873                 <varlistentry>
2874                 <term><anchor id="HOMEDIRMAP">homedir map (G)</term>
2875                 <listitem><para>If<link linkend="NISHOMEDIR"><parameter>nis homedir
2876                 </parameter></link> is <constant>true</constant>, and <ulink 
2877                 url="smbd.8.html"><command>smbd(8)</command></ulink> is also acting 
2878                 as a Win95/98 <parameter>logon server</parameter> then this parameter 
2879                 specifies the NIS (or YP) map from which the server for the user's 
2880                 home directory should be extracted.  At present, only the Sun 
2881                 auto.home map format is understood. The form of the map is:</para>
2882
2883                 <para><command>username server:/some/file/system</command></para>
2884
2885                 <para>and the program will extract the servername from before 
2886                 the first ':'.  There should probably be a better parsing system 
2887                 that copes with different map formats and also Amd (another 
2888                 automounter) maps.</para>
2889                 
2890                 <para><emphasis>NOTE :</emphasis>A working NIS client is required on 
2891                 the system for this option to work.</para>
2892
2893                 <para>See also <link linkend="NISHOMEDIR"><parameter>nis homedir</parameter>
2894                 </link>, <link linkend="DOMAINLOGONS"><parameter>domain logons</parameter>
2895                 </link>.</para>
2896
2897                 <para>Default: <command>homedir map = &lt;empty string&gt;</command></para>
2898                 <para>Example: <command>homedir map = amd.homedir</command></para>
2899                 </listitem>
2900                 </varlistentry>
2901
2902
2903
2904
2905         
2906                 <varlistentry>
2907                 <term><anchor id="HOSTMSDFS">host msdfs (G)</term>
2908                 <listitem><para>This boolean parameter is only available 
2909                 if Samba has been configured and compiled with the <command>
2910                 --with-msdfs</command> option. If set to <constant>yes</constant>, 
2911                 Samba will act as a Dfs server, and  allow Dfs-aware clients 
2912                 to browse Dfs trees hosted on the server.</para>
2913
2914                 <para>See also the <link linkend="MSDFSROOT"><parameter>
2915                 msdfs root</parameter></link> share  level  parameter.  For
2916                 more  information  on  setting  up a Dfs tree on Samba,
2917                 refer to <ulink url="msdfs_setup.html">msdfs_setup.html</ulink>.
2918                 </para>
2919                 
2920                 <para>Default: <command>host msdfs = no</command></para>
2921                 </listitem>
2922                 </varlistentry>
2923
2924         
2925                 <varlistentry>
2926                 <term><anchor id="HOSTSALLOW">hosts allow (S)</term>
2927                 <listitem><para>A synonym for this parameter is <parameter>allow 
2928                 hosts</parameter>.</para>
2929                 
2930                 <para>This parameter is a comma, space, or tab delimited 
2931                 set of hosts which are permitted to access a service.</para>
2932
2933                 <para>If specified in the [global] section then it will
2934                 apply to all services, regardless of whether the individual 
2935                 service has a different setting.</para>
2936
2937                 <para>You can specify the hosts by name or IP number. For 
2938                 example, you could restrict access to only the hosts on a 
2939                 Class C subnet with something like <command>allow hosts = 150.203.5.
2940                 </command>. The full syntax of the list is described in the man 
2941                 page <filename>hosts_access(5)</filename>. Note that this man
2942                 page may not be present on your system, so a brief description will
2943                 be given here also.</para>
2944
2945                 <para>Note that the localhost address 127.0.0.1 will always 
2946                 be allowed access unless specifically denied by a <link 
2947                 linkend="HOSTSDENY"><parameter>hosts deny</parameter></link> option.</para>
2948
2949                 <para>You can also specify hosts by network/netmask pairs and 
2950                 by netgroup names if your system supports netgroups. The 
2951                 <emphasis>EXCEPT</emphasis> keyword can also be used to limit a 
2952                 wildcard list. The following examples may provide some help:</para>
2953
2954                 <para>Example 1: allow all IPs in 150.203.*.*; except one</para>
2955
2956                 <para><command>hosts allow = 150.203. EXCEPT 150.203.6.66</command></para>
2957
2958                 <para>Example 2: allow hosts that match the given network/netmask</para>
2959
2960                 <para><command>hosts allow = 150.203.15.0/255.255.255.0</command></para>
2961
2962                 <para>Example 3: allow a couple of hosts</para>
2963
2964                 <para><command>hosts allow = lapland, arvidsjaur</command></para>
2965
2966                 <para>Example 4: allow only hosts in NIS netgroup "foonet", but 
2967                 deny access from one particular host</para>
2968
2969                 <para><command>hosts allow = @foonet</command></para>
2970
2971                 <para><command>hosts deny = pirate</command></para>
2972
2973                 <para>Note that access still requires suitable user-level passwords.</para>
2974
2975                 <para>See <ulink url="testparm.1.html"><command>testparm(1)</command>
2976                 </ulink> for a way of testing your host access to see if it does 
2977                 what you expect.</para>
2978
2979                 <para>Default: <emphasis>none (i.e., all hosts permitted access)
2980                 </emphasis></para>
2981                 
2982                 <para>Example: <command>allow hosts = 150.203.5. myhost.mynet.edu.au
2983                 </command></para>
2984                 </listitem>
2985                 </varlistentry>
2986
2987
2988
2989                 <varlistentry>
2990                 <term><anchor id="HOSTSDENY">hosts deny (S)</term>
2991                 <listitem><para>The opposite of <parameter>hosts allow</parameter> 
2992                 - hosts listed here are <emphasis>NOT</emphasis> permitted access to 
2993                 services unless the specific services have their own lists to override 
2994                 this one. Where the lists conflict, the <parameter>allow</parameter> 
2995                 list takes precedence.</para>
2996                 
2997                 <para>Default: <emphasis>none (i.e., no hosts specifically excluded)
2998                 </emphasis></para>
2999
3000                 <para>Example: <command>hosts deny = 150.203.4. badhost.mynet.edu.au
3001                 </command></para></listitem>
3002                 </varlistentry>
3003
3004
3005
3006                 <varlistentry>
3007                 <term><anchor id="HOSTSEQUIV">hosts equiv (G)</term>
3008                 <listitem><para>If this global parameter is a non-null string, 
3009                 it specifies the name of a file to read for the names of hosts 
3010                 and users who will be allowed access without specifying a password.
3011                 </para>
3012                 
3013                 <para>This is not be confused with <link linkend="HOSTSALLOW">
3014                 <parameter>hosts allow</parameter></link> which is about hosts 
3015                 access to services and is more useful for guest services. <parameter>
3016                 hosts equiv</parameter> may be useful for NT clients which will 
3017                 not supply passwords to Samba.</para>
3018
3019                 <para><emphasis>NOTE :</emphasis> The use of <parameter>hosts equiv
3020                 </parameter> can be a major security hole. This is because you are 
3021                 trusting the PC to supply the correct username. It is very easy to 
3022                 get a PC to supply a false username. I recommend that the 
3023                 <parameter>hosts equiv</parameter> option be only used if you really 
3024                 know what you are doing, or perhaps on a home network where you trust 
3025                 your spouse and kids. And only if you <emphasis>really</emphasis> trust 
3026                 them :-).</para>
3027                 
3028                 <para>Default: <emphasis>no host equivalences</emphasis></para>
3029                 <para>Example: <command>hosts equiv = /etc/hosts.equiv</command></para>
3030                 </listitem>
3031                 </varlistentry>
3032
3033
3034
3035                 <varlistentry>
3036                 <term><anchor id="INCLUDE">include (G)</term>
3037                 <listitem><para>This allows you to include one config file 
3038                 inside another.  The file is included literally, as though typed 
3039                 in place.</para>
3040
3041                 <para>It takes the standard substitutions, except <parameter>%u
3042                 </parameter>, <parameter>%P</parameter> and <parameter>%S</parameter>.
3043                 </para>
3044                 
3045                 <para>Default: <emphasis>no file included</emphasis></para>
3046                 <para>Example: <command>include = /usr/local/samba/lib/admin_smb.conf
3047                 </command></para></listitem>
3048                 </varlistentry>
3049
3050
3051
3052                 <varlistentry>
3053                 <term><anchor id="INHERITPERMISSIONS">inherit permissions (S)</term>
3054                 <listitem><para>The permissions on new files and directories 
3055                 are normally governed by <link linkend="CREATEMASK"><parameter>
3056                 create mask</parameter></link>, <link linkend="DIRECTORYMASK">
3057                 <parameter>directory mask</parameter></link>, <link 
3058                 linkend="FORCECREATEMODE"><parameter>force create mode</parameter>
3059                 </link> and <link linkend="FORCEDIRECTORYMODE"><parameter>force 
3060                 directory mode</parameter></link> but the boolean inherit 
3061                 permissions parameter overrides this.</para>
3062                 
3063                 <para>New directories inherit the mode of the parent directory,
3064                 including bits such as setgid.</para>
3065
3066                 <para>New files inherit their read/write bits from the parent 
3067                 directory.  Their execute bits continue to be determined by
3068                 <link linkend="MAPARCHIVE"><parameter>map archive</parameter>
3069                 </link>, <link linkend="MAPHIDDEN"><parameter>map hidden</parameter>
3070                 </link> and <link linkend="MAPSYSTEM"><parameter>map system</parameter>
3071                 </link> as usual.</para>
3072
3073                 <para>Note that the setuid bit is <emphasis>never</emphasis> set via 
3074                 inheritance (the code explicitly prohibits this).</para>
3075
3076                 <para>This can be particularly useful on large systems with 
3077                 many users, perhaps several thousand, to allow a single [homes] 
3078                 share to be used flexibly by each user.</para>
3079                 
3080                 <para>See also <link linkend="CREATEMASK"><parameter>create mask
3081                 </parameter></link>, <link linkend="DIRECTORYMASK"><parameter>
3082                 directory mask</parameter></link>, <link linkend="FORCECREATEMODE">
3083                 <parameter>force create mode</parameter></link> and <link
3084                 linkend="FORCEDIRECTORYMODE"><parameter>force directory mode</parameter>
3085                 </link>.</para>
3086
3087                 <para>Default: <command>inherit permissions = no</command></para>
3088                 </listitem>
3089                 </varlistentry>
3090                 
3091                 
3092                 
3093                 <varlistentry>
3094                 <term><anchor id="INTERFACES">interfaces (G)</term>
3095                 <listitem><para>This option allows you to override the default 
3096                 network interfaces list that Samba will use for browsing, name 
3097                 registration and other NBT traffic. By default Samba will query 
3098                 the kernel for the list of all active interfaces and use any 
3099                 interfaces except 127.0.0.1 that are broadcast capable.</para>
3100
3101                 <para>The option takes a list of interface strings. Each string 
3102                 can be in any of the following forms:</para>
3103
3104                 <itemizedlist>
3105                         <listitem><para>a network interface name (such as eth0). 
3106                         This may include shell-like wildcards so eth* will match 
3107                         any interface starting with the substring "eth"</para></listitem>
3108                         
3109                         <listitem><para>an IP address. In this case the netmask is 
3110                         determined from the list of interfaces obtained from the 
3111                         kernel</para></listitem>
3112                         
3113                         <listitem><para>an IP/mask pair. </para></listitem>
3114                         
3115                         <listitem><para>a broadcast/mask pair.</para></listitem>
3116                 </itemizedlist>
3117
3118                 <para>The "mask" parameters can either be a bit length (such 
3119                 as 24 for a C class network) or a full netmask in dotted 
3120                 decimal form.</para>
3121
3122                 <para>The "IP" parameters above can either be a full dotted 
3123                 decimal IP address or a hostname which will be looked up via 
3124                 the OS's normal hostname resolution mechanisms.</para>
3125
3126                 <para>For example, the following line:</para>
3127                 
3128                 <para><command>interfaces = eth0 192.168.2.10/24 192.168.3.10/255.255.255.0
3129                 </command></para>
3130
3131                 <para>would configure three network interfaces corresponding 
3132                 to the eth0 device and IP addresses 192.168.2.10 and 192.168.3.10. 
3133                 The netmasks of the latter two interfaces would be set to 255.255.255.0.</para>
3134
3135                 <para>See also <link linkend="BINDINTERFACESONLY"><parameter>bind 
3136                 interfaces only</parameter></link>.</para>
3137                 
3138                 <para>Default: <emphasis>all active interfaces except 127.0.0.1 
3139                 that are broadcast capable</emphasis></para>
3140                 </listitem>
3141                 </varlistentry>
3142                 
3143                 
3144                 
3145                 <varlistentry>
3146                 <term><anchor id="INVALIDUSERS">invalid users (S)</term>
3147                 <listitem><para>This is a list of users that should not be allowed 
3148                 to login to this service. This is really a <emphasis>paranoid</emphasis> 
3149                 check to absolutely ensure an improper setting does not breach 
3150                 your security.</para>
3151                 
3152                 <para>A name starting with a '@' is interpreted as an NIS 
3153                 netgroup first (if your system supports NIS), and then as a UNIX 
3154                 group if the name was not found in the NIS netgroup database.</para>
3155
3156                 <para>A name starting with '+' is interpreted only 
3157                 by looking in the UNIX group database. A name starting with 
3158                 '&' is interpreted only by looking in the NIS netgroup database 
3159                 (this requires NIS to be working on your system). The characters 
3160                 '+' and '&' may be used at the start of the name in either order 
3161                 so the value <parameter>+&amp;group</parameter> means check the 
3162                 UNIX group database, followed by the NIS netgroup database, and 
3163                 the value <parameter>&+group</parameter> means check the NIS
3164                 netgroup database, followed by the UNIX group database (the 
3165                 same as the '@' prefix).</para>
3166
3167                 <para>The current servicename is substituted for <parameter>%S</parameter>. 
3168                 This is useful in the [homes] section.</para>
3169
3170                 <para>See also <link linkend="VALIDUSERS"><parameter>valid users
3171                 </parameter></link>.</para>
3172
3173                 <para>Default: <emphasis>no invalid users</emphasis></para>
3174                 <para>Example: <command>invalid users = root fred admin @wheel
3175                 </command></para>
3176                 </listitem>
3177                 </varlistentry>
3178                 
3179                 
3180                 
3181                 <varlistentry>
3182                 <term><anchor id="KEEPALIVE">keepalive (G)</term>
3183                 <listitem><para>The value of the parameter (an integer) represents 
3184                 the number of seconds between <parameter>keepalive</parameter> 
3185                 packets. If this parameter is zero, no keepalive packets will be 
3186                 sent. Keepalive packets, if sent, allow the server to tell whether 
3187                 a client is still present and responding.</para>
3188
3189                 <para>Keepalives should, in general, not be needed if the socket 
3190                 being used has the SO_KEEPALIVE attribute set on it (see <link 
3191                 linkend="SOCKETOPTIONS"><parameter>socket options</parameter></link>). 
3192                 Basically you should only use this option if you strike difficulties.</para>
3193
3194                 <para>Default: <command>keepalive = 300</command></para>
3195                 <para>Example: <command>keepalive = 600</command></para>
3196                 </listitem>
3197                 </varlistentry>
3198
3199         
3200         
3201                 <varlistentry>
3202                 <term><anchor id="KERNELOPLOCKS">kernel oplocks (G)</term>
3203                 <listitem><para>For UNIXes that support kernel based <link
3204                 linkend="OPLOCKS"><parameter>oplocks</parameter></link>
3205                 (currently only IRIX and the Linux 2.4 kernel), this parameter 
3206                 allows the use of them to be turned on or off.</para>
3207
3208                 <para>Kernel oplocks support allows Samba <parameter>oplocks
3209                 </parameter> to be broken whenever a local UNIX process or NFS operation 
3210                 accesses a file that <ulink url="smbd.8.html"><command>smbd(8)</command>
3211                 </ulink> has oplocked. This allows complete data consistency between 
3212                 SMB/CIFS, NFS and local file access (and is a <emphasis>very</emphasis> 
3213                 cool feature :-).</para>
3214
3215                 <para>This parameter defaults to <constant>on</constant>, but is translated
3216                 to a no-op on systems that no not have the necessary kernel support.
3217                 You should never need to touch this parameter.</para>
3218
3219                 <para>See also the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
3220                 </link> and <link linkend="LEVEL2OPLOCKS"><parameter>level2 oplocks
3221                 </parameter></link> parameters.</para>
3222                 
3223                 <para>Default: <command>kernel oplocks = yes</command></para>
3224                 </listitem>
3225                 </varlistentry>
3226
3227
3228
3229
3230                 <varlistentry>
3231                 <term><anchor id="LANMANAUTH">lanman auth (G)</term>
3232                 <listitem><para>This parameter determines whether or not <ulink url="smbd.8.html">smbd</ulink> will
3233                 attempt to authenticate users using the LANMAN password hash.
3234                 If disabled, only clients which support NT password hashes (e.g. Windows 
3235                 NT/2000 clients, smbclient, etc... but not Windows 95/98 or the MS DOS 
3236                 network client) will be able to connect to the Samba host.</para>
3237                 
3238                 <para>Default : <command>lanman auth = yes</command></para>
3239                 </listitem>
3240                 </varlistentry>
3241
3242
3243
3244
3245
3246                 <varlistentry>
3247                 <term><anchor id="LARGEREADWRITE">large readwrite (G)</term>
3248                 <listitem><para>This parameter determines whether or not <ulink url="smbd.8.html">smbd</ulink>
3249                 supports the new 64k streaming read and write varient SMB requests introduced
3250                 with Windows 2000. Note that due to Windows 2000 client redirector bugs
3251                 this requires Samba to be running on a 64-bit capable operating system such
3252                 as IRIX, Solaris or a Linux 2.4 kernel. Can improve performance by 10% with
3253                 Windows 2000 clients. Defaults to on. Not as tested as some other Samba
3254                 code paths.
3255                 </para>
3256                 
3257                 <para>Default : <command>large readwrite = yes</command></para>
3258                 </listitem>
3259                 </varlistentry>
3260
3261
3262
3263                 <varlistentry>
3264                 <term><anchor id="LDAPADMINDN">ldap admin dn (G)</term>
3265                 <listitem><para>This parameter is only available if Samba has been
3266                 configure to include the <command>--with-ldapsam</command> option
3267                 at compile time. This option should be considered experimental and
3268                 under active development.
3269                 </para>
3270
3271                 <para>
3272                 The <parameter>ldap admin dn</parameter> defines the Distinguished 
3273                 Name (DN) name used by Samba to contact the <link linkend="LDAPSERVER">ldap
3274                 server</link> when retreiving user account information. The <parameter>ldap
3275                 admin dn</parameter> is used in conjunction with the admin dn password
3276                 stored in the <filename>private/secrets.tdb</filename> file.  See the
3277                 <ulink url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink> man
3278                 page for more information on how to accmplish this.
3279                 </para>
3280         
3281                 
3282                 <para>Default : <emphasis>none</emphasis></para>
3283                 </listitem>
3284                 </varlistentry>
3285
3286
3287
3288
3289                 <varlistentry>
3290                 <term><anchor id="LDAPFILTER">ldap filter (G)</term>
3291                 <listitem><para>This parameter is only available if Samba has been
3292                 configure to include the <command>--with-ldapsam</command> option
3293                 at compile time. This option should be considered experimental and
3294                 under active development.
3295                 </para>
3296
3297                 <para>
3298                 This parameter specifies the RFC 2254 compliant LDAP search filter.
3299                 The default is to match the login name with the <constant>uid</constant> 
3300                 attribute for all entries matching the <constant>sambaAccount</constant>                
3301                 objectclass.  Note that this filter should only return one entry.
3302                 </para>
3303         
3304                 
3305                 <para>Default : <command>ldap filter = (&(uid=%u)(objectclass=sambaAccount))</command></para>
3306                 </listitem>
3307                 </varlistentry>
3308
3309
3310
3311
3312                 <varlistentry>
3313                 <term><anchor id="LDAPPORT">ldap port (G)</term>
3314                 <listitem><para>This parameter is only available if Samba has been
3315                 configure to include the <command>--with-ldapsam</command> option
3316                 at compile time. This option should be considered experimental and
3317                 under active development.
3318                 </para>
3319                 
3320                 <para>
3321                 This option is used to control the tcp port number used to contact
3322                 the <link linkend="LDAPSERVER"><parameter>ldap server</parameter></link>.
3323                 The default is to use the stand LDAPS port 636.
3324                 </para>
3325
3326                 <para>See Also: <link linkend="LDAPSSL">ldap ssl</link>
3327                 </para>
3328                 
3329                 <para>Default : <command>ldap port = 636</command></para>
3330                 </listitem>
3331                 </varlistentry>
3332
3333
3334
3335
3336                 <varlistentry>
3337                 <term><anchor id="LDAPSERVER">ldap server (G)</term>
3338                 <listitem><para>This parameter is only available if Samba has been
3339                 configure to include the <command>--with-ldapsam</command> option
3340                 at compile time. This option should be considered experimental and
3341                 under active development.
3342                 </para>
3343                 
3344                 <para>
3345                 This parameter should contains the FQDN of the ldap directory 
3346                 server which should be queried to locate user account information.
3347                 </para>
3348                 
3349         
3350                 
3351                 <para>Default : <command>ldap server = localhost</command></para>
3352                 </listitem>
3353                 </varlistentry>
3354
3355
3356
3357
3358                 <varlistentry>
3359                 <term><anchor id="LDAPSSL">ldap ssl (G)</term>
3360                 <listitem><para>This parameter is only available if Samba has been
3361                 configure to include the <command>--with-ldapsam</command> option
3362                 at compile time. This option should be considered experimental and
3363                 under active development.
3364                 </para>
3365                 
3366                 <para>
3367                 This option is used to define whether or not Samba should
3368                 use SSL when connecting to the <link linkend="LDAPSERVER"><parameter>ldap
3369                 server</parameter></link>.  This is <emphasis>NOT</emphasis> related to
3370                 Samba SSL support which is enabled by specifying the 
3371                 <command>--with-ssl</command> option to the <filename>configure</filename> 
3372                 script (see <link linkend="SSL"><parameter>ssl</parameter></link>).
3373                 </para>
3374                 
3375                 <para>
3376                 The <parameter>ldap ssl</parameter> can be set to one of three values:
3377                 (a) <constant>on</constant> - Always use SSL when contacting the 
3378                 <parameter>ldap server</parameter>, (b) <constant>off</constant> -
3379                 Never use SSL when querying the directory, or (c) <constant>start_tls</constant> 
3380                 - Use the LDAPv3 StartTLS extended operation 
3381                 (RFC2830) for communicating with the directory server.
3382                 </para>
3383                 
3384                 
3385                 <para>Default : <command>ldap ssl = on</command></para>
3386                 </listitem>
3387                 </varlistentry>
3388
3389
3390
3391
3392                 <varlistentry>
3393                 <term><anchor id="LDAPSUFFIX">ldap suffix (G)</term>
3394                 <listitem><para>This parameter is only available if Samba has been
3395                 configure to include the <command>--with-ldapsam</command> option
3396                 at compile time. This option should be considered experimental and
3397                 under active development.
3398                 </para>
3399                 
3400         
3401                 
3402                 <para>Default : <emphasis>none</emphasis></para>
3403                 </listitem>
3404                 </varlistentry>
3405
3406
3407
3408
3409
3410
3411
3412                 <varlistentry>
3413                 <term><anchor id="LEVEL2OPLOCKS">level2 oplocks (S)</term>
3414                 <listitem><para>This parameter controls whether Samba supports
3415                 level2 (read-only) oplocks on a share.</para>
3416                 
3417                 <para>Level2, or read-only oplocks allow Windows NT clients 
3418                 that have an oplock on a file to downgrade from a read-write oplock 
3419                 to a read-only oplock once a second client opens the file (instead 
3420                 of releasing all oplocks on a second open, as in traditional, 
3421                 exclusive oplocks). This allows all openers of the file that 
3422                 support level2 oplocks to cache the file for read-ahead only (ie. 
3423                 they may not cache writes or lock requests) and increases performance 
3424                 for many accesses of files that are not commonly written (such as 
3425                 application .EXE files).</para>
3426
3427                 <para>Once one of the clients which have a read-only oplock 
3428                 writes to the file all clients are notified (no reply is needed 
3429                 or waited for) and told to break their oplocks to "none" and 
3430                 delete any read-ahead caches.</para>
3431
3432                 <para>It is recommended that this parameter be turned on 
3433                 to speed access to shared executables.</para>
3434
3435                 <para>For more discussions on level2 oplocks see the CIFS spec.</para>
3436
3437                 <para>Currently, if <link linkend="KERNELOPLOCKS"><parameter>kernel 
3438                 oplocks</parameter></link> are supported then level2 oplocks are 
3439                 not granted (even if this parameter is set to <constant>yes</constant>). 
3440                 Note also, the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
3441                 </link> parameter must be set to <constant>true</constant> on this share in order for 
3442                 this parameter to have any effect.</para>
3443
3444                 <para>See also the <link linkend="OPLOCKS"><parameter>oplocks</parameter>
3445                 </link> and <link linkend="OPLOCKS"><parameter>kernel oplocks</parameter>
3446                 </link> parameters.</para>
3447                 
3448                 <para>Default: <command>level2 oplocks = yes</command></para>
3449                 </listitem>
3450                 </varlistentry>
3451
3452
3453
3454
3455
3456                 <varlistentry>
3457                 <term><anchor id="LMANNOUNCE">lm announce (G)</term>
3458                 <listitem><para>This parameter determines if <ulink url="nmbd.8.html">
3459                 <command>nmbd(8)</command></ulink> will produce Lanman announce 
3460                 broadcasts that are needed by OS/2 clients in order for them to see 
3461                 the Samba server in their browse list. This parameter can have three 
3462                 values, <constant>true</constant>, <constant>false</constant>, or
3463                 <constant>auto</constant>. The default is <constant>auto</constant>.  
3464                 If set to <constant>false</constant> Samba will never produce these 
3465                 broadcasts. If set to <constant>true</constant> Samba will produce 
3466                 Lanman announce broadcasts at a frequency set by the parameter 
3467                 <parameter>lm interval</parameter>. If set to <constant>auto</constant> 
3468                 Samba will not send Lanman announce broadcasts by default but will 
3469                 listen for them. If it hears such a broadcast on the wire it will 
3470                 then start sending them at a frequency set by the parameter 
3471                 <parameter>lm interval</parameter>.</para>
3472
3473                 <para>See also <link linkend="LMINTERVAL"><parameter>lm interval
3474                 </parameter></link>.</para>
3475
3476                 <para>Default: <command>lm announce = auto</command></para>
3477                 <para>Example: <command>lm announce = yes</command></para>
3478                 </listitem>
3479                 </varlistentry>
3480
3481
3482
3483                 <varlistentry>
3484                 <term><anchor id="LMINTERVAL">lm interval (G)</term>
3485                 <listitem><para>If Samba is set to produce Lanman announce 
3486                 broadcasts needed by OS/2 clients (see the <link linkend="LMANNOUNCE">
3487                 <parameter>lm announce</parameter></link> parameter) then this 
3488                 parameter defines the frequency in seconds with which they will be 
3489                 made.  If this is set to zero then no Lanman announcements will be 
3490                 made despite the setting of the <parameter>lm announce</parameter> 
3491                 parameter.</para>
3492
3493                 <para>See also <link linkend="LMANNOUNCE"><parameter>lm 
3494                 announce</parameter></link>.</para>
3495
3496                 <para>Default: <command>lm interval = 60</command></para>
3497                 <para>Example: <command>lm interval = 120</command></para>
3498                 </listitem>
3499                 </varlistentry>
3500
3501
3502
3503                 <varlistentry>
3504                 <term><anchor id="LOADPRINTERS">load printers (G)</term>
3505                 <listitem><para>A boolean variable that controls whether all 
3506                 printers in the printcap will be loaded for browsing by default. 
3507                 See the <link linkend="PRINTERSSECT">printers</link> section for 
3508                 more details.</para>
3509
3510                 <para>Default: <command>load printers = yes</command></para></listitem>
3511                 </varlistentry>
3512
3513
3514
3515
3516                 <varlistentry>
3517                 <term><anchor id="LOCALMASTER">local master (G)</term>
3518                 <listitem><para>This option allows <ulink url="nmbd.8.html"><command>
3519                 nmbd(8)</command></ulink> to try and become a local master browser 
3520                 on a subnet. If set to <constant>false</constant> then <command>
3521                 nmbd</command> will not attempt to become a local master browser 
3522                 on a subnet and will also lose in all browsing elections. By
3523                 default this value is set to <constant>true</constant>. Setting this value to <constant>true</constant> doesn't
3524                 mean that Samba will <emphasis>become</emphasis> the local master 
3525                 browser on a subnet, just that <command>nmbd</command> will <emphasis>
3526                 participate</emphasis> in elections for local master browser.</para>
3527
3528                 <para>Setting this value to <constant>false</constant> will cause <command>nmbd</command>
3529                 <emphasis>never</emphasis> to become a local master browser.</para>
3530
3531                 <para>Default: <command>local master = yes</command></para>
3532                 </listitem>
3533                 </varlistentry>
3534
3535
3536
3537                 <varlistentry>
3538                 <term><anchor id="LOCKDIR">lock dir (G)</term>
3539                 <listitem><para>Synonym for <link linkend="LOCKDIRECTORY"><parameter>
3540                 lock directory</parameter></link>.</para></listitem>
3541                 </varlistentry>
3542                 
3543                 
3544                 
3545                 <varlistentry>
3546                 <term><anchor id="LOCKDIRECTORY">lock directory (G)</term>
3547                 <listitem><para>This option specifies the directory where lock 
3548                 files will be placed.  The lock files are used to implement the 
3549                 <link linkend="MAXCONNECTIONS"><parameter>max connections</parameter>
3550                 </link> option.</para>
3551
3552                 <para>Default: <command>lock directory = ${prefix}/var/locks</command></para>
3553                 <para>Example: <command>lock directory = /var/run/samba/locks</command>
3554                 </para></listitem>
3555                 </varlistentry>
3556
3557
3558
3559                 <varlistentry>
3560                 <term><anchor id="LOCKING">locking (S)</term>
3561                 <listitem><para>This controls whether or not locking will be 
3562                 performed by the server in response to lock requests from the 
3563                 client.</para>
3564
3565                 <para>If <command>locking = no</command>, all lock and unlock 
3566                 requests will appear to succeed and all lock queries will report 
3567                 that the file in question is available for locking.</para>
3568
3569                 <para>If <command>locking = yes</command>, real locking will be performed 
3570                 by the server.</para>
3571
3572                 <para>This option <emphasis>may</emphasis> be useful for read-only 
3573                 filesystems which <emphasis>may</emphasis> not need locking (such as 
3574                 CDROM drives), although setting this parameter of <constant>no</constant> 
3575                 is not really recommended even in this case.</para>
3576
3577                 <para>Be careful about disabling locking either globally or in a 
3578                 specific service, as lack of locking may result in data corruption. 
3579                 You should never need to set this parameter.</para>
3580
3581                 <para>Default: <command>locking = yes</command></para>
3582                 </listitem>
3583                 </varlistentry>
3584
3585
3586
3587                 <varlistentry>
3588                 <term><anchor id="LOGFILE">log file (G)</term>
3589                 <listitem><para>This option allows you to override the name 
3590                 of the Samba log file (also known as the debug file).</para>
3591
3592                 <para>This option takes the standard substitutions, allowing 
3593                 you to have separate log files for each user or machine.</para>
3594
3595                 <para>Example: <command>log file = /usr/local/samba/var/log.%m
3596                 </command></para></listitem>
3597                 </varlistentry>
3598
3599
3600
3601                 <varlistentry>
3602                 <term><anchor id="LOGLEVEL">log level (G)</term>
3603                 <listitem><para>The value of the parameter (an integer) allows 
3604                 the debug level (logging level) to be specified in the 
3605                 <filename>smb.conf</filename> file. This is to give greater 
3606                 flexibility in the configuration of the system.</para>
3607
3608                 <para>The default will be the log level specified on 
3609                 the command line or level zero if none was specified.</para>
3610
3611                 <para>Example: <command>log level = 3</command></para></listitem>
3612                 </varlistentry>
3613
3614
3615
3616                 <varlistentry>
3617                 <term><anchor id="LOGONDRIVE">logon drive (G)</term>
3618                 <listitem><para>This parameter specifies the local path to 
3619                 which the home directory will be connected (see <link 
3620                 linkend="LOGONHOME"><parameter>logon home</parameter></link>) 
3621                 and is only used by NT Workstations. </para>
3622
3623                 <para>Note that this option is only useful if Samba is set up as a
3624                 logon server.</para>
3625
3626                 <para>Default: <command>logon drive = z:</command></para>
3627                 <para>Example: <command>logon drive = h:</command></para>
3628                 </listitem>
3629                 </varlistentry>
3630
3631         
3632         
3633                 <varlistentry>
3634                 <term><anchor id="LOGONHOME">logon home (G)</term>
3635                 <listitem><para>This parameter specifies the home directory 
3636                 location when a Win95/98 or NT Workstation logs into a Samba PDC.  
3637                 It allows you to do </para>
3638                 
3639                 <para><prompt>C:\> </prompt><userinput>NET USE H: /HOME</userinput>
3640                 </para>
3641
3642                 <para>from a command prompt, for example.</para>
3643
3644                 <para>This option takes the standard substitutions, allowing 
3645                 you to have separate logon scripts for each user or machine.</para>
3646
3647                 <para>This parameter can be used with Win9X workstations to ensure 
3648                 that roaming profiles are stored in a subdirectory of the user's 
3649                 home directory.  This is done in the following way:</para>
3650
3651                 <para><command>logon home = \\%N\%U\profile</command></para>
3652
3653                 <para>This tells Samba to return the above string, with 
3654                 substitutions made when a client requests the info, generally 
3655                 in a NetUserGetInfo request.  Win9X clients truncate the info to
3656                 \\server\share when a user does <command>net use /home</command>
3657                 but use the whole string when dealing with profiles.</para>
3658
3659                 <para>Note that in prior versions of Samba, the <link linkend="LOGONPATH">
3660                 <parameter>logon path</parameter></link> was returned rather than 
3661                 <parameter>logon home</parameter>.  This broke <command>net use 
3662                 /home</command> but allowed profiles outside the home directory.  
3663                 The current implementation is correct, and can be used for 
3664                 profiles if you use the above trick.</para>
3665                 
3666                 <para>This option is only useful if Samba is set up as a logon 
3667                 server.</para>
3668
3669                 <para>Default: <command>logon home = "\\%N\%U"</command></para>
3670                 <para>Example: <command>logon home = "\\remote_smb_server\%U"</command>
3671                 </para></listitem>
3672                 </varlistentry>
3673
3674
3675                 <varlistentry>
3676                 <term><anchor id="LOGONPATH">logon path (G)</term>
3677                 <listitem><para>This parameter specifies the home directory 
3678                 where roaming profiles (NTuser.dat etc files for Windows NT) are 
3679                 stored.  Contrary to previous versions of these manual pages, it has 
3680                 nothing to do with Win 9X roaming profiles.  To find out how to 
3681                 handle roaming profiles for Win 9X system, see the <link linkend="LOGONHOME">
3682                 <parameter>logon home</parameter></link> parameter.</para>
3683
3684                 <para>This option takes the standard substitutions, allowing you 
3685                 to have separate logon scripts for each user or machine.  It also 
3686                 specifies the directory from which the "Application Data", 
3687                 (<filename>desktop</filename>, <filename>start menu</filename>,
3688                 <filename>network neighborhood</filename>, <filename>programs</filename> 
3689                 and other folders, and their contents, are loaded and displayed on 
3690                 your Windows NT client.</para>
3691                 
3692                 <para>The share and the path must be readable by the user for 
3693                 the preferences and directories to be loaded onto the Windows NT
3694                 client.  The share must be writeable when the user logs in for the first
3695                 time, in order that the Windows NT client can create the NTuser.dat
3696                 and other directories.</para>
3697
3698                 <para>Thereafter, the directories and any of the contents can, 
3699                 if required, be made read-only.  It is not advisable that the 
3700                 NTuser.dat file be made read-only - rename it to NTuser.man to 
3701                 achieve the desired effect (a <emphasis>MAN</emphasis>datory 
3702                 profile). </para>
3703
3704                 <para>Windows clients can sometimes maintain a connection to 
3705                 the [homes] share, even though there is no user logged in.  
3706                 Therefore, it is vital that the logon path does not include a 
3707                 reference to the homes share (i.e. setting this parameter to
3708                 \%N\%U\profile_path will cause problems).</para>
3709
3710                 <para>This option takes the standard substitutions, allowing 
3711                 you to have separate logon scripts for each user or machine.</para>
3712
3713                 <para>Note that this option is only useful if Samba is set up 
3714                 as a logon server.</para>
3715
3716                 <para>Default: <command>logon path = \\%N\%U\profile</command></para>
3717                 <para>Example: <command>logon path = \\PROFILESERVER\PROFILE\%U</command></para>
3718                 </listitem>
3719                 </varlistentry>
3720                 
3721                 
3722                 
3723                 <varlistentry>
3724                 <term><anchor id="LOGONSCRIPT">logon script (G)</term>
3725                 <listitem><para>This parameter specifies the batch file (.bat) or 
3726                 NT command file (.cmd) to be downloaded and run on a machine when 
3727                 a user successfully logs in.  The file must contain the DOS 
3728                 style CR/LF line endings. Using a DOS-style editor to create the 
3729                 file is recommended.</para>
3730                 
3731                 <para>The script must be a relative path to the [netlogon] 
3732                 service.  If the [netlogon] service specifies a <link linkend="PATH">
3733                 <parameter>path</parameter></link> of <filename>/usr/local/samba/netlogon
3734                 </filename>, and <command>logon script = STARTUP.BAT</command>, then 
3735                 the file that will be downloaded is:</para>
3736
3737                 <para><filename>/usr/local/samba/netlogon/STARTUP.BAT</filename></para>
3738
3739                 <para>The contents of the batch file are entirely your choice.  A 
3740                 suggested command would be to add <command>NET TIME \\SERVER /SET 
3741                 /YES</command>, to force every machine to synchronize clocks with 
3742                 the same time server.  Another use would be to add <command>NET USE 
3743                 U: \\SERVER\UTILS</command> for commonly used utilities, or <command>
3744                 NET USE Q: \\SERVER\ISO9001_QA</command> for example.</para>
3745
3746                 <para>Note that it is particularly important not to allow write 
3747                 access to the [netlogon] share, or to grant users write permission 
3748                 on the batch files in a secure environment, as this would allow 
3749                 the batch files to be arbitrarily modified and security to be 
3750                 breached.</para>
3751
3752                 <para>This option takes the standard substitutions, allowing you 
3753                 to have separate logon scripts for each user or machine.</para>
3754
3755                 <para>This option is only useful if Samba is set up as a logon 
3756                 server.</para>
3757
3758                 <para>Default: <emphasis>no logon script defined</emphasis></para>
3759                 <para>Example: <command>logon script = scripts\%U.bat</command></para>
3760                 </listitem>
3761                 </varlistentry>
3762
3763
3764
3765                 <varlistentry>
3766                 <term><anchor id="LPPAUSECOMMAND">lppause command (S)</term>
3767                 <listitem><para>This parameter specifies the command to be 
3768                 executed on the server host in order to stop printing or spooling 
3769                 a specific print job.</para>
3770
3771                 <para>This command should be a program or script which takes 
3772                 a printer name and job number to pause the print job. One way 
3773                 of implementing this is by using job priorities, where jobs 
3774                 having a too low priority won't be sent to the printer.</para>
3775
3776                 <para>If a <parameter>%p</parameter> is given then the printer name 
3777                 is put in its place. A <parameter>%j</parameter> is replaced with 
3778                 the job number (an integer).  On HPUX (see <parameter>printing=hpux
3779                 </parameter>), if the <parameter>-p%p</parameter> option is added 
3780                 to the lpq command, the job will show up with the correct status, i.e. 
3781                 if the job priority is lower than the set fence priority it will 
3782                 have the PAUSED status, whereas if  the priority is equal or higher it 
3783                 will have the SPOOLED or PRINTING status.</para>
3784
3785                 <para>Note that it is good practice to include the absolute path 
3786                 in the lppause command as the PATH may not be available to the server.</para>
3787
3788                 <para>See also the <link linkend="PRINTING"><parameter>printing
3789                 </parameter></link> parameter.</para>
3790
3791                 <para>Default: Currently no default value is given to 
3792                 this string, unless the value of the <parameter>printing</parameter> 
3793                 parameter is <constant>SYSV</constant>, in which case the default is :</para>
3794
3795                 <para><command>lp -i %p-%j -H hold</command></para>
3796
3797                 <para>or if the value of the <parameter>printing</parameter> parameter 
3798                 is <constant>SOFTQ</constant>, then the default is:</para>
3799
3800                 <para><command>qstat -s -j%j -h</command></para>
3801  
3802                 <para>Example for HPUX: <command>lppause command = /usr/bin/lpalt       
3803                 %p-%j -p0</command></para>
3804                 </listitem>
3805                 </varlistentry>
3806
3807
3808
3809                 <varlistentry>
3810                 <term><anchor id="LPQCACHETIME">lpq cache time (G)</term>
3811                 <listitem><para>This controls how long lpq info will be cached 
3812                 for to prevent the <command>lpq</command> command being called too 
3813                 often. A separate cache is kept for each variation of the <command>
3814                 lpq</command> command used by the system, so if you use different 
3815                 <command>lpq</command> commands for different users then they won't
3816                 share cache information.</para>
3817
3818                 <para>The cache files are stored in <filename>/tmp/lpq.xxxx</filename> 
3819                 where xxxx is a hash of the <command>lpq</command> command in use.</para>
3820
3821                 <para>The default is 10 seconds, meaning that the cached results 
3822                 of a previous identical <command>lpq</command> command will be used 
3823                 if the cached data is less than 10 seconds old. A large value may 
3824                 be advisable if your <command>lpq</command> command is very slow.</para>
3825
3826                 <para>A value of 0 will disable caching completely.</para>
3827
3828                 <para>See also the <link linkend="PRINTING"><parameter>printing
3829                 </parameter></link> parameter.</para>
3830
3831                 <para>Default: <command>lpq cache time = 10</command></para>
3832                 <para>Example: <command>lpq cache time = 30</command></para>
3833                 </listitem>
3834                 </varlistentry>
3835
3836
3837
3838                 <varlistentry>
3839                 <term><anchor id="LPQCOMMAND">lpq command (S)</term>
3840                 <listitem><para>This parameter specifies the command to be 
3841                 executed on the server host in order to obtain <command>lpq
3842                 </command>-style printer status information.</para>
3843
3844                 <para>This command should be a program or script which 
3845                 takes a printer name as its only parameter and outputs printer 
3846                 status information.</para>
3847
3848                 <para>Currently eight styles of printer status information 
3849                 are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ. 
3850                 This covers most UNIX systems. You control which type is expected 
3851                 using the <parameter>printing =</parameter> option.</para>
3852
3853                 <para>Some clients (notably Windows for Workgroups) may not 
3854                 correctly send the connection number for the printer they are 
3855                 requesting status information about. To get around this, the 
3856                 server reports on the first printer service connected to by the 
3857                 client. This only happens if the connection number sent is invalid.</para>
3858
3859                 <para>If a <parameter>%p</parameter> is given then the printer name 
3860                 is put in its place. Otherwise it is placed at the end of the 
3861                 command.</para>
3862
3863                 <para>Note that it is good practice to include the absolute path 
3864                 in the <parameter>lpq command</parameter> as the <envar>$PATH
3865                 </envar> may not be available to the server.</para>
3866
3867                 <para>See also the <link linkend="PRINTING"><parameter>printing
3868                 </parameter></link> parameter.</para>
3869
3870                 <para>Default: <emphasis>depends on the setting of <parameter>
3871                 printing</parameter></emphasis></para>
3872
3873                 <para>Example: <command>lpq command = /usr/bin/lpq -P%p</command></para>
3874                 </listitem>
3875                 </varlistentry>
3876                 
3877                 
3878                 
3879                 <varlistentry>
3880                 <term><anchor id="LPRESUMECOMMAND">lpresume command (S)</term>
3881                 <listitem><para>This parameter specifies the command to be 
3882                 executed on the server host in order to restart or continue 
3883                 printing or spooling a specific print job.</para>
3884
3885                 <para>This command should be a program or script which takes 
3886                 a printer name and job number to resume the print job. See 
3887                 also the <link linkend="LPPAUSECOMMAND"><parameter>lppause command
3888                 </parameter></link> parameter.</para>
3889
3890                 <para>If a <parameter>%p</parameter> is given then the printer name 
3891                 is put in its place. A <parameter>%j</parameter> is replaced with 
3892                 the job number (an integer).</para>
3893                 
3894                 <para>Note that it is good practice to include the absolute path 
3895                 in the <parameter>lpresume command</parameter> as the PATH may not 
3896                 be available to the server.</para>
3897                 
3898                 <para>See also the <link linkend="PRINTING"><parameter>printing
3899                 </parameter></link> parameter.</para>
3900
3901                 <para>Default: Currently no default value is given 
3902                 to this string, unless the value of the <parameter>printing</parameter> 
3903                 parameter is <constant>SYSV</constant>, in which case the default is :</para>
3904
3905                 <para><command>lp -i %p-%j -H resume</command></para>
3906
3907                 <para>or if the value of the <parameter>printing</parameter> parameter 
3908                 is <constant>SOFTQ</constant>, then the default is:</para>
3909
3910                 <para><command>qstat -s -j%j -r</command></para>
3911  
3912                 <para>Example for HPUX: <command>lpresume command = /usr/bin/lpalt 
3913                 %p-%j -p2</command></para>
3914                 </listitem>
3915                 </varlistentry>
3916                 
3917                 
3918
3919                 <varlistentry>
3920                 <term><anchor id="LPRMCOMMAND">lprm command (S)</term>
3921                 <listitem><para>This parameter specifies the command to be 
3922                 executed on the server host in order to delete a print job.</para>
3923
3924                 <para>This command should be a program or script which takes 
3925                 a printer name and job number, and deletes the print job.</para>
3926
3927                 <para>If a <parameter>%p</parameter> is given then the printer name 
3928                 is put in its place. A <parameter>%j</parameter> is replaced with 
3929                 the job number (an integer).</para>
3930
3931                 <para>Note that it is good practice to include the absolute 
3932                 path in the <parameter>lprm command</parameter> as the PATH may not be 
3933                 available to the server.</para>
3934
3935                 <para>See also the <link linkend="PRINTING"><parameter>printing
3936                 </parameter></link> parameter.</para>
3937
3938                 <para>Default: <emphasis>depends on the setting of <parameter>printing
3939                 </parameter></emphasis></para>
3940
3941                 <para>Example 1: <command>lprm command = /usr/bin/lprm -P%p %j
3942                 </command></para>
3943                 <para>Example 2: <command>lprm command = /usr/bin/cancel %p-%j
3944                 </command></para></listitem>
3945                 </varlistentry>
3946
3947
3948
3949                 <varlistentry>
3950                 <term><anchor id="MACHINEPASSWORDTIMEOUT">machine password timeout (G)</term>
3951                 <listitem><para>If a Samba server is a member of a Windows 
3952                 NT Domain (see the <link linkend="SECURITYEQUALSDOMAIN">security = domain</link>) 
3953                 parameter) then periodically a running <ulink url="smbd.8.html">
3954                 smbd(8)</ulink> process will try and change the MACHINE ACCOUNT 
3955                 PASSWORD stored in the TDB called <filename>private/secrets.tdb
3956                 </filename>.  This parameter specifies how often this password 
3957                 will be changed, in seconds. The default is one week (expressed in 
3958                 seconds), the same as a Windows NT Domain member server.</para>
3959
3960                 <para>See also <ulink url="smbpasswd.8.html"><command>smbpasswd(8)
3961                 </command></ulink>, and the <link linkend="SECURITYEQUALSDOMAIN">
3962                 security = domain</link>) parameter.</para>
3963
3964                 <para>Default: <command>machine password timeout = 604800</command></para>
3965                 </listitem>
3966                 </varlistentry>
3967
3968
3969                 <varlistentry>
3970                 <term><anchor id="MAGICOUTPUT">magic output (S)</term>
3971                 <listitem><para>This parameter specifies the name of a file 
3972                 which will contain output created by a magic script (see the 
3973                 <link linkend="MAGICSCRIPT"><parameter>magic script</parameter></link>
3974                 parameter below).</para>
3975
3976                 <para>Warning: If two clients use the same <parameter>magic script
3977                 </parameter> in the same directory the output file content
3978                 is undefined.</para>
3979
3980                 <para>Default: <command>magic output = &lt;magic script name&gt;.out
3981                 </command></para>
3982
3983                 <para>Example: <command>magic output = myfile.txt</command></para>
3984                 </listitem>
3985                 </varlistentry>
3986
3987
3988
3989                 <varlistentry>
3990                 <term><anchor id="MAGICSCRIPT">magic script (S)</term>
3991                 <listitem><para>This parameter specifies the name of a file which, 
3992                 if opened, will be executed by the server when the file is closed. 
3993                 This allows a UNIX script to be sent to the Samba host and 
3994                 executed on behalf of the connected user.</para>
3995
3996                 <para>Scripts executed in this way will be deleted upon 
3997                 completion assuming that the user has the appropriate level 
3998                 of privilege and the file permissions allow the deletion.</para>
3999
4000                 <para>If the script generates output, output will be sent to 
4001                 the file specified by the <link linkend="MAGICOUTPUT"><parameter>
4002                 magic output</parameter></link> parameter (see above).</para>
4003
4004                 <para>Note that some shells are unable to interpret scripts 
4005                 containing CR/LF instead of CR as 
4006                 the end-of-line marker. Magic scripts must be executable 
4007                 <emphasis>as is</emphasis> on the host, which for some hosts and 
4008                 some shells will require filtering at the DOS end.</para>
4009
4010                 <para>Magic scripts are <emphasis>EXPERIMENTAL</emphasis> and 
4011                 should <emphasis>NOT</emphasis> be relied upon.</para>
4012
4013                 <para>Default: <emphasis>None. Magic scripts disabled.</emphasis></para>
4014                 <para>Example: <command>magic script = user.csh</command></para>
4015                 </listitem>
4016                 </varlistentry>
4017
4018                 
4019
4020                 <varlistentry>
4021                 <term><anchor id="MANGLECASE">mangle case (S)</term>
4022                 <listitem><para>See the section on <link linkend="NAMEMANGLINGSECT">
4023                 NAME MANGLING</link></para>
4024                 
4025                 <para>Default: <command>mangle case = no</command></para>
4026                 </listitem>
4027                 </varlistentry>
4028                 
4029
4030                 <varlistentry>
4031                 <term><anchor id="MANGLEDMAP">mangled map (S)</term>
4032                 <listitem><para>This is for those who want to directly map UNIX 
4033                 file names which cannot be represented on Windows/DOS.  The mangling 
4034                 of names is not always what is needed.  In particular you may have 
4035                 documents with file extensions that differ between DOS and UNIX. 
4036                 For example, under UNIX it is common to use <filename>.html</filename> 
4037                 for HTML files, whereas under Windows/DOS <filename>.htm</filename> 
4038                 is more commonly used.</para>
4039
4040                 <para>So to map <filename>html</filename> to <filename>htm</filename> 
4041                 you would use:</para>
4042                 
4043                 <para><command>mangled map = (*.html *.htm)</command></para>
4044
4045                 <para>One very useful case is to remove the annoying <filename>;1
4046                 </filename> off the ends of filenames on some CDROMs (only visible 
4047                 under some UNIXes). To do this use a map of (*;1 *;).</para>
4048
4049                 <para>Default: <emphasis>no mangled map</emphasis></para>
4050                 <para>Example: <command>mangled map = (*;1 *;)</command></para>
4051                 </listitem>
4052                 </varlistentry>
4053
4054
4055                 <varlistentry>
4056                 <term><anchor id="MANGLEDNAMES">mangled names (S)</term>
4057                 <listitem><para>This controls whether non-DOS names under UNIX 
4058                 should be mapped to DOS-compatible names ("mangled") and made visible, 
4059                 or whether non-DOS names should simply be ignored.</para>
4060
4061                 <para>See the section on <link linkend="NAMEMANGLINGSECT">
4062                 NAME MANGLING</link> for details on how to control the mangling process.</para>
4063
4064                 <para>If mangling is used then the mangling algorithm is as follows:</para>
4065
4066                 <itemizedlist>
4067                         <listitem><para>The first (up to) five alphanumeric characters 
4068                         before the rightmost dot of the filename are preserved, forced 
4069                         to upper case, and appear as the first (up to) five characters 
4070                         of the mangled name.</para></listitem>
4071                 
4072                         <listitem><para>A tilde "~" is appended to the first part of the mangled
4073                         name, followed by a two-character unique sequence, based on the
4074                         original root name (i.e., the original filename minus its final
4075                         extension). The final extension is included in the hash calculation
4076                         only if it contains any upper case characters or is longer than three
4077                         characters.</para>
4078
4079                         <para>Note that the character to use may be specified using 
4080                         the <link linkend="MANGLINGCHAR"><parameter>mangling char</parameter>
4081                         </link> option, if you don't like '~'.</para></listitem>
4082
4083                         <listitem><para>The first three alphanumeric characters of the final 
4084                         extension are preserved, forced to upper case and appear as the 
4085                         extension of the mangled name. The final extension is defined as that 
4086                         part of the original filename after the rightmost dot. If there are no 
4087                         dots in the filename, the mangled name will have no extension (except 
4088                         in the case of "hidden files" - see below).</para></listitem>
4089
4090                         <listitem><para>Files whose UNIX name begins with a dot will be 
4091                         presented as DOS hidden files. The mangled name will be created as 
4092                         for other filenames, but with the leading dot removed and "___" as 
4093                         its extension regardless of actual original extension (that's three 
4094                         underscores).</para></listitem>
4095                 </itemizedlist>
4096
4097                 <para>The two-digit hash value consists of upper case 
4098                 alphanumeric characters.</para>
4099
4100                 <para>This algorithm can cause name collisions only if files 
4101                 in a directory share the same first five alphanumeric characters. 
4102                 The probability of such a clash is 1/1300.</para>
4103
4104                 <para>The name mangling (if enabled) allows a file to be 
4105                 copied between UNIX directories from Windows/DOS while retaining 
4106                 the long UNIX filename. UNIX files can be renamed to a new extension 
4107                 from Windows/DOS and will retain the same basename. Mangled names 
4108                 do not change between sessions.</para>
4109
4110                 <para>Default: <command>mangled names = yes</command></para>
4111                 </listitem>
4112                 </varlistentry>
4113
4114
4115                 
4116                 <varlistentry>
4117                 <term><anchor id="MANGLEDSTACK">mangled stack (G)</term>
4118                 <listitem><para>This parameter controls the number of mangled names 
4119                 that should be cached in the Samba server <ulink url="smbd.8.html">
4120                 smbd(8)</ulink>.</para>
4121
4122                 <para>This stack is a list of recently mangled base names 
4123                 (extensions are only maintained if they are longer than 3 characters 
4124                 or contains upper case characters).</para>
4125
4126                 <para>The larger this value, the more likely it is that mangled 
4127                 names can be successfully converted to correct long UNIX names. 
4128                 However, large stack sizes will slow most directory accesses. Smaller 
4129                 stacks save memory in the server (each stack element costs 256 bytes).
4130                 </para>
4131
4132                 <para>It is not possible to absolutely guarantee correct long 
4133                 filenames, so be prepared for some surprises!</para>
4134
4135                 <para>Default: <command>mangled stack = 50</command></para>
4136                 <para>Example: <command>mangled stack = 100</command></para>
4137                 </listitem>
4138                 </varlistentry>
4139
4140
4141
4142
4143                 <varlistentry>
4144                 <term><anchor id="MANGLINGCHAR">mangling char (S)</term>
4145                 <listitem><para>This controls what character is used as 
4146                 the <emphasis>magic</emphasis> character in <link 
4147                 linkend="NAMEMANGLINGSECT">name mangling</link>. The default is a '~'
4148                 but this may interfere with some software. Use this option to set 
4149                 it to whatever you prefer.</para>
4150
4151                 <para>Default: <command>mangling char = ~</command></para>
4152                 <para>Example: <command>mangling char = ^</command></para>
4153                 </listitem>
4154                 </varlistentry>
4155                 
4156                 
4157
4158
4159
4160                 <varlistentry>
4161                 <term><anchor id="MAPARCHIVE">map archive (S)</term>
4162                 <listitem><para>This controls whether the DOS archive attribute 
4163                 should be mapped to the UNIX owner execute bit.  The DOS archive bit 
4164                 is set when a file has been modified since its last backup.  One 
4165                 motivation for this option it to keep Samba/your PC from making 
4166                 any file it touches from becoming executable under UNIX.  This can 
4167                 be quite annoying for shared source code, documents, etc...</para>
4168
4169                 <para>Note that this requires the <parameter>create mask</parameter>
4170                 parameter to be set such that owner execute bit is not masked out 
4171                 (i.e. it must include 100). See the parameter <link linkend="CREATEMASK">
4172                 <parameter>create mask</parameter></link> for details.</para>
4173
4174                 <para>Default: <command>map archive = yes</command></para>
4175                 </listitem>
4176                 </varlistentry>
4177                 
4178                 
4179                 
4180                 <varlistentry>
4181                 <term><anchor id="MAPHIDDEN">map hidden (S)</term>
4182                 <listitem><para>This controls whether DOS style hidden files 
4183                 should be mapped to the UNIX world execute bit.</para>
4184
4185                 <para>Note that this requires the <parameter>create mask</parameter> 
4186                 to be set such that the world execute bit is not masked out (i.e. 
4187                 it must include 001). See the parameter <link linkend="CREATEMASK">
4188                 <parameter>create mask</parameter></link> for details.</para>
4189
4190                 <para>Default: <command>map hidden = no</command></para>
4191                 </listitem>
4192                 </varlistentry>
4193
4194
4195                 <varlistentry>
4196                 <term><anchor id="MAPSYSTEM">map system (S)</term>
4197                 <listitem><para>This controls whether DOS style system files 
4198                 should be mapped to the UNIX group execute bit.</para>
4199
4200                 <para>Note that this requires the <parameter>create mask</parameter> 
4201                 to be set such that the group execute bit is not masked out (i.e. 
4202                 it must include 010). See the parameter <link linkend="CREATEMASK">
4203                 <parameter>create mask</parameter></link> for details.</para>
4204
4205                 <para>Default: <command>map system = no</command></para>
4206                 </listitem>
4207                 </varlistentry>
4208
4209
4210                 <varlistentry>
4211                 <term><anchor id="MAPTOGUEST">map to guest (G)</term>
4212                 <listitem><para>This parameter is only useful in <link linkend="SECURITY">
4213                 security</link> modes other than <parameter>security = share</parameter> 
4214                 - i.e. <constant>user</constant>, <constant>server</constant>, 
4215                 and <constant>domain</constant>.</para>
4216
4217                 <para>This parameter can take three different values, which tell
4218                 <ulink url="smbd.8.html">smbd(8)</ulink> what to do with user 
4219                 login requests that don't match a valid UNIX user in some way.</para>
4220
4221                 <para>The three settings are :</para>
4222
4223                 <itemizedlist>
4224                         <listitem><para><constant>Never</constant> - Means user login 
4225                         requests with an invalid password are rejected. This is the 
4226                         default.</para></listitem>
4227                         
4228                         <listitem><para><constant>Bad User</constant> - Means user
4229                         logins with an invalid password are rejected, unless the username 
4230                         does not exist, in which case it is treated as a guest login and 
4231                         mapped into the <link linkend="GUESTACCOUNT"><parameter>
4232                         guest account</parameter></link>.</para></listitem>
4233
4234                         <listitem><para><constant>Bad Password</constant> - Means user logins 
4235                         with an invalid password are treated as a guest login and mapped 
4236                         into the <link linkend="GUESTACCOUNT">guest account</link>. Note that 
4237                         this can cause problems as it means that any user incorrectly typing 
4238                         their password will be silently logged on as "guest" - and 
4239                         will not know the reason they cannot access files they think
4240                         they should - there will have been no message given to them
4241                         that they got their password wrong. Helpdesk services will
4242                         <emphasis>hate</emphasis> you if you set the <parameter>map to 
4243                         guest</parameter> parameter this way :-).</para></listitem>
4244                 </itemizedlist>
4245
4246                 <para>Note that this parameter is needed to set up "Guest" 
4247                 share services when using <parameter>security</parameter> modes other than 
4248                 share. This is because in these modes the name of the resource being
4249                 requested is <emphasis>not</emphasis> sent to the server until after 
4250                 the server has successfully authenticated the client so the server 
4251                 cannot make authentication decisions at the correct time (connection 
4252                 to the share) for "Guest" shares.</para>
4253
4254                 <para>For people familiar with the older Samba releases, this 
4255                 parameter maps to the old compile-time setting of the <constant>
4256                 GUEST_SESSSETUP</constant> value in local.h.</para>
4257
4258                 <para>Default: <command>map to guest = Never</command></para>
4259                 <para>Example: <command>map to guest = Bad User</command></para>
4260                 </listitem>
4261                 </varlistentry>
4262
4263
4264
4265                 <varlistentry>
4266                 <term><anchor id="MAXCONNECTIONS">max connections (S)</term>
4267                 <listitem><para>This option allows the number of simultaneous 
4268                 connections to a service to be limited. If <parameter>max connections
4269                 </parameter> is greater than 0 then connections will be refused if 
4270                 this number of connections to the service are already open. A value 
4271                 of zero mean an unlimited number of connections may be made.</para>
4272
4273                 <para>Record lock files are used to implement this feature. The 
4274                 lock files will be stored in the directory specified by the <link
4275                 linkend="LOCKDIRECTORY"><parameter>lock directory</parameter></link> 
4276                 option.</para>
4277
4278                 <para>Default: <command>max connections = 0</command></para>
4279                 <para>Example: <command>max connections = 10</command></para>
4280                 </listitem>
4281                 </varlistentry>
4282
4283
4284
4285                 <varlistentry>
4286                 <term><anchor id="MAXDISKSIZE">max disk size (G)</term>
4287                 <listitem><para>This option allows you to put an upper limit 
4288                 on the apparent size of disks. If you set this option to 100 
4289                 then all shares will appear to be not larger than 100 MB in 
4290                 size.</para>
4291
4292                 <para>Note that this option does not limit the amount of 
4293                 data you can put on the disk. In the above case you could still 
4294                 store much more than 100 MB on the disk, but if a client ever asks 
4295                 for the amount of free disk space or the total disk size then the 
4296                 result will be bounded by the amount specified in <parameter>max 
4297                 disk size</parameter>.</para>
4298
4299                 <para>This option is primarily useful to work around bugs 
4300                 in some pieces of software that can't handle very large disks, 
4301                 particularly disks over 1GB in size.</para>
4302
4303                 <para>A <parameter>max disk size</parameter> of 0 means no limit.</para>
4304
4305                 <para>Default: <command>max disk size = 0</command></para>
4306                 <para>Example: <command>max disk size = 1000</command></para>
4307                 </listitem>
4308                 </varlistentry>
4309                 
4310                 
4311                 
4312                 <varlistentry>
4313                 <term><anchor id="MAXLOGSIZE">max log size (G)</term>
4314                 <listitem><para>This option (an integer in kilobytes) specifies 
4315                 the max size the log file should grow to. Samba periodically checks 
4316                 the size and if it is exceeded it will rename the file, adding 
4317                 a <filename>.old</filename> extension.</para>
4318
4319                 <para>A size of 0 means no limit.</para>
4320
4321                 <para>Default: <command>max log size = 5000</command></para>
4322                 <para>Example: <command>max log size = 1000</command></para>
4323                 </listitem>
4324                 </varlistentry>
4325
4326
4327
4328                 <varlistentry>
4329                 <term><anchor id="MAXMUX">max mux (G)</term>
4330                 <listitem><para>This option controls the maximum number of 
4331                 outstanding simultaneous SMB operations that Samba tells the client 
4332                 it will allow. You should never need to set this parameter.</para>
4333
4334                 <para>Default: <command>max mux = 50</command></para>
4335                 </listitem>
4336                 </varlistentry>
4337
4338
4339
4340                 <varlistentry>
4341                 <term><anchor id="MAXOPENFILES">max open files (G)</term>
4342                 <listitem><para>This parameter limits the maximum number of 
4343                 open files that one <ulink url="smbd.8.html">smbd(8)</ulink> file 
4344                 serving process may have open for a client at any one time. The 
4345                 default for this parameter is set very high (10,000) as Samba uses 
4346                 only one bit per unopened file.</para>
4347                 
4348                 <para>The limit of the number of open files is usually set 
4349                 by the UNIX per-process file descriptor limit rather than 
4350                 this parameter so you should never need to touch this parameter.</para>
4351
4352                 <para>Default: <command>max open files = 10000</command></para>
4353                 </listitem>
4354                 </varlistentry>
4355
4356
4357
4358                 <varlistentry>
4359                 <term><anchor id="MAXPRINTJOBS">max print jobs (S)</term>
4360                 <listitem><para>This parameter limits the maximum number of 
4361                 jobs allowable in a Samba printer queue at any given moment.
4362                 If this number is exceeded, <ulink url="smbd.8.html"><command>
4363                 smbd(8)</command></ulink> will remote "Out of Space" to the client.
4364                 See all <link linkend="TOTALPRINTJOBS"><parameter>total
4365                 print jobs</parameter></link>.
4366                 </para>
4367
4368                 <para>Default: <command>max print jobs = 1000</command></para>
4369                 <para>Example: <command>max print jobs = 5000</command></para>
4370                 </listitem>
4371                 </varlistentry>
4372
4373
4374                 <varlistentry>
4375                 <term><anchor id="MAXPROTOCOL">max protocol (G)</term>
4376                 <listitem><para>The value of the parameter (a string) is the highest 
4377                 protocol level that will be supported by the server.</para>
4378
4379                 <para>Possible values are :</para>
4380                 <itemizedlist>
4381                         <listitem><para><constant>CORE</constant>: Earliest version. No 
4382                         concept of user names.</para></listitem>
4383                         
4384                         <listitem><para><constant>COREPLUS</constant>: Slight improvements on 
4385                         CORE for efficiency.</para></listitem>
4386
4387                         <listitem><para><constant>LANMAN1</constant>: First <emphasis>
4388                         modern</emphasis> version of the protocol. Long filename
4389                         support.</para></listitem>
4390
4391                         <listitem><para><constant>LANMAN2</constant>: Updates to Lanman1 protocol.
4392                         </para></listitem>
4393
4394                         <listitem><para><constant>NT1</constant>: Current up to date version of 
4395                         the protocol. Used by Windows NT. Known as CIFS.</para></listitem>
4396                 </itemizedlist>
4397
4398                 <para>Normally this option should not be set as the automatic 
4399                 negotiation phase in the SMB protocol takes care of choosing 
4400                 the appropriate protocol.</para>
4401                 
4402                 <para>See also <link linkend="MINPROTOCOL"><parameter>min
4403                 protocol</parameter></link></para>
4404
4405                 <para>Default: <command>max protocol = NT1</command></para>
4406                 <para>Example: <command>max protocol = LANMAN1</command></para>
4407                 </listitem>
4408                 </varlistentry>
4409
4410
4411
4412                 <varlistentry>
4413                 <term><anchor id="MAXSMBDPROCESSES">max smbd processes (G)</term>
4414                 <listitem><para>This parameter limits the maximum number of 
4415                 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
4416                 processes concurrently running on a system and is intended
4417                 as a stopgap to prevent degrading service to clients in the event
4418                 that the server has insufficient resources to handle more than this
4419                 number of connections.  Remember that under normal operating
4420                 conditions, each user will have an <ulink url="smbd.8.html">smbd</ulink> associated with him or her
4421                 to handle connections to all shares from a given host.
4422                 </para>
4423
4424                 <para>Default: <command>max smbd processes = 0</command>   ## no limit</para>
4425                 <para>Example: <command>max smbd processes = 1000</command></para>
4426                 </listitem>
4427                 </varlistentry>
4428
4429
4430
4431
4432                 <varlistentry>
4433                 <term><anchor id="MAXTTL">max ttl (G)</term>
4434                 <listitem><para>This option tells <ulink url="nmbd.8.html">nmbd(8)</ulink>
4435                 what the default 'time to live' of NetBIOS names should be (in seconds) 
4436                 when <command>nmbd</command> is requesting a name using either a
4437                 broadcast packet or from a WINS server. You should never need to
4438                 change this parameter. The default is 3 days.</para>
4439
4440                 <para>Default: <command>max ttl = 259200</command></para>
4441                 </listitem>
4442                 </varlistentry>
4443
4444
4445
4446                 <varlistentry>
4447                 <term><anchor id="MAXWINSTTL">max wins ttl (G)</term>
4448                 <listitem><para>This option tells <ulink url="nmbd.8.html">nmbd(8)
4449                 </ulink> when acting as a WINS server (<link linkend="WINSSUPPORT">
4450                 <parameter>wins support = yes</parameter></link>) what the maximum
4451                 'time to live' of NetBIOS names that <command>nmbd</command> 
4452                 will grant will be (in seconds). You should never need to change this
4453                 parameter.  The default is 6 days (518400 seconds).</para>
4454
4455                 <para>See also the <link linkend="MINWINSTTL"><parameter>min 
4456                 wins ttl</parameter></link> parameter.</para>
4457
4458                 <para>Default: <command>max wins ttl = 518400</command></para>
4459                 </listitem>
4460                 </varlistentry>
4461
4462
4463
4464                 <varlistentry>
4465                 <term><anchor id="MAXXMIT">max xmit (G)</term>
4466                 <listitem><para>This option controls the maximum packet size 
4467                 that will be negotiated by Samba. The default is 65535, which 
4468                 is the maximum. In some cases you may find you get better performance 
4469                 with a smaller value. A value below 2048 is likely to cause problems.
4470                 </para>
4471
4472                 <para>Default: <command>max xmit = 65535</command></para>
4473                 <para>Example: <command>max xmit = 8192</command></para>
4474                 </listitem>
4475                 </varlistentry>
4476
4477
4478
4479                 <varlistentry>
4480                 <term><anchor id="MESSAGECOMMAND">message command (G)</term>
4481                 <listitem><para>This specifies what command to run when the 
4482                 server receives a WinPopup style message.</para>
4483
4484                 <para>This would normally be a command that would 
4485                 deliver the message somehow. How this is to be done is 
4486                 up to your imagination.</para>
4487
4488                 <para>An example is:</para>
4489
4490                 <para><command>message command = csh -c 'xedit %s;rm %s' &</command>
4491                 </para>
4492
4493                 <para>This delivers the message using <command>xedit</command>, then 
4494                 removes it afterwards. <emphasis>NOTE THAT IT IS VERY IMPORTANT 
4495                 THAT THIS COMMAND RETURN IMMEDIATELY</emphasis>. That's why I 
4496                 have the '&' on the end. If it doesn't return immediately then 
4497                 your PCs may freeze when sending messages (they should recover 
4498                 after 30 seconds, hopefully).</para>
4499
4500                 <para>All messages are delivered as the global guest user. 
4501                 The command takes the standard substitutions, although <parameter>
4502                 %u</parameter> won't work (<parameter>%U</parameter> may be better 
4503                 in this case).</para>
4504
4505                 <para>Apart from the standard substitutions, some additional 
4506                 ones apply. In particular:</para>
4507
4508                 <itemizedlist>
4509                         <listitem><para><parameter>%s</parameter> = the filename containing 
4510                         the message.</para></listitem>
4511                         
4512                         <listitem><para><parameter>%t</parameter> = the destination that 
4513                         the message was sent to (probably the server name).</para></listitem>
4514
4515                         <listitem><para><parameter>%f</parameter> = who the message 
4516                         is from.</para></listitem>
4517                 </itemizedlist>
4518
4519                 <para>You could make this command send mail, or whatever else 
4520                 takes your fancy. Please let us know of any really interesting 
4521                 ideas you have.</para>
4522
4523
4524                 <para>Here's a way of sending the messages as mail to root:</para>
4525
4526                 <para><command>message command = /bin/mail -s 'message from %f on 
4527                 %m' root &lt; %s; rm %s</command></para>
4528
4529                 <para>If you don't have a message command then the message 
4530                 won't be delivered and Samba will tell the sender there was 
4531                 an error. Unfortunately WfWg totally ignores the error code 
4532                 and carries on regardless, saying that the message was delivered.
4533                 </para>
4534
4535                 <para>If you want to silently delete it then try:</para>
4536
4537                 <para><command>message command = rm %s</command></para>
4538
4539                 <para>Default: <emphasis>no message command</emphasis></para>
4540                 <para>Example: <command>message command = csh -c 'xedit %s;
4541                 rm %s' &</command></para>
4542                 </listitem>
4543                 </varlistentry>
4544
4545
4546
4547
4548                 <varlistentry>
4549                 <term><anchor id="MINPASSWDLENGTH">min passwd length (G)</term>
4550                 <listitem><para>Synonym for <link linkend="MINPASSWORDLENGTH">
4551                 <parameter>min password length</parameter></link>.</para>
4552                 </listitem>
4553                 </varlistentry>
4554
4555
4556
4557                 <varlistentry>
4558                 <term><anchor id="MINPASSWORDLENGTH">min password length (G)</term>
4559                 <listitem><para>This option sets the minimum length in characters 
4560                 of a plaintext password that <command>smbd</command> will accept when performing 
4561                 UNIX password changing.</para>
4562
4563                 <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix 
4564                 password sync</parameter></link>, <link linkend="PASSWDPROGRAM">
4565                 <parameter>passwd program</parameter></link> and <link
4566                 linkend="PASSWDCHATDEBUG"><parameter>passwd chat debug</parameter>
4567                 </link>.</para>
4568
4569                 <para>Default: <command>min password length = 5</command></para>
4570                 </listitem>
4571                 </varlistentry>
4572
4573
4574
4575                 <varlistentry>
4576                 <term><anchor id="MINPRINTSPACE">min print space (S)</term>
4577                 <listitem><para>This sets the minimum amount of free disk 
4578                 space that must be available before a user will be able to spool 
4579                 a print job. It is specified in kilobytes. The default is 0, which 
4580                 means a user can always spool a print job.</para>
4581
4582                 <para>See also the <link linkend="PRINTING"><parameter>printing
4583                 </parameter></link> parameter.</para>
4584
4585                 <para>Default: <command>min print space = 0</command></para>
4586                 <para>Example: <command>min print space = 2000</command></para>
4587                 </listitem>
4588                 </varlistentry>
4589
4590
4591
4592
4593                 <varlistentry>
4594                 <term><anchor id="MINPROTOCOL">min protocol (G)</term>
4595                 <listitem><para>The value of the parameter (a string) is the 
4596                 lowest SMB protocol dialect than Samba will support.  Please refer
4597                 to the <link linkend="MAXPROTOCOL"><parameter>max protocol</parameter></link>
4598                 parameter for a list of valid protocol names and a brief description
4599                 of each.  You may also wish to refer to the C source code in
4600                 <filename>source/smbd/negprot.c</filename> for a listing of known protocol
4601                 dialects supported by clients.</para>
4602                 
4603                 <para>If you are viewing this parameter as a security measure, you should
4604                 also refer to the <link linkend="LANMANAUTH"><parameter>lanman 
4605                 auth</parameter></link> parameter.  Otherwise, you should never need 
4606                 to change this parameter.</para>
4607                 
4608                 <para>Default : <command>min protocol = CORE</command></para>
4609                 <para>Example : <command>min protocol = NT1</command>  # disable DOS 
4610                 clients</para>
4611                 </listitem>
4612                 </varlistentry>
4613
4614
4615
4616
4617                 <varlistentry>
4618                 <term><anchor id="MINWINSTTL">min wins ttl (G)</term>
4619                 <listitem><para>This option tells <ulink url="nmbd.8.html">nmbd(8)</ulink>
4620                 when acting as a WINS server (<link linkend="WINSSUPPORT"><parameter>
4621                 wins support = yes</parameter></link>) what the minimum 'time to live' 
4622                 of NetBIOS names that <command>nmbd</command> will grant will be (in 
4623                 seconds). You should never need to change this parameter.  The default 
4624                 is 6 hours (21600 seconds).</para>
4625
4626                 <para>Default: <command>min wins ttl = 21600</command></para>
4627                 </listitem>
4628                 </varlistentry>
4629
4630
4631                 
4632                 
4633                 <varlistentry>
4634                 <term><anchor id="MSDFSROOT">msdfs root (S)</term>
4635                 <listitem><para>This boolean parameter is only available if 
4636                 Samba is configured  and  compiled with the <command>
4637                 --with-msdfs</command> option.  If set to <constant>yes</constant>, 
4638                 Samba treats the share as a Dfs root and  allows clients to browse 
4639                 the distributed file system tree rooted at the share directory. 
4640                 Dfs links are specified  in  the share directory by symbolic 
4641                 links of the form <filename>msdfs:serverA\shareA,serverB\shareB
4642                 </filename> and so on.  For more information on setting up a Dfs tree 
4643                 on Samba,  refer to <ulink url="msdfs_setup.html">msdfs_setup.html
4644                 </ulink>.</para>
4645                 
4646                 <para>See also <link linkend="HOSTMSDFS"><parameter>host msdfs
4647                 </parameter></link></para>
4648                 
4649                 <para>Default: <command>msdfs root = no</command></para>
4650                 </listitem>
4651                 </varlistentry>
4652           
4653           
4654                 <varlistentry> 
4655                 <term><anchor id="NAMERESOLVEORDER">name resolve order (G)</term>
4656                 <listitem><para>This option is used by the programs in the Samba 
4657                 suite to determine what naming services to use and in what order 
4658                 to resolve host names to IP addresses. The option takes a space 
4659                 separated string of name resolution options.</para>
4660
4661                 <para>The options are :"lmhosts", "host", "wins" and "bcast". They 
4662                 cause names to be resolved as follows :</para>
4663
4664                 <itemizedlist>
4665                         <listitem><para><constant>lmhosts</constant> : Lookup an IP 
4666                         address in the Samba lmhosts file. If the line in lmhosts has 
4667                         no name type attached to the NetBIOS name (see the <ulink 
4668                         url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
4669                         any name type matches for lookup.</para></listitem>
4670
4671                         <listitem><para><constant>host</constant> : Do a standard host 
4672                         name to IP address resolution, using the system <filename>/etc/hosts
4673                         </filename>, NIS, or DNS lookups. This method of name resolution 
4674                         is operating system depended for instance on IRIX or Solaris this 
4675                         may be controlled by the <filename>/etc/nsswitch.conf</filename> 
4676                         file.  Note that this method is only used if the NetBIOS name 
4677                         type being queried is the 0x20 (server) name type, otherwise 
4678                         it is ignored.</para></listitem>
4679
4680                         <listitem><para><constant>wins</constant> : Query a name with 
4681                         the IP address listed in the <link linkend="WINSSERVER"><parameter>
4682                         wins server</parameter></link> parameter.  If no WINS server has
4683                         been specified this method will be ignored.</para></listitem>
4684
4685                         <listitem><para><constant>bcast</constant> : Do a broadcast on 
4686                         each of the known local interfaces listed in the <link 
4687                         linkend="INTERFACES"><parameter>interfaces</parameter></link> 
4688                         parameter. This is the least reliable of the name resolution 
4689                         methods as it depends on the target host being on a locally 
4690                         connected subnet.</para></listitem>
4691                 </itemizedlist>
4692
4693                 <para>Default: <command>name resolve order = lmhosts host wins bcast
4694                 </command></para>
4695                 <para>Example: <command>name resolve order = lmhosts bcast host
4696                 </command></para>
4697
4698                 <para>This will cause the local lmhosts file to be examined 
4699                 first, followed by a broadcast attempt, followed by a normal 
4700                 system hostname lookup.</para>
4701                 </listitem>
4702                 </varlistentry>
4703                 
4704
4705
4706         
4707                 <varlistentry>
4708                 <term><anchor id="NETBIOSALIASES">netbios aliases (G)</term>
4709                 <listitem><para>This is a list of NetBIOS names that <ulink 
4710                 url="nmbd.8.html">nmbd(8)</ulink> will advertise as additional 
4711                 names by which the Samba server is known. This allows one machine 
4712                 to appear in browse lists under multiple names. If a machine is 
4713                 acting as a browse server or logon server none 
4714                 of these names will be advertised as either browse server or logon 
4715                 servers, only the primary name of the machine will be advertised 
4716                 with these capabilities.</para>
4717                 
4718                 <para>See also <link linkend="NETBIOSNAME"><parameter>netbios 
4719                 name</parameter></link>.</para>
4720
4721                 <para>Default: <emphasis>empty string (no additional names)</emphasis></para>
4722                 <para>Example: <command>netbios aliases = TEST TEST1 TEST2</command></para>
4723                 </listitem>
4724                 </varlistentry>
4725                 
4726
4727
4728                 <varlistentry>
4729                 <term><anchor id="NETBIOSNAME">netbios name (G)</term>
4730                 <listitem><para>This sets the NetBIOS name by which a Samba 
4731                 server is known. By default it is the same as the first component 
4732                 of the host's DNS name. If a machine is a browse server or
4733                 logon server this name (or the first component
4734                 of the hosts DNS name) will be the name that these services are
4735                 advertised under.</para>
4736                 
4737                 <para>See also <link linkend="NETBIOSALIASES"><parameter>netbios 
4738                 aliases</parameter></link>.</para>
4739
4740                 <para>Default: <emphasis>machine DNS name</emphasis></para>
4741                 <para>Example: <command>netbios name = MYNAME</command></para>
4742                 </listitem>
4743                 </varlistentry>
4744
4745
4746
4747                 <varlistentry>
4748                 <term><anchor id="NETBIOSSCOPE">netbios scope (G)</term>
4749                 <listitem><para>This sets the NetBIOS scope that Samba will 
4750                 operate under. This should not be set unless every machine 
4751                 on your LAN also sets this value.</para>
4752                 </listitem>
4753                 </varlistentry>
4754                 
4755
4756                 <varlistentry>
4757                 <term><anchor id="NISHOMEDIR">nis homedir (G)</term>
4758                 <listitem><para>Get the home share server from a NIS map. For 
4759                 UNIX systems that use an automounter, the user's home directory 
4760                 will often be mounted on a workstation on demand from a remote 
4761                 server. </para>
4762
4763                 <para>When the Samba logon server is not the actual home directory 
4764                 server, but is mounting the home directories via NFS then two 
4765                 network hops would be required to access the users home directory 
4766                 if the logon server told the client to use itself as the SMB server 
4767                 for home directories (one over SMB and one over NFS). This can 
4768                 be very slow.</para>
4769
4770                 <para>This option allows Samba to return the home share as 
4771                 being on a different server to the logon server and as 
4772                 long as a Samba daemon is running on the home directory server, 
4773                 it will be mounted on the Samba client directly from the directory 
4774                 server. When Samba is returning the home share to the client, it 
4775                 will consult the NIS map specified in <link linkend="HOMEDIRMAP">
4776                 <parameter>homedir map</parameter></link> and return the server 
4777                 listed there.</para>
4778
4779                 <para>Note that for this option to work there must be a working 
4780                 NIS system and the Samba server with this option must also 
4781                 be a logon server.</para>
4782
4783                 <para>Default: <command>nis homedir = no</command></para>
4784                 </listitem>
4785                 </varlistentry>
4786
4787
4788
4789                 <varlistentry>
4790                 <term><anchor id="NONUNIXACCOUNTRANGE">non unix account range (G)</term>
4791                 <listitem><para>The non unix account range parameter specifies 
4792                 the range of 'user ids' that are allocated by the various 'non unix 
4793                 account' passdb backends.  These backends allow
4794                 the storage of passwords for users who don't exist in /etc/passwd.  
4795                 This is most often used for machine account creation. 
4796                 This range of ids should have no existing local or NIS users within 
4797                 it as strange conflicts can occur otherwise.</para>
4798
4799                 <para>NOTE: These userids never appear on the system and Samba will never
4800                 'become' these users. They are used only to ensure that the algorithmic 
4801                 RID mapping does not conflict with normal users.
4802                 </para>
4803
4804                 <para>Default: <command>non unix account range = &lt;empty string&gt;
4805                 </command></para>
4806                 
4807                 <para>Example: <command>non unix account range = 10000-20000</command></para>
4808                 </listitem>
4809                 </varlistentry>
4810
4811
4812
4813                 <varlistentry>
4814                 <term><anchor id="NTACLSUPPORT">nt acl support (S)</term>
4815                 <listitem><para>This boolean parameter controls whether 
4816                 <ulink url="smbd.8.html">smbd(8)</ulink> will attempt to map 
4817                 UNIX permissions into Windows NT access control lists.
4818                 This parameter was formally a global parameter in releases
4819                 prior to 2.2.2.</para>
4820                 
4821                 <para>Default: <command>nt acl support = yes</command></para>
4822                 </listitem>
4823                 </varlistentry>
4824
4825
4826
4827                 <varlistentry>
4828                 <term><anchor id="NTPIPESUPPORT">nt pipe support (G)</term>
4829                 <listitem><para>This boolean parameter controls whether 
4830                 <ulink url="smbd.8.html">smbd(8)</ulink> will allow Windows NT 
4831                 clients to connect to the NT SMB specific <constant>IPC$</constant> 
4832                 pipes. This is a developer debugging option and can be left
4833                 alone.</para>
4834
4835                 <para>Default: <command>nt pipe support = yes</command></para>
4836                 </listitem>
4837                 </varlistentry>
4838
4839
4840
4841                 <varlistentry>
4842                 <term><anchor id="NULLPASSWORDS">null passwords (G)</term>
4843                 <listitem><para>Allow or disallow client access to accounts 
4844                 that have null passwords. </para>
4845
4846                 <para>See also <ulink url="smbpasswd.5.html">smbpasswd (5)</ulink>.</para>
4847
4848                 <para>Default: <command>null passwords = no</command></para>
4849                 </listitem>
4850                 </varlistentry>
4851
4852
4853
4854
4855                 <varlistentry>
4856                 <term><anchor id="OBEYPAMRESTRICTIONS">obey pam restrictions (G)</term>
4857                 <listitem><para>When Samba 2.2 is configured to enable PAM support
4858                 (i.e. --with-pam), this parameter will control whether or not Samba
4859                 should obey PAM's account and session management directives.  The 
4860                 default behavior is to use PAM for clear text authentication only
4861                 and to ignore any account or session management.  Note that Samba
4862                 always ignores PAM for authentication in the case of <link
4863                 linkend="ENCRYPTPASSWORDS"><parameter>encrypt passwords = yes</parameter>
4864                 </link>.  The reason is that PAM modules cannot support the challenge/response
4865                 authentication mechanism needed in the presence of SMB password encryption.
4866                 </para>
4867
4868                 <para>Default: <command>obey pam restrictions = no</command></para>
4869                 </listitem>
4870                 </varlistentry>
4871
4872
4873
4874
4875
4876                 <varlistentry>
4877                 <term><anchor id="ONLYUSER">only user (S)</term>
4878                 <listitem><para>This is a boolean option that controls whether 
4879                 connections with usernames not in the <parameter>user</parameter> 
4880                 list will be allowed. By default this option is disabled so that a 
4881                 client can supply a username to be used by the server.  Enabling
4882                 this parameter will force the server to only user the login 
4883                 names from the <parameter>user</parameter> list and is only really
4884                 useful in <link linkend="SECURITYEQUALSSHARE">shave level</link>
4885                 security.</para>
4886
4887                 <para>Note that this also means Samba won't try to deduce 
4888                 usernames from the service name. This can be annoying for 
4889                 the [homes] section. To get around this you could use <command>user =
4890                 %S</command> which means your <parameter>user</parameter> list
4891                 will be just the service name, which for home directories is the 
4892                 name of the user.</para>
4893
4894                 <para>See also the <link linkend="USER"><parameter>user</parameter>
4895                 </link> parameter.</para>
4896
4897                 <para>Default: <command>only user = no</command></para>
4898                 </listitem>
4899                 </varlistentry>
4900
4901
4902
4903
4904                 <varlistentry>
4905                 <term><anchor id="ONLYGUEST">only guest (S)</term>
4906                 <listitem><para>A synonym for <link linkend="GUESTONLY"><parameter>
4907                 guest only</parameter></link>.</para>
4908                 </listitem>
4909                 </varlistentry>
4910
4911
4912
4913                 <varlistentry>
4914                 <term><anchor id="OPLOCKBREAKWAITTIME">oplock break wait time (G)</term>
4915                 <listitem><para>This is a tuning parameter added due to bugs in 
4916                 both Windows 9x and WinNT. If Samba responds to a client too 
4917                 quickly when that client issues an SMB that can cause an oplock 
4918                 break request, then the network client can fail and not respond 
4919                 to the break request. This tuning parameter (which is set in milliseconds) 
4920                 is the amount of time Samba will wait before sending an oplock break 
4921                 request to such (broken) clients.</para>
4922
4923                 <para><emphasis>DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ 
4924                 AND UNDERSTOOD THE SAMBA OPLOCK CODE</emphasis>.</para>
4925
4926                 <para>Default: <command>oplock break wait time = 0</command></para>
4927                 </listitem>
4928                 </varlistentry>
4929
4930
4931                 <varlistentry>
4932                 <term><anchor id="OPLOCKCONTENTIONLIMIT">oplock contention limit (S)</term>
4933                 <listitem><para>This is a <emphasis>very</emphasis> advanced 
4934                 <ulink url="smbd.8.html">smbd(8)</ulink> tuning option to 
4935                 improve the efficiency of the granting of oplocks under multiple 
4936                 client contention for the same file.</para>
4937                 
4938                 <para>In brief it specifies a number, which causes <ulink url="smbd.8.html">smbd</ulink> not to 
4939                 grant an oplock even when requested if the approximate number of 
4940                 clients contending for an oplock on the same file goes over this 
4941                 limit. This causes <command>smbd</command> to behave in a similar 
4942                 way to Windows NT.</para>
4943
4944                 <para><emphasis>DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ 
4945                 AND UNDERSTOOD THE SAMBA OPLOCK CODE</emphasis>.</para>
4946
4947                 <para>Default: <command>oplock contention limit = 2</command></para>
4948                 </listitem>
4949                 </varlistentry>
4950
4951
4952
4953
4954
4955                 <varlistentry>
4956                 <term><anchor id="OPLOCKS">oplocks (S)</term>
4957                 <listitem><para>This boolean option tells <command>smbd</command> whether to 
4958                 issue oplocks (opportunistic locks) to file open requests on this 
4959                 share. The oplock code can dramatically (approx. 30% or more) improve 
4960                 the speed of access to files on Samba servers. It allows the clients 
4961                 to aggressively cache files locally and you may want to disable this 
4962                 option for unreliable network environments (it is turned on by 
4963                 default in Windows NT Servers).  For more information see the file 
4964                 <filename>Speed.txt</filename> in the Samba <filename>docs/</filename> 
4965                 directory.</para>
4966
4967                 <para>Oplocks may be selectively turned off on certain files with a 
4968                 share. See the <link linkend="VETOOPLOCKFILES"><parameter>
4969                 veto oplock files</parameter></link> parameter. On some systems 
4970                 oplocks are recognized by the underlying operating system. This 
4971                 allows data synchronization between all access to oplocked files, 
4972                 whether it be via Samba or NFS or a local UNIX process. See the 
4973                 <parameter>kernel oplocks</parameter> parameter for details.</para>
4974
4975                 <para>See also the <link linkend="KERNELOPLOCKS"><parameter>kernel 
4976                 oplocks</parameter></link> and <link linkend="LEVEL2OPLOCKS"><parameter>
4977                 level2 oplocks</parameter></link> parameters.</para>
4978
4979                 <para>Default: <command>oplocks = yes</command></para>
4980                 </listitem>
4981                 </varlistentry>
4982
4983
4984
4985                 <varlistentry>
4986                 <term><anchor id="OSLEVEL">os level (G)</term>
4987                 <listitem><para>This integer value controls what level Samba 
4988                 advertises itself as for browse elections. The value of this 
4989                 parameter determines whether <ulink url="nmbd.8.html">nmbd(8)</ulink> 
4990                 has a chance of becoming a local master browser for the <parameter>
4991                 WORKGROUP</parameter> in the local broadcast area.</para>
4992                 
4993                 <para><emphasis>Note :</emphasis>By default, Samba will win 
4994                 a local master browsing election over all Microsoft operating 
4995                 systems except a Windows NT 4.0/2000 Domain Controller.  This 
4996                 means that a misconfigured Samba host can effectively isolate 
4997                 a subnet for browsing purposes.  See <filename>BROWSING.txt
4998                 </filename> in the Samba <filename>docs/</filename> directory 
4999                 for details.</para>
5000
5001                 <para>Default: <command>os level = 20</command></para>
5002                 <para>Example: <command>os level = 65 </command></para>
5003                 </listitem>
5004                 </varlistentry>
5005
5006
5007
5008                 <varlistentry>
5009                 <term><anchor id="OS2DRIVERMAP">os2 driver map (G)</term>
5010                 <listitem><para>The parameter is used to define the absolute
5011                 path to a file containing a mapping of Windows NT printer driver
5012                 names to OS/2 printer driver names.  The format is:</para>
5013                 
5014                 <para>&lt;nt driver name&gt; = &lt;os2 driver 
5015                 name&gt;.&lt;device name&gt;</para>
5016                 
5017                 <para>For example, a valid entry using the HP LaserJet 5
5018                 printer driver would appear as <command>HP LaserJet 5L = LASERJET.HP 
5019                 LaserJet 5L</command>.</para>
5020                 
5021                 <para>The need for the file is due to the printer driver namespace 
5022                 problem described in the <ulink url="printer_driver2.html">Samba 
5023                 Printing HOWTO</ulink>.  For more details on OS/2 clients, please 
5024                 refer to the <ulink url="OS2-Client-HOWTO.html">OS2-Client-HOWTO
5025                 </ulink> containing in the Samba documentation.</para>
5026
5027                 <para>Default: <command>os2 driver map = &lt;empty string&gt;
5028                 </command></para>
5029                 </listitem>
5030                 </varlistentry>
5031
5032
5033                 <varlistentry>
5034                 <term><anchor id="PAMPASSWORDCHANGE">pam password change (G)</term>
5035                 <listitem><para>With the addition of better PAM support in Samba 2.2, 
5036                 this parameter, it is possible to use PAM's password change control 
5037                 flag for Samba.  If enabled, then PAM will be used for password
5038                 changes when requested by an SMB client instead of the program listed in 
5039                 <link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter></link>. 
5040                 It should be possible to enable this without changing your 
5041                 <link linkend="PASSWDCHAT"><parameter>passwd chat</parameter></link>
5042                 parameter for most setups.
5043                 </para>
5044                 
5045                 <para>Default: <command>pam password change = no</command></para>
5046                 
5047                 </listitem>
5048                 </varlistentry>
5049
5050
5051                 <varlistentry>
5052                 <term><anchor id="PANICACTION">panic action (G)</term>
5053                 <listitem><para>This is a Samba developer option that allows a 
5054                 system command to be called when either <ulink url="smbd.8.html">
5055                 smbd(8)</ulink> or <ulink url="nmbd.8.html">nmbd(8)</ulink> 
5056                 crashes. This is usually used to draw attention to the fact that 
5057                 a problem occurred.</para>
5058
5059                 <para>Default: <command>panic action = &lt;empty string&gt;</command></para>
5060                 <para>Example: <command>panic action = "/bin/sleep 90000"</command></para>
5061                 </listitem>
5062                 </varlistentry>
5063
5064
5065                 <varlistentry>
5066                 <term><anchor id="PASSDBBACKEND">passdb backend (G)</term>
5067                 <listitem><para>This option allows the administrator to chose what
5068                 backend in which to store passwords.  This allows (for example) both 
5069                 smbpasswd and tdbsam to be used without a recompile.  Only one can
5070                 be used at a time however, and experimental backends must still be selected
5071                 (eg --with-tdbsam) at configure time.
5072                 </para>
5073
5074                 <para>This paramater is in two parts, the backend's name, and a 'location'
5075                 string that has meaning only to that particular backed.  These are separated
5076                 by a : character.</para>
5077
5078                 <para>Available backends can include:
5079                 <itemizedlist>
5080                         <listitem><para><command>smbpasswd</command> - The default smbpasswd
5081                         backend.  Takes a path to the smbpasswd file as an optional argument.</para></listitem>
5082                         
5083                         <listitem><para><command>smbpasswd_nua</command> - The smbpasswd
5084                         backend, but with support for 'not unix accounts'.  
5085                         Takes a path to the smbpasswd file as an optional argument.</para>
5086                         <para>See also <link linkend="NONUNIXACCOUNTRANGE">
5087                         <parameter>non unix account range</parameter></link></para></listitem>
5088
5089                         <listitem><para><command>tdbsam</command> - The TDB based password storage
5090                         backend.  Takes a path to the TDB as an optional argument (defaults to passdb.tdb 
5091                         in the <link linkend="PRIVATEDIR">
5092                         <parameter>private dir</parameter></link> directory.</para></listitem>
5093                         
5094                         <listitem><para><command>tdbsam_nua</command> - The TDB based password storage
5095                         backend, with non unix account support.  Takes a path to the TDB as an optional argument (defaults to passdb.tdb 
5096                         in the <link linkend="PRIVATEDIR">
5097                         <parameter>private dir</parameter></link> directory.</para>
5098                         <para>See also <link linkend="NONUNIXACCOUNTRANGE">
5099                         <parameter>non unix account range</parameter></link></para></listitem>
5100                         
5101                         <listitem><para><command>ldapsam</command> - The LDAP based passdb 
5102                         backend.  Takes an LDAP URL as an optional argument (defaults to 
5103                         <command>ldap://localhost</command>)</para></listitem>
5104                         
5105                         <listitem><para><command>ldapsam_nua</command> - The LDAP based passdb 
5106                         backend, with non unix account support.  Takes an LDAP URL as an optional argument (defaults to 
5107                         <command>ldap://localhost</command>)</para>
5108                         <para>See also <link linkend="NONUNIXACCOUNTRANGE">
5109                         <parameter>non unix account range</parameter></link></para></listitem>
5110                         
5111                         <listitem><para><command>plugin</command> - Allows Samba to load an 
5112                         arbitary passdb backend from the .so specified as a compulsary argument.
5113                         </para>
5114
5115                         <para>Any characters after the (optional) second : are passed to the plugin
5116                         for its own processing</para>
5117                         </listitem>
5118                         
5119                 </itemizedlist>
5120                 </para>
5121
5122                 <para>Default: <command>passdb backend = smbpasswd</command></para>
5123                 <para>Example: <command>passdb backend = tdbsam:/etc/samba/private/passdb.tdb</command></para>
5124                 <para>Example: <command>passdb backend = ldapsam_nua:ldaps://ldap.example.com</command></para>
5125                 <para>Example: <command>passdb backend = plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args</command></para>
5126                 </listitem>
5127                 </varlistentry>
5128
5129
5130                 <varlistentry>
5131                 <term><anchor id="PASSWDCHAT">passwd chat (G)</term>
5132                 <listitem><para>This string controls the <emphasis>"chat"</emphasis> 
5133                 conversation that takes places between <ulink 
5134                 url="smbd.8.html">smbd</ulink> and the local password changing
5135                 program to change the user's password. The string describes a 
5136                 sequence of response-receive pairs that <ulink url="smbd.8.html">
5137                 smbd(8)</ulink> uses to determine what to send to the 
5138                 <link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter>
5139                 </link> and what to expect back. If the expected output is not 
5140                 received then the password is not changed.</para>
5141
5142                 <para>This chat sequence is often quite site specific, depending 
5143                 on what local methods are used for password control (such as NIS 
5144                 etc).</para>
5145                 <para>Note that this parameter only is only used if the <link 
5146                 linkend="UNIXPASSWORDSYNC"><parameter>unix 
5147                 password sync</parameter></link> parameter is set to <constant>yes</constant>. This 
5148                 sequence is then called <emphasis>AS ROOT</emphasis> when the SMB password 
5149                 in the smbpasswd file is being changed, without access to the old 
5150                 password cleartext. This means that root must be able to reset the user's password
5151                 without knowing the text of the previous password. In the presence of NIS/YP, 
5152                 this means that the <link linkend="PASSWDPROGRAM">passwd program</link> must be 
5153                 executed on the NIS master.
5154                 </para>
5155
5156
5157                 <para>The string can contain the macro <parameter>%n</parameter> which is substituted 
5158                 for the new password.  The chat sequence can also contain the standard 
5159                 macros <constant>\n</constant>, <constant>\r</constant>, <constant>
5160                 \t</constant> and <constant>\s</constant> to give line-feed, 
5161                 carriage-return, tab and space.  The chat sequence string can also contain 
5162                 a '*' which matches any sequence of characters.
5163                 Double quotes can be used to collect strings with spaces 
5164                 in them into a single string.</para>
5165
5166                 <para>If the send string in any part of the chat sequence 
5167                 is a full stop ".",  then no string is sent. Similarly, 
5168                 if the expect string is a full stop then no string is expected.</para>
5169
5170                 <para>If the <link linkend="PAMPASSWORDCHANGE"><parameter>pam
5171                 password change</parameter></link> parameter is set to true, the chat pairs
5172                 may be matched in any order, and success is determined by the PAM result, 
5173                 not any particular output. The \n macro is ignored for PAM conversions.
5174                 </para>
5175
5176                 <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix password 
5177                 sync</parameter></link>, <link linkend="PASSWDPROGRAM"><parameter>
5178                 passwd program</parameter></link> ,<link linkend="PASSWDCHATDEBUG">
5179                 <parameter>passwd chat debug</parameter></link> and <link linkend="PAMPASSWORDCHANGE">
5180                 <parameter>pam password change</parameter></link>.</para>
5181
5182                 <para>Default: <command>passwd chat = *new*password* %n\n 
5183                 *new*password* %n\n *changed*</command></para>
5184                 <para>Example: <command>passwd chat = "*Enter OLD password*" %o\n 
5185                 "*Enter NEW password*" %n\n "*Reenter NEW password*" %n\n "*Password 
5186                 changed*"</command></para>
5187                 </listitem>
5188                 </varlistentry>
5189
5190         
5191    
5192                 <varlistentry>
5193                 <term><anchor id="PASSWDCHATDEBUG">passwd chat debug (G)</term>
5194                 <listitem><para>This boolean specifies if the passwd chat script 
5195                 parameter is run in <emphasis>debug</emphasis> mode. In this mode the 
5196                 strings passed to and received from the passwd chat are printed 
5197                 in the <ulink url="smbd.8.html">smbd(8)</ulink> log with a 
5198                 <link linkend="DEBUGLEVEL"><parameter>debug level</parameter></link> 
5199                 of 100. This is a dangerous option as it will allow plaintext passwords 
5200                 to be seen in the <command>smbd</command> log. It is available to help 
5201                 Samba admins debug their <parameter>passwd chat</parameter> scripts 
5202                 when calling the <parameter>passwd program</parameter> and should 
5203                 be turned off after this has been done. This option has no effect if the 
5204                 <link linkend="PAMPASSWORDCHANGE"><parameter>pam password change</parameter></link>
5205                 paramter is set. This parameter is off by default.</para>
5206   
5207
5208                 <para>See also <link linkend="PASSWDCHAT"><parameter>passwd chat</parameter>
5209                 </link>, <link linkend="PAMPASSWORDCHANGE"><parameter>pam password change</parameter>
5210                 </link>, <link linkend="PASSWDPROGRAM"><parameter>passwd program</parameter>
5211                 </link>.</para>
5212
5213                 <para>Default: <command>passwd chat debug = no</command></para>
5214                 </listitem>
5215                 </varlistentry>
5216
5217
5218
5219                 <varlistentry>
5220                 <term><anchor id="PASSWDPROGRAM">passwd program (G)</term>
5221                 <listitem><para>The name of a program that can be used to set 
5222                 UNIX user passwords.  Any occurrences of <parameter>%u</parameter> 
5223                 will be replaced with the user name. The user name is checked for 
5224                 existence before calling the password changing program.</para>
5225
5226                 <para>Also note that many passwd programs insist in <emphasis>reasonable
5227                 </emphasis> passwords, such as a minimum length, or the inclusion 
5228                 of mixed case chars and digits. This can pose a problem as some clients 
5229                 (such as Windows for Workgroups) uppercase the password before sending 
5230                 it.</para>
5231
5232                 <para><emphasis>Note</emphasis> that if the <parameter>unix 
5233                 password sync</parameter> parameter is set to <constant>true
5234                 </constant> then this program is called <emphasis>AS ROOT</emphasis> 
5235                 before the SMB password in the <ulink url="smbpasswd.5.html">smbpasswd(5)
5236                 </ulink> file is changed. If this UNIX password change fails, then 
5237                 <command>smbd</command> will fail to change the SMB password also 
5238                 (this is by design).</para>
5239
5240                 <para>If the <parameter>unix password sync</parameter> parameter 
5241                 is set this parameter <emphasis>MUST USE ABSOLUTE PATHS</emphasis> 
5242                 for <emphasis>ALL</emphasis> programs called, and must be examined 
5243                 for security implications. Note that by default <parameter>unix 
5244                 password sync</parameter> is set to <constant>false</constant>.</para>
5245
5246                 <para>See also <link linkend="UNIXPASSWORDSYNC"><parameter>unix 
5247                 password sync</parameter></link>.</para>
5248
5249                 <para>Default: <command>passwd program = /bin/passwd</command></para>
5250                 <para>Example: <command>passwd program = /sbin/npasswd %u</command>
5251                 </para>
5252                 </listitem>
5253                 </varlistentry>
5254
5255
5256
5257                 <varlistentry>
5258                 <term><anchor id="PASSWORDLEVEL">password level (G)</term>
5259                 <listitem><para>Some client/server combinations have difficulty 
5260                 with mixed-case passwords.  One offending client is Windows for 
5261                 Workgroups, which for some reason forces passwords to upper 
5262                 case when using the LANMAN1 protocol, but leaves them alone when 
5263                 using COREPLUS!  Another problem child is the Windows 95/98
5264                 family of operating systems.  These clients upper case clear
5265                 text passwords even when NT LM 0.12 selected by the protocol
5266                 negotiation request/response.</para>
5267
5268                 <para>This parameter defines the maximum number of characters 
5269                 that may be upper case in passwords.</para>
5270
5271                 <para>For example, say the password given was "FRED". If <parameter>
5272                 password level</parameter> is set to 1, the following combinations 
5273                 would be tried if "FRED" failed:</para>
5274
5275                 <para>"Fred", "fred", "fRed", "frEd","freD"</para>
5276
5277                 <para>If <parameter>password level</parameter> was set to 2, 
5278                 the following combinations would also be tried: </para>
5279
5280                 <para>"FRed", "FrEd", "FreD", "fREd", "fReD", "frED", ..</para>
5281
5282                 <para>And so on.</para>
5283
5284                 <para>The higher value this parameter is set to the more likely 
5285                 it is that a mixed case password will be matched against a single 
5286                 case password. However, you should be aware that use of this 
5287                 parameter reduces security and increases the time taken to 
5288                 process a new connection.</para>
5289
5290                 <para>A value of zero will cause only two attempts to be 
5291                 made - the password as is and the password in all-lower case.</para>
5292
5293                 <para>Default: <command>password level = 0</command></para>
5294                 <para>Example: <command>password level = 4</command></para>
5295                 </listitem>
5296                 </varlistentry>
5297
5298
5299
5300                 <varlistentry>
5301                 <term><anchor id="PASSWORDSERVER">password server (G)</term>
5302                 <listitem><para>By specifying the name of another SMB server (such 
5303                 as a WinNT box) with this option, and using <command>security = domain
5304                 </command> or <command>security = server</command> you can get Samba 
5305                 to do all its username/password validation via a remote server.</para>
5306
5307                 <para>This option sets the name of the password server to use. 
5308                 It must be a NetBIOS name, so if the machine's NetBIOS name is 
5309                 different from its Internet name then you may have to add its NetBIOS 
5310                 name to the lmhosts  file which is stored in the same directory 
5311                 as the <filename>smb.conf</filename> file.</para>
5312
5313                 <para>The name of the password server is looked up using the 
5314                 parameter <link linkend="NAMERESOLVEORDER"><parameter>name 
5315                 resolve order</parameter></link> and so may resolved
5316                 by any method and order described in that parameter.</para>
5317
5318                 <para>The password server much be a machine capable of using 
5319                 the "LM1.2X002" or the "NT LM 0.12" protocol, and it must be in 
5320                 user level security mode.</para>
5321
5322                 <para><emphasis>NOTE:</emphasis> Using a password server 
5323                 means your UNIX box (running Samba) is only as secure as your 
5324                 password server. <emphasis>DO NOT CHOOSE A PASSWORD SERVER THAT 
5325                 YOU DON'T COMPLETELY TRUST</emphasis>.</para>
5326                 
5327                 <para>Never point a Samba server at itself for password 
5328                 serving. This will cause a loop and could lock up your Samba 
5329                 server!</para>
5330
5331                 <para>The name of the password server takes the standard 
5332                 substitutions, but probably the only useful one is <parameter>%m
5333                 </parameter>, which means the Samba server will use the incoming 
5334                 client as the password server. If you use this then you better 
5335                 trust your clients, and you had better restrict them with hosts allow!</para>
5336
5337                 <para>If the <parameter>security</parameter> parameter is set to
5338                 <constant>domain</constant>, then the list of machines in this 
5339                 option must be a list of Primary or Backup Domain controllers for the
5340                 Domain or the character '*', as the Samba server is effectively
5341                 in that domain, and will use cryptographically authenticated RPC calls
5342                 to authenticate the user logging on. The advantage of using <command>
5343                 security = domain</command> is that if you list several hosts in the 
5344                 <parameter>password server</parameter> option then <command>smbd
5345                 </command> will try each in turn till it finds one that responds. This 
5346                 is useful in case your primary server goes down.</para>
5347
5348                 <para>If the <parameter>password server</parameter> option is set 
5349                 to the character '*', then Samba will attempt to auto-locate the 
5350                 Primary or Backup Domain controllers to authenticate against by 
5351                 doing a query for the name <constant>WORKGROUP&lt;1C&gt;</constant> 
5352                 and then contacting each server returned in the list of IP 
5353                 addresses from the name resolution source. </para>
5354                 
5355                 <para>If the <parameter>security</parameter> parameter is 
5356                 set to <constant>server</constant>, then there are different
5357                 restrictions that <command>security = domain</command> doesn't 
5358                 suffer from:</para>
5359
5360                 <itemizedlist>
5361                         <listitem><para>You may list several password servers in 
5362                         the <parameter>password server</parameter> parameter, however if an 
5363                         <command>smbd</command> makes a connection to a password server, 
5364                         and then the password server fails, no more users will be able 
5365                         to be authenticated from this <command>smbd</command>.  This is a 
5366                         restriction of the SMB/CIFS protocol when in <command>security = server
5367                         </command> mode and cannot be fixed in Samba.</para></listitem>
5368
5369                         <listitem><para>If you are using a Windows NT server as your 
5370                         password server then you will have to ensure that your users 
5371                         are able to login from the Samba server, as when in <command>
5372                         security = server</command>  mode the network logon will appear to 
5373                         come from there rather than from the users workstation.</para></listitem>
5374                 </itemizedlist>
5375
5376                 <para>See also the <link linkend="SECURITY"><parameter>security
5377                 </parameter></link> parameter.</para>
5378
5379                 <para>Default: <command>password server = &lt;empty string&gt;</command>
5380                 </para>
5381                 <para>Example: <command>password server = NT-PDC, NT-BDC1, NT-BDC2
5382                 </command></para>
5383                 <para>Example: <command>password server = *</command></para>
5384                 </listitem>
5385                 </varlistentry>
5386
5387
5388
5389                 <varlistentry>
5390                 <term><anchor id="PATH">path (S)</term>
5391                 <listitem><para>This parameter specifies a directory to which 
5392                 the user of the service is to be given access. In the case of 
5393                 printable services, this is where print data will spool prior to 
5394                 being submitted to the host for printing.</para>
5395
5396                 <para>For a printable service offering guest access, the service 
5397                 should be readonly and the path should be world-writeable and 
5398                 have the sticky bit set. This is not mandatory of course, but 
5399                 you probably won't get the results you expect if you do 
5400                 otherwise.</para>
5401
5402                 <para>Any occurrences of <parameter>%u</parameter> in the path 
5403                 will be replaced with the UNIX username that the client is using 
5404                 on this connection. Any occurrences of <parameter>%m</parameter> 
5405                 will be replaced by the NetBIOS name of the machine they are 
5406                 connecting from. These replacements are very useful for setting 
5407                 up pseudo home directories for users.</para>
5408
5409                 <para>Note that this path will be based on <link linkend="ROOTDIR">
5410                 <parameter>root dir</parameter></link> if one was specified.</para>
5411
5412                 <para>Default: <emphasis>none</emphasis></para>
5413                 <para>Example: <command>path = /home/fred</command></para>
5414                 </listitem>
5415                 </varlistentry>
5416
5417
5418
5419
5420                 <varlistentry>
5421                 <term><anchor id="POSIXLOCKING">posix locking (S)</term>
5422                 <listitem><para>The <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
5423                 daemon maintains an database of file locks obtained by SMB clients.
5424                 The default behavior is to map this internal database to POSIX
5425                 locks.  This means that file locks obtained by SMB clients are 
5426                 consistent with those seen by POSIX compliant applications accessing 
5427                 the files via a non-SMB method (e.g. NFS or local file access).  
5428                 You should never need to disable this parameter.</para>
5429                 
5430                 <para>Default: <command>posix locking = yes</command></para>
5431                 </listitem>
5432                 </varlistentry>
5433
5434
5435
5436
5437                 <varlistentry>
5438                 <term><anchor id="POSTEXEC">postexec (S)</term>
5439                 <listitem><para>This option specifies a command to be run 
5440                 whenever the service is disconnected. It takes the usual 
5441                 substitutions. The command may be run as the root on some 
5442                 systems.</para>
5443
5444                 <para>An interesting example may be to unmount server 
5445                 resources:</para>
5446
5447                 <para><command>postexec = /etc/umount /cdrom</command></para>
5448
5449                 <para>See also <link linkend="PREEXEC"><parameter>preexec</parameter>
5450                 </link>.</para>
5451
5452                 <para>Default: <emphasis>none (no command executed)</emphasis>
5453                 </para>
5454
5455                 <para>Example: <command>postexec = echo \"%u disconnected from %S 
5456                 from %m (%I)\" &gt;&gt; /tmp/log</command></para>
5457                 </listitem>
5458                 </varlistentry>
5459
5460
5461
5462                 <varlistentry>
5463                 <term><anchor id="POSTSCRIPT">postscript (S)</term>
5464                 <listitem><para>This parameter forces a printer to interpret 
5465                 the print files as PostScript. This is done by adding a <constant>%!
5466                 </constant> to the start of print output.</para>
5467
5468                 <para>This is most useful when you have lots of PCs that persist 
5469                 in putting a control-D at the start of print jobs, which then 
5470                 confuses your printer.</para>
5471
5472                 <para>Default: <command>postscript = no</command></para>
5473                 </listitem>
5474                 </varlistentry>
5475         
5476         
5477         
5478                 <varlistentry>
5479                 <term><anchor id="PREEXEC">preexec (S)</term>
5480                 <listitem><para>This option specifies a command to be run whenever 
5481                 the service is connected to. It takes the usual substitutions.</para>
5482
5483                 <para>An interesting example is to send the users a welcome 
5484                 message every time they log in. Maybe a message of the day? Here 
5485                 is an example:</para>
5486
5487                 <para><command>preexec = csh -c 'echo \"Welcome to %S!\" |
5488                  /usr/local/samba/bin/smbclient -M %m -I %I' & </command></para>
5489
5490                 <para>Of course, this could get annoying after a while :-)</para>
5491
5492                 <para>See also <link linkend="PREEXECCLOSE"><parameter>preexec close
5493                 </parameter</link> and <link linkend="POSTEXEC"><parameter>postexec
5494                 </parameter></link>.</para>
5495
5496                 <para>Default: <emphasis>none (no command executed)</emphasis></para>
5497                 <para>Example: <command>preexec = echo \"%u connected to %S from %m
5498                 (%I)\" &gt;&gt; /tmp/log</command></para>
5499                 </listitem>
5500                 </varlistentry>
5501
5502
5503
5504                 <varlistentry>
5505                 <term><anchor id="PREEXECCLOSE">preexec close (S)</term>
5506                 <listitem><para>This boolean option controls whether a non-zero 
5507                 return code from <link linkend="PREEXEC"><parameter>preexec
5508                 </parameter></link> should close the service being connected to.</para>
5509
5510                 <para>Default: <command>preexec close = no</command></para>
5511                 </listitem>
5512                 </varlistentry>
5513
5514
5515                 <varlistentry>
5516                 <term><anchor id="PREFERREDMASTER">preferred master (G)</term>
5517                 <listitem><para>This boolean parameter controls if <ulink 
5518                 url="nmbd.8.html">nmbd(8)</ulink> is a preferred master browser 
5519                 for its workgroup.</para>
5520
5521                 <para>If this is set to <constant>true</constant>, on startup, <command>nmbd</command> 
5522                 will force an election, and it will have a slight advantage in 
5523                 winning the election.  It is recommended that this parameter is 
5524                 used in conjunction with <command><link linkend="DOMAINMASTER"><parameter>
5525                 domain master</parameter></link> = yes</command>, so that <command>
5526                 nmbd</command> can guarantee becoming a domain master.</para>
5527                 
5528                 <para>Use this option with caution, because if there are several 
5529                 hosts (whether Samba servers, Windows 95 or NT) that are preferred 
5530                 master browsers on the same subnet, they will each periodically 
5531                 and continuously attempt to become the local master browser.  
5532                 This will result in unnecessary broadcast traffic and reduced browsing
5533                 capabilities.</para>
5534
5535                 <para>See also <link linkend="OSLEVEL"><parameter>os level</parameter>
5536                 </link>.</para>
5537
5538                 <para>Default: <command>preferred master = auto</command></para>
5539                 </listitem>
5540                 </varlistentry>
5541
5542
5543
5544                 <varlistentry>
5545                 <term><anchor id="PREFEREDMASTER">prefered master (G)</term>
5546                 <listitem><para>Synonym for <link linkend="PREFERREDMASTER"><parameter>
5547                 preferred master</parameter></link> for people who cannot spell :-).</para>
5548                 </listitem>
5549                 </varlistentry>
5550
5551
5552
5553                 <varlistentry>
5554                 <term><anchor id="PRELOAD">preload</term>
5555                 <listitem><para>This is a list of services that you want to be 
5556                 automatically added to the browse lists. This is most useful 
5557                 for homes and printers services that would otherwise not be 
5558                 visible.</para>
5559
5560                 <para>Note that if you just want all printers in your 
5561                 printcap file loaded then the <link linkend="LOADPRINTERS">
5562                 <parameter>load printers</parameter></link> option is easier.</para>
5563
5564                 <para>Default: <emphasis>no preloaded services</emphasis></para>
5565                 
5566                 <para>Example: <command>preload = fred lp colorlp</command></para>
5567                 </listitem>
5568                 </varlistentry>
5569
5570
5571                 <varlistentry>
5572                 <term><anchor id="PRESERVECASE">preserve case (S)</term>
5573                 <listitem><para> This controls if new filenames are created
5574                 with the case that the client passes, or if they are forced to 
5575                 be the <link linkend="DEFAULTCASE"><parameter>default case
5576                 </parameter></link>.</para>
5577
5578                 <para>Default: <command>preserve case = yes</command></para>
5579
5580                 <para>See the section on <link linkend="NAMEMANGLINGSECT">NAME 
5581                 MANGLING</link> for a fuller discussion.</para>
5582                 </listitem>
5583                 </varlistentry>
5584
5585
5586
5587                 <varlistentry>
5588                 <term><anchor id="PRINTCOMMAND">print command (S)</term>
5589                 <listitem><para>After a print job has finished spooling to 
5590                 a service, this command will be used via a <command>system()</command> 
5591                 call to process the spool file. Typically the command specified will 
5592                 submit the spool file to the host's printing subsystem, but there 
5593                 is no requirement that this be the case. The server will not remove 
5594                 the spool file, so whatever command you specify should remove the 
5595                 spool file when it has been processed, otherwise you will need to 
5596                 manually remove old spool files.</para>
5597                 
5598                 <para>The print command is simply a text string. It will be used 
5599                 verbatim, with two exceptions: All occurrences of <parameter>%s
5600                 </parameter> and <parameter>%f</parameter> will be replaced by the 
5601                 appropriate spool file name, and all occurrences of <parameter>%p
5602                 </parameter> will be replaced by the appropriate printer name. The 
5603                 spool file name is generated automatically by the server.  The 
5604                 <parameter>%J</parameter> macro can be used to access the job 
5605                 name as transmitted by the client.</para>
5606
5607                 <para>The print command <emphasis>MUST</emphasis> contain at least 
5608                 one occurrence of <parameter>%s</parameter> or <parameter>%f
5609                 </parameter> - the <parameter>%p</parameter> is optional. At the time 
5610                 a job is submitted, if no printer name is supplied the <parameter>%p
5611                 </parameter> will be silently removed from the printer command.</para>
5612
5613                 <para>If specified in the [global] section, the print command given 
5614                 will be used for any printable service that does not have its own 
5615                 print command specified.</para>
5616
5617                 <para>If there is neither a specified print command for a 
5618                 printable service nor a global print command, spool files will 
5619                 be created but not processed and (most importantly) not removed.</para>
5620
5621                 <para>Note that printing may fail on some UNIXes from the 
5622                 <constant>nobody</constant> account. If this happens then create 
5623                 an alternative guest account that can print and set the <link
5624                 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link> 
5625                 in the [global] section.</para>
5626
5627                 <para>You can form quite complex print commands by realizing 
5628                 that they are just passed to a shell. For example the following 
5629                 will log a print job, print the file, then remove it. Note that 
5630                 ';' is the usual separator for command in shell scripts.</para>
5631
5632                 <para><command>print command = echo Printing %s &gt;&gt; 
5633                 /tmp/print.log; lpr -P %p %s; rm %s</command></para>
5634
5635                 <para>You may have to vary this command considerably depending 
5636                 on how you normally print files on your system. The default for 
5637                 the parameter varies depending on the setting of the <link linkend="PRINTING">
5638                 <parameter>printing</parameter></link> parameter.</para>
5639
5640                 <para>Default: For <command>printing = BSD, AIX, QNX, LPRNG 
5641                 or PLP :</command></para>
5642                 <para><command>print command = lpr -r -P%p %s</command></para>
5643
5644                 <para>For <command>printing = SYSV or HPUX :</command></para>
5645                 <para><command>print command = lp -c -d%p %s; rm %s</command></para>
5646
5647                 <para>For <command>printing = SOFTQ :</command></para>
5648                 <para><command>print command = lp -d%p -s %s; rm %s</command></para>
5649
5650                 <para>Example: <command>print command = /usr/local/samba/bin/myprintscript
5651                 %p %s</command></para>
5652                 </listitem>
5653                 </varlistentry>
5654                 
5655                 
5656
5657                 <varlistentry>
5658                 <term><anchor id="PRINTOK">print ok (S)</term>
5659                 <listitem><para>Synonym for <link linkend="PRINTABLE">
5660                 <parameter>printable</parameter></link>.</para>
5661                 </listitem>
5662                 </varlistentry>
5663
5664
5665
5666
5667                 <varlistentry>
5668                 <term><anchor id="PRINTABLE">printable (S)</term>
5669                 <listitem><para>If this parameter is <constant>yes</constant>, then 
5670                 clients may open, write to and submit spool files on the directory 
5671                 specified for the service. </para>
5672                 
5673                 <para>Note that a printable service will ALWAYS allow writing 
5674                 to the service path (user privileges permitting) via the spooling 
5675                 of print data. The <link linkend="WRITEABLE"><parameter>writeable
5676                 </parameter></link> parameter controls only non-printing access to 
5677                 the resource.</para>
5678
5679                 <para>Default: <command>printable = no</command></para>
5680                 </listitem>
5681                 </varlistentry>
5682
5683
5684
5685                 <varlistentry>
5686                 <term><anchor id="PRINTCAP">printcap (G)</term>
5687                 <listitem><para>Synonym for     <link linkend="PRINTCAPNAME"><parameter>
5688                 printcap name</parameter></link>.</para>
5689                 </listitem>
5690                 </varlistentry>
5691
5692
5693
5694
5695                 <varlistentry>
5696                 <term><anchor id="PRINTCAPNAME">printcap name (G)</term>
5697                 <listitem><para>This parameter may be used to override the 
5698                 compiled-in default printcap name used by the server (usually <filename>
5699                 /etc/printcap</filename>). See the discussion of the <link
5700                 linkend="PRINTERSSECT">[printers]</link> section above for reasons 
5701                 why you might want to do this.</para>
5702
5703                 <para>On System V systems that use <command>lpstat</command> to 
5704                 list available printers you can use <command>printcap name = lpstat
5705                 </command> to automatically obtain lists of available printers. This 
5706                 is the default for systems that define SYSV at configure time in 
5707                 Samba (this includes most System V based systems). If <parameter>
5708                 printcap name</parameter> is set to <command>lpstat</command> on 
5709                 these systems then Samba will launch <command>lpstat -v</command> and 
5710                 attempt to parse the output to obtain a printer list.</para>
5711
5712                 <para>A minimal printcap file would look something like this:</para>
5713
5714                 <para><programlisting>
5715                 print1|My Printer 1
5716                 print2|My Printer 2
5717                 print3|My Printer 3
5718                 print4|My Printer 4
5719                 print5|My Printer 5
5720                 </programlisting></para>
5721         
5722                 <para>where the '|' separates aliases of a printer. The fact 
5723                 that the second alias has a space in it gives a hint to Samba 
5724                 that it's a comment.</para>
5725
5726                 <para><emphasis>NOTE</emphasis>: Under AIX the default printcap 
5727                 name is <filename>/etc/qconfig</filename>. Samba will assume the 
5728                 file is in AIX <filename>qconfig</filename> format if the string
5729                 <filename>qconfig</filename> appears in the printcap filename.</para>
5730
5731                 <para>Default: <command>printcap name = /etc/printcap</command></para>
5732                 <para>Example: <command>printcap name = /etc/myprintcap</command></para>
5733                 </listitem>
5734                 </varlistentry>
5735
5736
5737
5738
5739
5740                 <varlistentry>
5741                 <term><anchor id="PRINTERADMIN">printer admin (S)</term>
5742                 <listitem><para>This is a list of users that can do anything to 
5743                 printers via the remote administration interfaces offered by MS-RPC 
5744                 (usually using a NT workstation). Note that the root user always 
5745                 has admin rights.</para>
5746
5747                 <para>Default: <command>printer admin = &lt;empty string&gt;</command>
5748                 </para>
5749                 <para>Example: <command>printer admin = admin, @staff</command></para>
5750                 </listitem>
5751                 </varlistentry>
5752
5753
5754
5755
5756                 
5757                 <varlistentry>
5758                 <term><anchor id="PRINTERDRIVER">printer driver (S)</term>
5759                 <listitem><para><emphasis>Note :</emphasis>This is a deprecated 
5760                 parameter and will be removed in the next major release
5761                 following version 2.2.  Please see the instructions in
5762                 the <ulink url="printer_driver2.html">Samba 2.2. Printing
5763                 HOWTO</ulink> for more information
5764                 on the new method of loading printer drivers onto a Samba server.
5765                 </para>
5766                 
5767                 <para>This option allows you to control the string 
5768                 that clients receive when they ask the server for the printer driver 
5769                 associated with a printer. If you are using Windows95 or Windows NT 
5770                 then you can use this to automate the setup of printers on your 
5771                 system.</para>
5772
5773                 <para>You need to set this parameter to the exact string (case 
5774                 sensitive) that describes the appropriate printer driver for your 
5775                 system. If you don't know the exact string to use then you should 
5776                 first try with no <link linkend="PRINTERDRIVER"><parameter>
5777                 printer driver</parameter></link> option set and the client will 
5778                 give you a list of printer drivers. The appropriate strings are 
5779                 shown in a scroll box after you have chosen the printer manufacturer.</para>
5780
5781                 <para>See also <link linkend="PRINTERDRIVERFILE"><parameter>printer
5782                 driver file</parameter></link>.</para>
5783
5784                 <para>Example: <command>printer driver = HP LaserJet 4L</command></para>
5785                 </listitem>
5786                 </varlistentry>
5787
5788
5789
5790                 <varlistentry>
5791                 <term><anchor id="PRINTERDRIVERFILE">printer driver file (G)</term>
5792                 <listitem><para><emphasis>Note :</emphasis>This is a deprecated 
5793                 parameter and will be removed in the next major release
5794                 following version 2.2.  Please see the instructions in
5795                 the <ulink url="printer_driver2.html">Samba 2.2. Printing
5796                 HOWTO</ulink> for more information
5797                 on the new method of loading printer drivers onto a Samba server.
5798                 </para>
5799
5800                 <para>This parameter tells Samba where the printer driver 
5801                 definition file, used when serving drivers to Windows 95 clients, is 
5802                 to be found. If this is not set, the default is :</para>
5803
5804                 <para><filename><replaceable>SAMBA_INSTALL_DIRECTORY</replaceable>
5805                 /lib/printers.def</filename></para>
5806
5807                 <para>This file is created from Windows 95 <filename>msprint.inf
5808                 </filename> files found on the Windows 95 client system. For more 
5809                 details on setting up serving of printer drivers to Windows 95 
5810                 clients, see the outdated documentation file in the <filename>docs/</filename> 
5811                 directory, <filename>PRINTER_DRIVER.txt</filename>.</para>
5812
5813                 <para>See also <link linkend="PRINTERDRIVERLOCATION"><parameter>
5814                 printer driver location</parameter></link>.</para>
5815                 
5816                 <para>Default: <emphasis>None (set in compile).</emphasis></para>
5817
5818                 <para>Example: <command>printer driver file = 
5819                 /usr/local/samba/printers/drivers.def</command></para>
5820                 </listitem>
5821                 </varlistentry>
5822
5823
5824
5825
5826                 <varlistentry>
5827                 <term><anchor id="PRINTERDRIVERLOCATION">printer driver location (S)</term>
5828                 <listitem><para><emphasis>Note :</emphasis>This is a deprecated 
5829                 parameter and will be removed in the next major release
5830                 following version 2.2.  Please see the instructions in
5831                 the <ulink url="printer_driver2.html">Samba 2.2. Printing
5832                 HOWTO</ulink> for more information
5833                 on the new method of loading printer drivers onto a Samba server.
5834                 </para>
5835
5836                 <para>This parameter tells clients of a particular printer 
5837                 share where to find the printer driver files for the automatic 
5838                 installation of drivers for Windows 95 machines. If Samba is set up 
5839                 to serve printer drivers to Windows 95 machines, this should be set to</para>
5840
5841                 <para><command>\\MACHINE\PRINTER$</command></para>
5842
5843                 <para>Where MACHINE is the NetBIOS name of your Samba server, 
5844                 and PRINTER$ is a share you set up for serving printer driver 
5845                 files. For more details on setting this up see the outdated documentation 
5846                 file in the <filename>docs/</filename> directory, <filename>
5847                 PRINTER_DRIVER.txt</filename>.</para>
5848
5849                 <para>See also <link linkend="PRINTERDRIVERFILE"><parameter>
5850                 printer driver file</parameter></link>.</para>
5851
5852                 <para>Default: <command>none</command></para>
5853                 <para>Example: <command>printer driver location = \\MACHINE\PRINTER$
5854                 </command></para>
5855                 </listitem>
5856                 </varlistentry>
5857
5858
5859
5860                 <varlistentry>
5861                 <term><anchor id="PRINTERNAME">printer name (S)</term>
5862                 <listitem><para>This parameter specifies the name of the printer 
5863                 to which print jobs spooled through a printable service will be sent.</para>
5864
5865                 <para>If specified in the [global] section, the printer
5866                 name given will be used for any printable service that does 
5867                 not have its own printer name specified.</para>
5868
5869                 <para>Default: <emphasis>none (but may be <constant>lp</constant> 
5870                 on many systems)</emphasis></para>
5871
5872                 <para>Example: <command>printer name = laserwriter</command></para>
5873                 </listitem>
5874                 </varlistentry>
5875
5876
5877                 <varlistentry>
5878                 <term><anchor id="PRINTER">printer (S)</term>
5879                 <listitem><para>Synonym for <link linkend="PRINTERNAME"><parameter>
5880                 printer name</parameter></link>.</para>
5881                 </listitem>
5882                 </varlistentry>
5883
5884
5885
5886                 <varlistentry>
5887                 <term><anchor id="PRINTING">printing (S)</term>
5888                 <listitem><para>This parameters controls how printer status 
5889                 information is interpreted on your system. It also affects the 
5890                 default values for the <parameter>print command</parameter>, 
5891                 <parameter>lpq command</parameter>, <parameter>lppause command
5892                 </parameter>, <parameter>lpresume command</parameter>, and 
5893                 <parameter>lprm command</parameter> if specified in the 
5894                 [global] section.</para>
5895
5896                 <para>Currently nine printing styles are supported. They are
5897                 <constant>BSD</constant>, <constant>AIX</constant>, 
5898                 <constant>LPRNG</constant>, <constant>PLP</constant>,
5899                 <constant>SYSV</constant>, <constant>HPUX</constant>,
5900                 <constant>QNX</constant>, <constant>SOFTQ</constant>,
5901                 and <constant>CUPS</constant>.</para>
5902
5903                 <para>To see what the defaults are for the other print 
5904                 commands when using the various options use the <ulink 
5905                 url="testparm.1.html">testparm(1)</ulink> program.</para>
5906
5907                 <para>This option can be set on a per printer basis</para>
5908
5909                 <para>See also the discussion in the <link linkend="PRINTERSSECT">
5910                 [printers]</link> section.</para>
5911                 </listitem>
5912                 </varlistentry>
5913
5914
5915
5916                 
5917                 <varlistentry>
5918                 <term><anchor id="PRIVATEDIR">private dir (G)</term>
5919                 <listitem><para>This parameters defines the directory
5920                 smbd will use for storing such files as <filename>smbpasswd</filename>
5921                 and <filename>secrets.tdb</filename>.
5922                 </para>
5923                                 
5924                 <para>Default :<command>private dir = ${prefix}/private</command></para>
5925                 </listitem>
5926                 </varlistentry>
5927                 
5928                 
5929                 
5930
5931                 <varlistentry>
5932                 <term><anchor id="PROTOCOL">protocol (G)</term>
5933                 <listitem><para>Synonym for <link linkend="MAXPROTOCOL">
5934                 <parameter>max protocol</parameter></link>.</para></listitem>
5935                 </varlistentry>
5936
5937
5938
5939
5940                 <varlistentry>
5941                 <term><anchor id="PUBLIC">public (S)</term>
5942                 <listitem><para>Synonym for <link linkend="GUESTOK"><parameter>guest 
5943                 ok</parameter></link>.</para>
5944                 </listitem>
5945                 </varlistentry>
5946
5947
5948
5949                 <varlistentry>
5950                 <term><anchor id="QUEUEPAUSECOMMAND">queuepause command (S)</term>
5951                 <listitem><para>This parameter specifies the command to be 
5952                 executed on the server host in order to pause the printer queue.</para>
5953
5954                 <para>This command should be a program or script which takes 
5955                 a printer name as its only parameter and stops the printer queue, 
5956                 such that no longer jobs are submitted to the printer.</para>
5957
5958                 <para>This command is not supported by Windows for Workgroups, 
5959                 but can be issued from the Printers window under Windows 95 
5960                 and NT.</para>
5961                 
5962                 <para>If a <parameter>%p</parameter> is given then the printer name 
5963                 is put in its place. Otherwise it is placed at the end of the command.
5964                 </para>
5965
5966                 <para>Note that it is good practice to include the absolute 
5967                 path in the command as the PATH may not be available to the 
5968                 server.</para>
5969
5970                 <para>Default: <emphasis>depends on the setting of <parameter>printing
5971                 </parameter></emphasis></para>
5972                 <para>Example: <command>queuepause command = disable %p</command></para>
5973                 </listitem>
5974                 </varlistentry>
5975
5976
5977
5978                 <varlistentry>
5979                 <term><anchor id="QUEUERESUMECOMMAND">queueresume command (S)</term>
5980                 <listitem><para>This parameter specifies the command to be 
5981                 executed on the server host in order to resume the printer queue. It 
5982                 is the command to undo the behavior that is caused by the 
5983                 previous parameter (<link linkend="QUEUEPAUSECOMMAND"><parameter>
5984                 queuepause command</parameter></link>).</para>
5985  
5986                 <para>This command should be a program or script which takes 
5987                 a printer name as its only parameter and resumes the printer queue, 
5988                 such that queued jobs are resubmitted to the printer.</para>
5989
5990                 <para>This command is not supported by Windows for Workgroups, 
5991                 but can be issued from the Printers window under Windows 95 
5992                 and NT.</para>
5993
5994                 <para>If a <parameter>%p</parameter> is given then the printer name 
5995                 is put in its place. Otherwise it is placed at the end of the 
5996                 command.</para>
5997
5998                 <para>Note that it is good practice to include the absolute 
5999                 path in the command as the PATH may not be available to the 
6000                 server.</para>
6001
6002                 <para>Default: <emphasis>depends on the setting of <link
6003                 linkend="PRINTING"><parameter>printing</parameter></link></emphasis>
6004                 </para>
6005
6006                 <para>Example: <command>queuepause command = enable %p
6007                 </command></para>
6008                 </listitem>
6009                 </varlistentry>
6010
6011
6012
6013                 <varlistentry>
6014                 <term><anchor id="READBMPX">read bmpx (G)</term>
6015                 <listitem><para>This boolean parameter controls whether <ulink 
6016                 url="smbd.8.html">smbd(8)</ulink> will support the "Read 
6017                 Block Multiplex" SMB. This is now rarely used and defaults to 
6018                 <constant>no</constant>. You should never need to set this 
6019                 parameter.</para>
6020                 
6021                 <para>Default: <command>read bmpx = no</command></para>
6022                 </listitem>
6023                 </varlistentry>
6024
6025
6026
6027
6028                 <varlistentry>
6029                 <term><anchor id="READLIST">read list (S)</term>
6030                 <listitem><para>This is a list of users that are given read-only 
6031                 access to a service. If the connecting user is in this list then 
6032                 they will not be given write access, no matter what the <link 
6033                 linkend="WRITEABLE"><parameter>writeable</parameter></link>
6034                 option is set to. The list can include group names using the 
6035                 syntax described in the <link linkend="INVALIDUSERS"><parameter>
6036                 invalid users</parameter></link> parameter.</para>
6037
6038                 <para>See also the <link linkend="WRITELIST"><parameter>
6039                 write list</parameter></link> parameter and the <link 
6040                 linkend="INVALIDUSERS"><parameter>invalid users</parameter>
6041                 </link> parameter.</para>
6042
6043                 <para>Default: <command>read list = &lt;empty string&gt;</command></para>
6044                 <para>Example: <command>read list = mary, @students</command></para>
6045                 </listitem>
6046                 </varlistentry>
6047
6048
6049
6050                 <varlistentry>
6051                 <term><anchor id="READONLY">read only (S)</term>
6052                 <listitem><para>Note that this is an inverted synonym for <link 
6053                 linkend="WRITEABLE"><parameter>writeable</parameter></link>.</para>
6054                 </listitem>
6055                 </varlistentry>
6056
6057
6058
6059                 <varlistentry>
6060                 <term><anchor id="READRAW">read raw (G)</term>
6061                 <listitem><para>This parameter controls whether or not the server 
6062                 will support the raw read SMB requests when transferring data 
6063                 to clients.</para>
6064
6065                 <para>If enabled, raw reads allow reads of 65535 bytes in 
6066                 one packet. This typically provides a major performance benefit.
6067                 </para>
6068
6069                 <para>However, some clients either negotiate the allowable 
6070                 block size incorrectly or are incapable of supporting larger block 
6071                 sizes, and for these clients you may need to disable raw reads.</para>
6072
6073                 <para>In general this parameter should be viewed as a system tuning 
6074                 tool and left severely alone. See also <link linkend="WRITERAW">
6075                 <parameter>write raw</parameter></link>.</para>
6076
6077                 <para>Default: <command>read raw = yes</command></para>
6078                 </listitem>
6079                 </varlistentry>
6080
6081
6082                 <varlistentry>
6083                 <term><anchor id="READSIZE">read size (G)</term>
6084                 <listitem><para>The option <parameter>read size</parameter> 
6085                 affects the overlap of disk reads/writes with network reads/writes. 
6086                 If the amount of data being transferred in several of the SMB 
6087                 commands (currently SMBwrite, SMBwriteX and SMBreadbraw) is larger 
6088                 than this value then the server begins writing the data before it 
6089                 has received the whole packet from the network, or in the case of 
6090                 SMBreadbraw, it begins writing to the network before all the data 
6091                 has been read from disk.</para>
6092
6093                 <para>This overlapping works best when the speeds of disk and 
6094                 network access are similar, having very little effect when the 
6095                 speed of one is much greater than the other.</para>
6096
6097                 <para>The default value is 16384, but very little experimentation 
6098                 has been done yet to determine the optimal value, and it is likely 
6099                 that the best value will vary greatly between systems anyway. 
6100                 A value over 65536 is pointless and will cause you to allocate 
6101                 memory unnecessarily.</para>
6102
6103                 <para>Default: <command>read size = 16384</command></para>
6104                 <para>Example: <command>read size = 8192</command></para>
6105                 </listitem>
6106                 </varlistentry>
6107
6108
6109
6110                 <varlistentry>
6111                 <term><anchor id="REMOTEANNOUNCE">remote announce (G)</term>
6112                 <listitem><para>This option allows you to setup <ulink 
6113                 url="nmbd.8.html">nmbd(8)</ulink> to periodically announce itself 
6114                 to arbitrary IP addresses with an arbitrary workgroup name.</para>
6115
6116                 <para>This is useful if you want your Samba server to appear 
6117                 in a remote workgroup for which the normal browse propagation 
6118                 rules don't work. The remote workgroup can be anywhere that you 
6119                 can send IP packets to.</para>
6120
6121                 <para>For example:</para>
6122
6123                 <para><command>remote announce = 192.168.2.255/SERVERS 
6124                 192.168.4.255/STAFF</command></para>
6125
6126                 <para>the above line would cause <command>nmbd</command> to announce itself 
6127                 to the two given IP addresses using the given workgroup names. 
6128                 If you leave out the workgroup name then the one given in 
6129                 the <link linkend="WORKGROUP"><parameter>workgroup</parameter></link> 
6130                 parameter is used instead.</para>
6131
6132                 <para>The IP addresses you choose would normally be the broadcast 
6133                 addresses of the remote networks, but can also be the IP addresses 
6134                 of known browse masters if your network config is that stable.</para>
6135
6136                 <para>See the documentation file <filename>BROWSING.txt</filename> 
6137                 in the <filename>docs/</filename> directory.</para>
6138                 
6139                 <para>Default: <command>remote announce = &lt;empty string&gt;
6140                 </command></para>
6141                 </listitem>
6142                 </varlistentry>
6143
6144
6145
6146                 <varlistentry>
6147                 <term><anchor id="REMOTEBROWSESYNC">remote browse sync (G)</term>
6148                 <listitem><para>This option allows you to setup <ulink 
6149                 url="nmbd.8.html">nmbd(8)</ulink> to periodically request 
6150                 synchronization of browse lists with the master browser of a Samba 
6151                 server that is on a remote segment. This option will allow you to 
6152                 gain browse lists for multiple workgroups across routed networks. This 
6153                 is done in a manner that does not work with any non-Samba servers.</para>
6154
6155                 <para>This is useful if you want your Samba server and all local 
6156                 clients to appear in a remote workgroup for which the normal browse 
6157                 propagation rules don't work. The remote workgroup can be anywhere 
6158                 that you can send IP packets to.</para>
6159
6160                 <para>For example:</para>
6161                 
6162                 <para><command>remote browse sync = 192.168.2.255 192.168.4.255
6163                 </command></para>
6164
6165                 <para>the above line would cause <command>nmbd</command> to request 
6166                 the master browser on the specified subnets or addresses to 
6167                 synchronize their browse lists with the local server.</para>
6168
6169                 <para>The IP addresses you choose would normally be the broadcast 
6170                 addresses of the remote networks, but can also be the IP addresses 
6171                 of known browse masters if your network config is that stable. If 
6172                 a machine IP address is given Samba makes NO attempt to validate 
6173                 that the remote machine is available, is listening, nor that it 
6174                 is in fact the browse master on its segment.</para>
6175
6176                 <para>Default: <command>remote browse sync = &lt;empty string&gt;
6177                 </command></para>
6178                 </listitem>
6179                 </varlistentry>
6180
6181
6182
6183
6184                 <varlistentry>
6185                 <term><anchor id="RESTRICTANONYMOUS">restrict anonymous (G)</term>
6186                 <listitem><para>This is a boolean parameter.  If it is <constant>true</constant>, then 
6187                 anonymous access to the server will be restricted, namely in the 
6188                 case where the server is expecting the client to send a username, 
6189                 but it doesn't.  Setting it to <constant>true</constant> will force these anonymous 
6190                 connections to be denied, and the client will be required to always 
6191                 supply a username and password when connecting. Use of this parameter 
6192                 is only recommended for homogeneous NT client environments.</para>
6193
6194                 <para>This parameter makes the use of macro expansions that rely
6195                 on the username (%U, %G, etc) consistent.  NT 4.0 
6196                 likes to use anonymous connections when refreshing the share list, 
6197                 and this is a way to work around that.</para>
6198
6199                 <para>When restrict anonymous is <constant>true</constant>, all anonymous connections 
6200                 are denied no matter what they are for.  This can effect the ability 
6201                 of a machine to access the Samba Primary Domain Controller to revalidate 
6202                 its machine account after someone else has logged on the client 
6203                 interactively.  The NT client will display a message saying that 
6204                 the machine's account in  the domain doesn't exist or the password is 
6205                 bad.  The best way to deal  with this is to reboot NT client machines 
6206                 between interactive logons,  using "Shutdown and Restart", rather 
6207                 than "Close all programs and logon as a different user".</para>
6208
6209                 <para>Default: <command>restrict anonymous = no</command></para>
6210                 </listitem>
6211                 </varlistentry>
6212
6213
6214
6215                 <varlistentry>
6216                 <term><anchor id="ROOT">root (G)</term>
6217                 <listitem><para>Synonym for <link linkend="ROOTDIRECTORY">
6218                 <parameter>root directory"</parameter></link>.</para>
6219                 </listitem>
6220                 </varlistentry>
6221
6222
6223
6224                 <varlistentry>
6225                 <term><anchor id="ROOTDIR">root dir (G)</term>
6226                 <listitem><para>Synonym for <link linkend="ROOTDIRECTORY">
6227                 <parameter>root directory"</parameter></link>.</para>
6228                 </listitem>
6229                 </varlistentry>
6230
6231
6232                 <varlistentry>
6233                 <term><anchor id="ROOTDIRECTORY">root directory (G)</term>
6234                 <listitem><para>The server will <command>chroot()</command> (i.e. 
6235                 Change its root directory) to this directory on startup. This is 
6236                 not strictly necessary for secure operation. Even without it the 
6237                 server will deny access to files not in one of the service entries. 
6238                 It may also check for, and deny access to, soft links to other 
6239                 parts of the filesystem, or attempts to use ".." in file names 
6240                 to access other directories (depending on the setting of the <link
6241                 linkend="WIDELINKS"><parameter>wide links</parameter></link> 
6242                 parameter).</para>
6243
6244                 <para>Adding a <parameter>root directory</parameter> entry other 
6245                 than "/" adds an extra level of security, but at a price. It 
6246                 absolutely ensures that no access is given to files not in the 
6247                 sub-tree specified in the <parameter>root directory</parameter> 
6248                 option, <emphasis>including</emphasis> some files needed for 
6249                 complete operation of the server. To maintain full operability 
6250                 of the server you will need to mirror some system files 
6251                 into the <parameter>root directory</parameter> tree. In particular 
6252                 you will need to mirror <filename>/etc/passwd</filename> (or a 
6253                 subset of it), and any binaries or configuration files needed for 
6254                 printing (if required). The set of files that must be mirrored is
6255                 operating system dependent.</para>
6256
6257                 <para>Default: <command>root directory = /</command></para>
6258                 <para>Example: <command>root directory = /homes/smb</command></para>
6259                 </listitem>
6260                 </varlistentry>
6261
6262
6263
6264                 <varlistentry>
6265                 <term><anchor id="ROOTPOSTEXEC">root postexec (S)</term>
6266                 <listitem><para>This is the same as the <parameter>postexec</parameter>
6267                 parameter except that the command is run as root. This 
6268                 is useful for unmounting filesystems 
6269                 (such as CDROMs) after a connection is closed.</para>
6270
6271                 <para>See also <link linkend="POSTEXEC"><parameter>
6272                 postexec</parameter></link>.</para>
6273
6274                 <para>Default: <command>root postexec = &lt;empty string&gt;
6275                 </command></para>
6276                 </listitem>
6277                 </varlistentry>
6278
6279                 <varlistentry>
6280                 <term><anchor id="ROOTPREEXEC">root preexec (S)</term>
6281                 <listitem><para>This is the same as the <parameter>preexec</parameter>
6282                 parameter except that the command is run as root. This 
6283                 is useful for mounting filesystems (such as CDROMs) when a 
6284                 connection is opened.</para>
6285
6286                 <para>See also <link linkend="PREEXEC"><parameter>
6287                 preexec</parameter></link> and <link linkend="PREEXECCLOSE">
6288                 <parameter>preexec close</parameter></link>.</para>
6289                 
6290                 <para>Default: <command>root preexec = &lt;empty string&gt;
6291                 </command></para>
6292                 </listitem>
6293                 </varlistentry>
6294
6295
6296
6297                 <varlistentry>
6298                 <term><anchor id="ROOTPREEXECCLOSE">root preexec close (S)</term>
6299                 <listitem><para>This is the same as the <parameter>preexec close
6300                 </parameter> parameter except that the command is run as root.</para>
6301
6302                 <para>See also <link linkend="PREEXEC"><parameter>
6303                 preexec</parameter></link> and <link linkend="PREEXECCLOSE">
6304                 <parameter>preexec close</parameter></link>.</para>
6305
6306                 <para>Default: <command>root preexec close = no</command></para>
6307                 </listitem>
6308                 </varlistentry>
6309
6310
6311                 <varlistentry>
6312                 <term><anchor id="SECURITY">security (G)</term>
6313                 <listitem><para>This option affects how clients respond to 
6314                 Samba and is one of the most important settings in the <filename>
6315                 smb.conf</filename> file.</para>
6316
6317                 <para>The option sets the "security mode bit" in replies to 
6318                 protocol negotiations with <ulink url="smbd.8.html">smbd(8)
6319                 </ulink> to turn share level security on or off. Clients decide 
6320                 based on this bit whether (and how) to transfer user and password 
6321                 information to the server.</para>
6322
6323
6324                 <para>The default is <command>security = user</command>, as this is
6325                 the most common setting needed when talking to Windows 98 and 
6326                 Windows NT.</para>
6327
6328                 <para>The alternatives are <command>security = share</command>,
6329                 <command>security = server</command> or <command>security = domain
6330                 </command>.</para>
6331
6332                 <para>In versions of Samba prior to 2.0.0, the default was 
6333                 <command>security = share</command> mainly because that was
6334                 the only option at one stage.</para>
6335
6336                 <para>There is a bug in WfWg that has relevance to this 
6337                 setting. When in user or server level security a WfWg client 
6338                 will totally ignore the password you type in the "connect 
6339                 drive" dialog box. This makes it very difficult (if not impossible) 
6340                 to connect to a Samba service as anyone except the user that 
6341                 you are logged into WfWg as.</para>
6342
6343                 <para>If your PCs use usernames that are the same as their 
6344                 usernames on the UNIX machine then you will want to use 
6345                 <command>security = user</command>. If you mostly use usernames 
6346                 that don't exist on the UNIX box then use <command>security = 
6347                 share</command>.</para>
6348
6349                 <para>You should also use <command>security = share</command> if you 
6350                 want to mainly setup shares without a password (guest shares). This 
6351                 is commonly used for a shared printer server. It is more difficult 
6352                 to setup guest shares with <command>security = user</command>, see 
6353                 the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6354                 </link>parameter for details.</para>
6355                 
6356                 <para>It is possible to use <command>smbd</command> in a <emphasis>
6357                 hybrid mode</emphasis> where it is offers both user and share 
6358                 level security under different <link linkend="NETBIOSALIASES">
6359                 <parameter>NetBIOS aliases</parameter></link>. </para>
6360
6361                 <para>The different settings will now be explained.</para>
6362
6363
6364                 <para><anchor id="SECURITYEQUALSSHARE"><emphasis>SECURITY = SHARE
6365                 </emphasis></para> 
6366                 
6367                 <para>When clients connect to a share level security server they 
6368                 need not log onto the server with a valid username and password before 
6369                 attempting to connect to a shared resource (although modern clients 
6370                 such as Windows 95/98 and Windows NT will send a logon request with 
6371                 a username but no password when talking to a <command>security = share
6372                 </command> server). Instead, the clients send authentication information 
6373                 (passwords) on a per-share basis, at the time they attempt to connect 
6374                 to that share.</para>
6375
6376                 <para>Note that <command>smbd</command> <emphasis>ALWAYS</emphasis> 
6377                 uses a valid UNIX user to act on behalf of the client, even in
6378                 <command>security = share</command> level security.</para>
6379
6380                 <para>As clients are not required to send a username to the server
6381                 in share level security, <command>smbd</command> uses several
6382                 techniques to determine the correct UNIX user to use on behalf
6383                 of the client.</para>
6384
6385                 <para>A list of possible UNIX usernames to match with the given
6386                 client password is constructed using the following methods :</para>
6387
6388                 <itemizedlist>
6389                         <listitem><para>If the <link linkend="GUESTONLY"><parameter>guest 
6390                         only</parameter></link> parameter is set, then all the other 
6391                         stages are missed and only the <link linkend="GUESTACCOUNT">
6392                         <parameter>guest account</parameter></link> username is checked.
6393                         </para></listitem>
6394
6395                         <listitem><para>Is a username is sent with the share connection 
6396                         request, then this username (after mapping - see <link 
6397                         linkend="USERNAMEMAP"><parameter>username map</parameter></link>), 
6398                         is added as a potential username.</para></listitem>
6399
6400                         <listitem><para>If the client did a previous <emphasis>logon
6401                         </emphasis> request (the SessionSetup SMB call) then the 
6402                         username sent in this SMB will be added as a potential username.
6403                         </para></listitem>
6404
6405                         <listitem><para>The name of the service the client requested is 
6406                         added as a potential username.</para></listitem>
6407
6408                         <listitem><para>The NetBIOS name of the client is added to 
6409                         the list as a potential username.</para></listitem>
6410
6411                         <listitem><para>Any users on the <link linkend="USER"><parameter>
6412                         user</parameter></link> list are added as potential usernames.
6413                         </para></listitem>
6414                 </itemizedlist>
6415
6416                 <para>If the <parameter>guest only</parameter> parameter is 
6417                 not set, then this list is then tried with the supplied password. 
6418                 The first user for whom the password matches will be used as the 
6419                 UNIX user.</para>
6420
6421                 <para>If the <parameter>guest only</parameter> parameter is 
6422                 set, or no username can be determined then if the share is marked 
6423                 as available to the <parameter>guest account</parameter>, then this 
6424                 guest user will be used, otherwise access is denied.</para>
6425
6426                 <para>Note that it can be <emphasis>very</emphasis> confusing 
6427                 in share-level security as to which UNIX username will eventually
6428                 be used in granting access.</para>
6429
6430                 <para>See also the section <link linkend="VALIDATIONSECT">
6431                 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6432
6433                 <para><anchor id="SECURITYEQUALSUSER"><emphasis>SECURITY = USER
6434                 </emphasis></para>
6435
6436                 <para>This is the default security setting in Samba 2.2. 
6437                 With user-level security a client must first "log-on" with a 
6438                 valid username and password (which can be mapped using the <link
6439                 linkend="USERNAMEMAP"><parameter>username map</parameter></link> 
6440                 parameter). Encrypted passwords (see the <link linkend="ENCRYPTPASSWORDS">
6441                 <parameter>encrypted passwords</parameter></link> parameter) can also
6442                 be used in this security mode. Parameters such as <link linkend="USER">
6443                 <parameter>user</parameter></link> and <link linkend="GUESTONLY">
6444                 <parameter>guest only</parameter></link> if set are then applied and 
6445                 may change the UNIX user to use on this connection, but only after 
6446                 the user has been successfully authenticated.</para>
6447
6448                 <para><emphasis>Note</emphasis> that the name of the resource being 
6449                 requested is <emphasis>not</emphasis> sent to the server until after 
6450                 the server has successfully authenticated the client. This is why 
6451                 guest shares don't work in user level security without allowing 
6452                 the server to automatically map unknown users into the <link
6453                 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>. 
6454                 See the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6455                 </link> parameter for details on doing this.</para>
6456
6457                 <para>See also the section <link linkend="VALIDATIONSECT">
6458                 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6459
6460                 <para><anchor id="SECURITYEQUALSSERVER"><emphasis>SECURITY = SERVER
6461                 </emphasis></para>
6462
6463                 <para>In this mode Samba will try to validate the username/password 
6464                 by passing it to another SMB server, such as an NT box. If this 
6465                 fails it will revert to <command>security = user</command>, but note 
6466                 that if encrypted passwords have been negotiated then Samba cannot 
6467                 revert back to checking the UNIX password file, it must have a valid 
6468                 <filename>smbpasswd</filename> file to check users against. See the 
6469                 documentation file in the <filename>docs/</filename> directory 
6470                 <filename>ENCRYPTION.txt</filename> for details on how to set this 
6471                 up.</para>
6472
6473                 <para><emphasis>Note</emphasis> that from the client's point of 
6474                 view <command>security = server</command> is the same as <command>
6475                 security = user</command>.  It only affects how the server deals 
6476                 with the authentication, it does not in any way affect what the 
6477                 client sees.</para>
6478
6479                 <para><emphasis>Note</emphasis> that the name of the resource being 
6480                 requested is <emphasis>not</emphasis> sent to the server until after 
6481                 the server has successfully authenticated the client. This is why 
6482                 guest shares don't work in user level security without allowing 
6483                 the server to automatically map unknown users into the <link
6484                 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>. 
6485                 See the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6486                 </link> parameter for details on doing this.</para>
6487
6488                 <para>See also the section <link linkend="VALIDATIONSECT">
6489                 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6490
6491                 <para>See also the <link linkend="PASSWORDSERVER"><parameter>password 
6492                 server</parameter></link> parameter and the <link 
6493                 linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
6494                 </link> parameter.</para>
6495                 
6496                 <para><anchor id="SECURITYEQUALSDOMAIN"><emphasis>SECURITY = DOMAIN
6497                 </emphasis></para>
6498
6499                 <para>This mode will only work correctly if <ulink 
6500                 url="smbpasswd.8.html">smbpasswd(8)</ulink> has been used to add this 
6501                 machine into a Windows NT Domain. It expects the <link 
6502                 linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
6503                 </link> parameter to be set to <constant>true</constant>. In this 
6504                 mode Samba will try to validate the username/password by passing
6505                 it to a Windows NT Primary or Backup Domain Controller, in exactly 
6506                 the same way that a Windows NT Server would do.</para>
6507
6508                 <para><emphasis>Note</emphasis> that a valid UNIX user must still 
6509                 exist as well as the account on the Domain Controller to allow 
6510                 Samba to have a valid UNIX account to map file access to.</para>
6511
6512                 <para><emphasis>Note</emphasis> that from the client's point 
6513                 of view <command>security = domain</command> is the same as <command>security = user
6514                 </command>. It only affects how the server deals with the authentication, 
6515                 it does not in any way affect what the client sees.</para>
6516
6517                 <para><emphasis>Note</emphasis> that the name of the resource being 
6518                 requested is <emphasis>not</emphasis> sent to the server until after 
6519                 the server has successfully authenticated the client. This is why 
6520                 guest shares don't work in user level security without allowing 
6521                 the server to automatically map unknown users into the <link
6522                 linkend="GUESTACCOUNT"><parameter>guest account</parameter></link>. 
6523                 See the <link linkend="MAPTOGUEST"><parameter>map to guest</parameter>
6524                 </link> parameter for details on doing this.</para>
6525
6526                 <para><emphasis>BUG:</emphasis> There is currently a bug in the 
6527                 implementation of <command>security = domain</command> with respect 
6528                 to multi-byte character set usernames. The communication with a 
6529                 Domain Controller must be done in UNICODE and Samba currently 
6530                 does not widen multi-byte user names to UNICODE correctly, thus 
6531                 a multi-byte username will not be recognized correctly at the 
6532                 Domain Controller. This issue will be addressed in a future release.</para>
6533
6534                 <para>See also the section <link linkend="VALIDATIONSECT">
6535                 NOTE ABOUT USERNAME/PASSWORD VALIDATION</link>.</para>
6536
6537                 <para>See also the <link linkend="PASSWORDSERVER"><parameter>password 
6538                 server</parameter></link> parameter and the <link 
6539                 linkend="ENCRYPTPASSWORDS"><parameter>encrypted passwords</parameter>
6540                 </link> parameter.</para>
6541
6542                 <para>Default: <command>security = USER</command></para>
6543                 <para>Example: <command>security = DOMAIN</command></para>
6544                 </listitem>
6545                 </varlistentry>
6546
6547
6548
6549                 <varlistentry>
6550                 <term><anchor id="SECURITYMASK">security mask (S)</term>
6551                 <listitem><para>This parameter controls what UNIX permission 
6552                 bits can be modified when a Windows NT client is manipulating 
6553                 the UNIX permission on a file using the native NT security 
6554                 dialog box.</para>
6555
6556                 <para>This parameter is applied as a mask (AND'ed with) to 
6557                 the changed permission bits, thus preventing any bits not in 
6558                 this mask from being modified. Essentially, zero bits in this 
6559                 mask may be treated as a set of bits the user is not allowed 
6560                 to change.</para>
6561
6562                 <para>If not set explicitly this parameter is 0777, allowing
6563                 a user to modify all the user/group/world permissions on a file.
6564                 </para>
6565
6566                 <para><emphasis>Note</emphasis> that users who can access the 
6567                 Samba server through other means can easily bypass this 
6568                 restriction, so it is primarily useful for standalone 
6569                 "appliance" systems.  Administrators of most normal systems will 
6570                 probably want to leave it set to <constant>0777</constant>.</para>
6571                 
6572                 <para>See also the <link linkend="FORCEDIRECTORYSECURITYMODE">
6573                 <parameter>force directory security mode</parameter></link>, 
6574                 <link linkend="DIRECTORYSECURITYMASK"><parameter>directory 
6575                 security mask</parameter></link>, <link linkend="FORCESECURITYMODE">
6576                 <parameter>force security mode</parameter></link> parameters.</para>
6577
6578                 <para>Default: <command>security mask = 0777</command></para>
6579                 <para>Example: <command>security mask = 0770</command></para>
6580                 </listitem>
6581                 </varlistentry>
6582
6583
6584                 <varlistentry>
6585                 <term><anchor id="SERVERSTRING">server string (G)</term>
6586                 <listitem><para>This controls what string will show up in the 
6587                 printer comment box in print manager and next to the IPC connection 
6588                 in <command>net view</command>. It can be any string that you wish 
6589                 to show to your users.</para>
6590                 
6591                 <para>It also sets what will appear in browse lists next 
6592                 to the machine name.</para>
6593
6594                 <para>A <parameter>%v</parameter> will be replaced with the Samba 
6595                 version number.</para>
6596
6597                 <para>A <parameter>%h</parameter> will be replaced with the 
6598                 hostname.</para>
6599
6600                 <para>Default: <command>server string = Samba %v</command></para>
6601
6602                 <para>Example: <command>server string = University of GNUs Samba 
6603                 Server</command></para>
6604                 </listitem>
6605                 </varlistentry>
6606
6607
6608
6609                 <varlistentry>
6610                 <term><anchor id="SETDIRECTORY">set directory (S)</term>
6611                 <listitem><para>If <command>set directory = no</command>, then 
6612                 users of the service may not use the setdir command to change 
6613                 directory.</para>
6614
6615                 <para>The <command>setdir</command> command is only implemented 
6616                 in the Digital Pathworks client. See the Pathworks documentation 
6617                 for details.</para>
6618
6619                 <para>Default: <command>set directory = no</command></para>
6620                 </listitem>
6621                 </varlistentry>
6622
6623
6624
6625
6626
6627                 <varlistentry>
6628                 <term><anchor id="SHORTPRESERVECASE">short preserve case (S)</term>
6629                 <listitem><para>This boolean parameter controls if new files 
6630                 which conform to 8.3 syntax, that is all in upper case and of 
6631                 suitable length, are created upper case, or if they are forced 
6632                 to be the <link linkend="DEFAULTCASE"><parameter>default case
6633                 </parameter></link>. This  option can be use with <link 
6634                 linkend="PRESERVECASE"><command>preserve case = yes</command>
6635                 </link> to permit long filenames to retain their case, while short 
6636                 names are lowered. </para>
6637                 
6638                 <para>See the section on <link linkend="NAMEMANGLINGSECT">
6639                 NAME MANGLING</link>.</para>
6640
6641                 <para>Default: <command>short preserve case = yes</command></para>
6642                 </listitem>
6643                 </varlistentry>
6644
6645
6646
6647                 <varlistentry>
6648                 <term><anchor id="SHOWADDPRINTERWIZARD">show add printer wizard (G)</term>
6649                 <listitem><para>With the introduction of MS-RPC based printing support
6650                 for Windows NT/2000 client in Samba 2.2, a "Printers..." folder will 
6651                 appear on Samba hosts in the share listing.  Normally this folder will 
6652                 contain an icon for the MS Add Printer Wizard (APW).  However, it is 
6653                 possible to disable this feature regardless of the level of privilege 
6654                 of the connected user.</para>
6655                 
6656                 <para>Under normal circumstances, the Windows NT/2000 client will 
6657                 open a handle on the printer server with OpenPrinterEx() asking for
6658                 Administrator privileges.  If the user does not have administrative
6659                 access on the print server (i.e is not root or a member of the 
6660                 <parameter>printer admin</parameter> group), the OpenPrinterEx() 
6661                 call fails and the client makes another open call with a request for 
6662                 a lower privilege level.  This should succeed, however the APW 
6663                 icon will not be displayed.</para>
6664                 
6665                 <para>Disabling the <parameter>show add printer wizard</parameter>
6666                 parameter will always cause the OpenPrinterEx() on the server
6667                 to fail.  Thus the APW icon will never be displayed. <emphasis>
6668                 Note :</emphasis>This does not prevent the same user from having 
6669                 administrative privilege on an individual printer.</para>
6670                 
6671                 <para>See also <link linkend="ADDPRINTERCOMMAND"><parameter>addprinter
6672                 command</parameter></link>, <link linkend="DELETEPRINTERCOMMAND">
6673                 <parameter>deleteprinter command</parameter></link>, <link 
6674                 linkend="PRINTERADMIN"><parameter>printer admin</parameter></link></para>
6675                 
6676                 <para>Default :<command>show add printer wizard = yes</command></para>
6677                 </listitem>
6678                 </varlistentry>
6679
6680
6681
6682                 <varlistentry>
6683                 <term><anchor id="SHUTDOWNSCRIPT">shutdown script (G)</term>
6684                 <listitem><para><emphasis>This parameter only exists in the HEAD cvs branch</emphasis>
6685                 This a full path name to a script called by
6686                 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink> that
6687                 should start a shutdown procedure.</para>
6688
6689                 <para>This command will be run as the user connected to the
6690                 server.</para>
6691
6692                 <para>%m %t %r %f parameters are expanded</para>
6693                 <para><parameter>%m</parameter> will be substituted with the
6694                 shutdown message sent to the server.</para>
6695                 <para><parameter>%t</parameter> will be substituted with the
6696                 number of seconds to wait before effectively starting the
6697                 shutdown procedure.</para>
6698                 <para><parameter>%r</parameter> will be substituted with the
6699                 switch <emphasis>-r</emphasis>. It means reboot after shutdown
6700                 for NT.
6701                 </para>
6702                 <para><parameter>%f</parameter> will be substituted with the
6703                 switch <emphasis>-f</emphasis>. It means force the shutdown
6704                 even if applications do not respond for NT.</para>
6705
6706                 <para>Default: <emphasis>None</emphasis>.</para>
6707                 <para>Example: <command>abort shutdown script = /usr/local/samba/sbin/shutdown %m %t %r %f</command></para>
6708                 <para>Shutdown script example:
6709                 <programlisting>
6710                 #!/bin/bash
6711                 
6712                 $time=0
6713                 let "time/60"
6714                 let "time++"
6715
6716                 /sbin/shutdown $3 $4 +$time $1 &
6717                 </programlisting>
6718                 Shutdown does not return so we need to launch it in background.
6719                 </para>
6720
6721                 <para>See also <link linkend="ABORTSHUTDOWNSCRIPT"><parameter>abort shutdown script</parameter></link>.</para>
6722                 </listitem>
6723                 </varlistentry>
6724
6725
6726                 <varlistentry>
6727                 <term><anchor id="SMBPASSWDFILE">smb passwd file (G)</term>
6728                 <listitem><para>This option sets the path to the encrypted 
6729                 smbpasswd file.  By default the path to the smbpasswd file 
6730                 is compiled into Samba.</para>
6731                 
6732                 <para>Default: <command>smb passwd file = ${prefix}/private/smbpasswd
6733                 </command></para>
6734
6735                 <para>Example: <command>smb passwd file = /etc/samba/smbpasswd
6736                 </command></para>
6737                 </listitem>
6738                 </varlistentry>
6739
6740
6741
6742
6743                 <varlistentry>
6744                 <term><anchor id="SOCKETADDRESS">socket address (G)</term>
6745                 <listitem><para>This option allows you to control what 
6746                 address Samba will listen for connections on. This is used to 
6747                 support multiple virtual interfaces on the one server, each 
6748                 with a different configuration.</para>
6749                 
6750                 <para>By default Samba will accept connections on any 
6751                 address.</para>
6752
6753                 <para>Example: <command>socket address = 192.168.2.20</command>
6754                 </para>
6755                 </listitem>
6756                 </varlistentry>
6757
6758
6759
6760                 <varlistentry>
6761                 <term><anchor id="SOCKETOPTIONS">socket options (G)</term>
6762                 <listitem><para>This option allows you to set socket options 
6763                 to be used when talking with the client.</para>
6764
6765                 <para>Socket options are controls on the networking layer 
6766                 of the operating systems which allow the connection to be 
6767                 tuned.</para>
6768
6769                 <para>This option will typically be used to tune your Samba 
6770                 server for optimal performance for your local network. There is 
6771                 no way that Samba can know what the optimal parameters are for 
6772                 your net, so you must experiment and choose them yourself. We 
6773                 strongly suggest you read the appropriate documentation for your 
6774                 operating system first (perhaps <command>man setsockopt</command> 
6775                 will help).</para>
6776
6777                 <para>You may find that on some systems Samba will say 
6778                 "Unknown socket option" when you supply an option. This means you 
6779                 either incorrectly  typed it or you need to add an include file 
6780                 to includes.h for your OS.  If the latter is the case please 
6781                 send the patch to <ulink url="mailto:samba@samba.org">
6782                 samba@samba.org</ulink>.</para>
6783
6784                 <para>Any of the supported socket options may be combined 
6785                 in any way you like, as long as your OS allows it.</para>
6786
6787                 <para>This is the list of socket options currently settable 
6788                 using this option:</para>
6789
6790                 <itemizedlist>
6791                         <listitem><para>SO_KEEPALIVE</para></listitem>
6792                         <listitem><para>SO_REUSEADDR</para></listitem>
6793                         <listitem><para>SO_BROADCAST</para></listitem>
6794                         <listitem><para>TCP_NODELAY</para></listitem>
6795                         <listitem><para>IPTOS_LOWDELAY</para></listitem>
6796                         <listitem><para>IPTOS_THROUGHPUT</para></listitem>
6797                         <listitem><para>SO_SNDBUF *</para></listitem>
6798                         <listitem><para>SO_RCVBUF *</para></listitem>
6799                         <listitem><para>SO_SNDLOWAT *</para></listitem>
6800                         <listitem><para>SO_RCVLOWAT *</para></listitem>
6801                 </itemizedlist>
6802
6803                 <para>Those marked with a <emphasis>'*'</emphasis> take an integer 
6804                 argument. The others can optionally take a 1 or 0 argument to enable 
6805                 or disable the option, by default they will be enabled if you 
6806                 don't specify 1 or 0.</para>
6807
6808                 <para>To specify an argument use the syntax SOME_OPTION = VALUE 
6809                 for example <command>SO_SNDBUF = 8192</command>. Note that you must 
6810                 not have any spaces before or after the = sign.</para>
6811
6812                 <para>If you are on a local network then a sensible option 
6813                 might be</para>
6814                 <para><command>socket options = IPTOS_LOWDELAY</command></para>
6815
6816                 <para>If you have a local network then you could try:</para>
6817                 <para><command>socket options = IPTOS_LOWDELAY TCP_NODELAY</command></para>
6818
6819                 <para>If you are on a wide area network then perhaps try 
6820                 setting IPTOS_THROUGHPUT. </para>
6821
6822                 <para>Note that several of the options may cause your Samba 
6823                 server to fail completely. Use these options with caution!</para>
6824
6825                 <para>Default: <command>socket options = TCP_NODELAY</command></para>
6826                 <para>Example: <command>socket options = IPTOS_LOWDELAY</command></para>
6827                 </listitem>
6828                 </varlistentry>
6829
6830
6831
6832
6833                 <varlistentry>
6834                 <term><anchor id="SOURCEENVIRONMENT">source environment (G)</term>
6835                 <listitem><para>This parameter causes Samba to set environment 
6836                 variables as per the content of the file named.</para>
6837
6838                 <para>If the value of this parameter starts with a "|" character 
6839                 then Samba will treat that value as a pipe command to open and 
6840                 will set the environment variables from the output of the pipe.</para>
6841
6842                 <para>The contents of the file or the output of the pipe should 
6843                 be formatted as the output of the standard Unix <command>env(1)
6844                 </command> command. This is of the form :</para>
6845                 <para>Example environment entry:</para>
6846                 <para><command>SAMBA_NETBIOS_NAME = myhostname</command></para>
6847
6848                 <para>Default: <emphasis>No default value</emphasis></para>
6849                 <para>Examples: <command>source environment = |/etc/smb.conf.sh
6850                 </command></para>
6851
6852                 <para>Example: <command>source environment = 
6853                 /usr/local/smb_env_vars</command></para>
6854                 </listitem>
6855                 </varlistentry>
6856
6857
6858
6859                 <varlistentry>
6860                 <term><anchor id="SSL">ssl (G)</term>
6861                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6862                 is only available if the SSL libraries have been compiled on your 
6863                 system and the configure option <command>--with-ssl</command> was 
6864                 given at configure time.</para>
6865
6866                 <para>This variable enables or disables the entire SSL mode. If 
6867                 it is set to <constant>no</constant>, the SSL-enabled Samba behaves 
6868                 exactly like the non-SSL Samba. If set to <constant>yes</constant>, 
6869                 it depends on the variables <link linkend="SSLHOSTS"><parameter>
6870                 ssl hosts</parameter></link> and <link linkend="SSLHOSTSRESIGN">
6871                 <parameter>ssl hosts resign</parameter></link> whether an SSL 
6872                 connection will be required.</para>
6873
6874                 <para>Default: <command>ssl = no</command></para>
6875                 </listitem>
6876                 </varlistentry>
6877
6878
6879
6880                 <varlistentry>
6881                 <term><anchor id="SSLCACERTDIR">ssl CA certDir (G)</term>
6882                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6883                 is only available if the SSL libraries have been compiled on your 
6884                 system and the configure option <command>--with-ssl</command> was 
6885                 given at configure time.</para>
6886
6887                 <para>This variable defines where to look up the Certification
6888                 Authorities. The given directory should contain one file for 
6889                 each CA that Samba will trust.  The file name must be the hash 
6890                 value over the "Distinguished Name" of the CA. How this directory 
6891                 is set up is explained later in this document. All files within the 
6892                 directory that don't fit into this naming scheme are ignored. You 
6893                 don't need this variable if you don't verify client certificates.</para>
6894
6895                 <para>Default: <command>ssl CA certDir = /usr/local/ssl/certs
6896                 </command></para>
6897                 </listitem>
6898                 </varlistentry>
6899
6900
6901
6902                 <varlistentry>
6903                 <term><anchor id="SSLCACERTFILE">ssl CA certFile (G)</term>
6904                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6905                 is only available if the SSL libraries have been compiled on your 
6906                 system and the configure option <command>--with-ssl</command> was 
6907                 given at configure time.</para>
6908
6909                 <para>This variable is a second way to define the trusted CAs. 
6910                 The certificates of the trusted CAs are collected in one big 
6911                 file and this variable points to the file. You will probably 
6912                 only use one of the two ways to define your CAs. The first choice is 
6913                 preferable if you have many CAs or want to be flexible, the second 
6914                 is preferable if you only have one CA and want to keep things 
6915                 simple (you won't need to create the hashed file names). You 
6916                 don't need this variable if you don't verify client certificates.</para>
6917
6918                 <para>Default: <command>ssl CA certFile = /usr/local/ssl/certs/trustedCAs.pem
6919                 </command></para>
6920                 </listitem>
6921                 </varlistentry>
6922
6923
6924
6925                 <varlistentry>
6926                 <term><anchor id="SSLCIPHERS">ssl ciphers (G)</term>
6927                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6928                 is only available if the SSL libraries have been compiled on your 
6929                 system and the configure option <command>--with-ssl</command> was 
6930                 given at configure time.</para>
6931
6932                 <para>This variable defines the ciphers that should be offered 
6933                 during SSL negotiation. You should not set this variable unless 
6934                 you know what you are doing.</para>
6935                 </listitem>
6936                 </varlistentry>
6937
6938
6939                 <varlistentry>
6940                 <term><anchor id="SSLCLIENTCERT">ssl client cert (G)</term>
6941                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6942                 is only available if the SSL libraries have been compiled on your 
6943                 system and the configure option <command>--with-ssl</command> was 
6944                 given at configure time.</para>
6945
6946                 <para>The certificate in this file is used by <ulink url="smbclient.1.html">
6947                 <command>smbclient(1)</command></ulink> if it exists. It's needed 
6948                 if the server requires a client certificate.</para>
6949
6950                 <para>Default: <command>ssl client cert = /usr/local/ssl/certs/smbclient.pem
6951                 </command></para>
6952                 </listitem>
6953                 </varlistentry>
6954
6955
6956
6957                 <varlistentry>
6958                 <term><anchor id="SSLCLIENTKEY">ssl client key (G)</term>
6959                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6960                 is only available if the SSL libraries have been compiled on your 
6961                 system and the configure option <command>--with-ssl</command> was 
6962                 given at configure time.</para>
6963
6964                 <para>This is the private key for <ulink url="smbclient.1.html">
6965                 <command>smbclient(1)</command></ulink>. It's only needed if the 
6966                 client should have a certificate. </para>
6967
6968                 <para>Default: <command>ssl client key = /usr/local/ssl/private/smbclient.pem
6969                 </command></para>
6970                 </listitem>
6971                 </varlistentry>
6972
6973
6974
6975                 <varlistentry>
6976                 <term><anchor id="SSLCOMPATIBILITY">ssl compatibility (G)</term>
6977                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6978                 is only available if the SSL libraries have been compiled on your 
6979                 system and the configure option <command>--with-ssl</command> was 
6980                 given at configure time.</para>
6981
6982                 <para>This variable defines whether OpenSSL should be configured 
6983                 for bug compatibility with other SSL implementations. This is 
6984                 probably not desirable because currently no clients with SSL 
6985                 implementations other than OpenSSL exist.</para>
6986
6987                 <para>Default: <command>ssl compatibility = no</command></para>
6988                 </listitem>
6989                 </varlistentry>
6990
6991
6992                 <varlistentry>
6993                 <term><anchor id="SSLEGDSOCKET">ssl egd socket (G)</term>
6994                 <listitem><para>This variable is part of SSL-enabled Samba. This 
6995                 is only available if the SSL libraries have been compiled on your 
6996                 system and the configure option <command>--with-ssl</command> was 
6997                 given at configure time.</para>
6998                 
6999                 <para>
7000                 This option is used to define the location of the communiation socket of 
7001                 an EGD or PRNGD daemon, from which entropy can be retrieved. This option 
7002                 can be used instead of or together with the <link 
7003                 linkend="SSLENTROPYFILE"><parameter>ssl entropy file</parameter></link> 
7004                 directive. 255 bytes of entropy will be retrieved from the daemon.
7005                 </para>
7006
7007                 <para>Default: <emphasis>none</emphasis></para>
7008                 </listitem>
7009                 </varlistentry>
7010
7011
7012                 <varlistentry>
7013                 <term><anchor id="SSLENTROPYBYTES">ssl entropy bytes (G)</term>
7014                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7015                 is only available if the SSL libraries have been compiled on your 
7016                 system and the configure option <command>--with-ssl</command> was 
7017                 given at configure time.</para>
7018                 
7019                 <para>
7020                 This parameter is used to define the number of bytes which should 
7021                 be read from the <link linkend="SSLENTROPYFILE"><parameter>ssl entropy 
7022                 file</parameter></link> If a -1 is specified, the entire file will
7023                 be read.
7024                 </para>
7025
7026                 <para>Default: <command>ssl entropy bytes = 255</command></para>
7027                 </listitem>
7028                 </varlistentry>
7029
7030
7031
7032                 <varlistentry>
7033                 <term><anchor id="SSLENTROPYFILE">ssl entropy file (G)</term>
7034                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7035                 is only available if the SSL libraries have been compiled on your 
7036                 system and the configure option <command>--with-ssl</command> was 
7037                 given at configure time.</para>
7038                 
7039                 <para>
7040                 This parameter is used to specify a file from which processes will 
7041                 read "random bytes" on startup.  In order to seed the internal pseudo 
7042                 random number generator, entropy must be provided. On system with a 
7043                 <filename>/dev/urandom</filename> device file, the processes
7044                 will retrieve its entropy from the kernel. On systems without kernel
7045                 entropy support, a file can be supplied that will be read on startup
7046                 and that will be used to seed the PRNG.
7047                 </para>
7048
7049                 <para>Default: <emphasis>none</emphasis></para>
7050                 </listitem>
7051                 </varlistentry>
7052
7053                 
7054
7055                 <varlistentry>
7056                 <term><anchor id="SSLHOSTS">ssl hosts (G)</term>
7057                 <listitem><para>See <link linkend="SSLHOSTSRESIGN"><parameter>
7058                 ssl hosts resign</parameter></link>.</para>
7059                 </listitem>
7060                 </varlistentry>
7061
7062
7063                 <varlistentry>
7064                 <term><anchor id="SSLHOSTSRESIGN">ssl hosts resign (G)</term>
7065                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7066                 is only available if the SSL libraries have been compiled on your 
7067                 system and the configure option <command>--with-ssl</command> was 
7068                 given at configure time.</para>
7069
7070                 <para>These two variables define whether Samba will go 
7071                 into SSL mode or not. If none of them is defined, Samba will 
7072                 allow only SSL connections. If the <link linkend="SSLHOSTS">
7073                 <parameter>ssl hosts</parameter></link> variable lists
7074                 hosts (by IP-address, IP-address range, net group or name), 
7075                 only these hosts will be forced into SSL mode. If the <parameter>
7076                 ssl hosts resign</parameter> variable lists hosts, only these 
7077                 hosts will <emphasis>NOT</emphasis> be forced into SSL mode. The syntax for these two 
7078                 variables is the same as for the <link linkend="HOSTSALLOW"><parameter>
7079                 hosts allow</parameter></link> and <link linkend="HOSTSDENY">
7080                 <parameter>hosts deny</parameter></link> pair of variables, only 
7081                 that the subject of the decision is different: It's not the access 
7082                 right but whether SSL is used or not. </para>
7083
7084                 <para>The example below requires SSL connections from all hosts
7085                 outside the local net (which is 192.168.*.*).</para>
7086
7087                 <para>Default: <command>ssl hosts = &lt;empty string&gt;</command></para>
7088                 <para><command>ssl hosts resign = &lt;empty string&gt;</command></para>
7089
7090                 <para>Example: <command>ssl hosts resign = 192.168.</command></para>
7091                 </listitem>
7092                 </varlistentry>
7093
7094
7095
7096                 <varlistentry>
7097                 <term><anchor id="SSLREQUIRECLIENTCERT">ssl require clientcert (G)</term>
7098                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7099                 is only available if the SSL libraries have been compiled on your 
7100                 system and the configure option <command>--with-ssl</command> was 
7101                 given at configure time.</para>
7102
7103                 <para>If this variable is set to <constant>yes</constant>, the 
7104                 server will not tolerate connections from clients that don't 
7105                 have a valid certificate. The directory/file given in <link
7106                 linkend="SSLCACERTDIR"><parameter>ssl CA certDir</parameter>
7107                 </link> and <link linkend="SSLCACERTFILE"><parameter>ssl CA certFile
7108                 </parameter></link> will be used to look up the CAs that issued 
7109                 the client's certificate. If the certificate can't be verified 
7110                 positively, the connection will be terminated.  If this variable 
7111                 is set to <constant>no</constant>, clients don't need certificates. 
7112                 Contrary to web applications you really <emphasis>should</emphasis> 
7113                 require client certificates. In the web environment the client's 
7114                 data is sensitive (credit card numbers) and the server must prove 
7115                 to be trustworthy. In a file server environment the server's data 
7116                 will be sensitive and the clients must prove to be trustworthy.</para>
7117
7118                 <para>Default: <command>ssl require clientcert = no</command></para>
7119                 </listitem>
7120                 </varlistentry>
7121
7122
7123
7124                 <varlistentry>
7125                 <term><anchor id="SSLREQUIRESERVERCERT">ssl require servercert (G)</term>
7126                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7127                 is only available if the SSL libraries have been compiled on your 
7128                 system and the configure option <command>--with-ssl</command> was 
7129                 given at configure time.</para>
7130
7131                 <para>If this variable is set to <constant>yes</constant>, the 
7132                 <ulink url="smbclient.1.html"><command>smbclient(1)</command>
7133                 </ulink> will request a certificate from the server. Same as 
7134                 <link linkend="SSLREQUIRECLIENTCERT"><parameter>ssl require 
7135                 clientcert</parameter></link> for the server.</para>
7136
7137                 <para>Default: <command>ssl require servercert = no</command>
7138                 </para>
7139                 </listitem>
7140                 </varlistentry>
7141
7142                 <varlistentry>
7143                 <term><anchor id="SSLSERVERCERT">ssl server cert (G)</term>
7144                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7145                 is only available if the SSL libraries have been compiled on your 
7146                 system and the configure option <command>--with-ssl</command> was 
7147                 given at configure time.</para>
7148
7149                 <para>This is the file containing the server's certificate. 
7150                 The server <emphasis>must</emphasis> have a certificate. The 
7151                 file may also contain the server's private key. See later for 
7152                 how certificates and private keys are created.</para>
7153
7154                 <para>Default: <command>ssl server cert = &lt;empty string&gt;
7155                 </command></para>
7156                 </listitem>
7157                 </varlistentry>
7158
7159
7160                 <varlistentry>
7161                 <term><anchor id="SSLSERVERKEY">ssl server key (G)</term>
7162                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7163                 is only available if the SSL libraries have been compiled on your 
7164                 system and the configure option <command>--with-ssl</command> was 
7165                 given at configure time.</para>
7166
7167                 <para>This file contains the private key of the server. If 
7168                 this variable is not defined, the key is looked up in the 
7169                 certificate file (it may be appended to the certificate). 
7170                 The server <emphasis>must</emphasis> have a private key
7171                 and the certificate <emphasis>must</emphasis> 
7172                 match this private key.</para>
7173
7174                 <para>Default: <command>ssl server key = &lt;empty string&gt;
7175                 </command></para>
7176                 </listitem>
7177                 </varlistentry>
7178
7179
7180                 <varlistentry>
7181                 <term><anchor id="SSLVERSION">ssl version (G)</term>
7182                 <listitem><para>This variable is part of SSL-enabled Samba. This 
7183                 is only available if the SSL libraries have been compiled on your 
7184                 system and the configure option <command>--with-ssl</command> was 
7185                 given at configure time.</para>
7186
7187                 <para>This enumeration variable defines the versions of the 
7188                 SSL protocol that will be used. <constant>ssl2or3</constant> allows 
7189                 dynamic negotiation of SSL v2 or v3, <constant>ssl2</constant> results 
7190                 in SSL v2, <constant>ssl3</constant> results in SSL v3 and
7191                 <constant>tls1</constant> results in TLS v1. TLS (Transport Layer 
7192                 Security) is the new standard for SSL.</para>
7193
7194                 <para>Default: <command>ssl version = "ssl2or3"</command></para>
7195                 </listitem>
7196                 </varlistentry>
7197
7198
7199
7200                 <varlistentry>
7201                 <term><anchor id="STATCACHE">stat cache (G)</term>
7202                 <listitem><para>This parameter determines if <ulink 
7203                 url="smbd.8.html">smbd(8)</ulink> will use a cache in order to 
7204                 speed up case insensitive name mappings. You should never need 
7205                 to change this parameter.</para>
7206
7207                 <para>Default: <command>stat cache = yes</command></para>
7208                 </listitem>
7209                 </varlistentry>
7210
7211                 <varlistentry>
7212                 <term><anchor id="STATCACHESIZE">stat cache size (G)</term>
7213                 <listitem><para>This parameter determines the number of 
7214                 entries in the <parameter>stat cache</parameter>.  You should 
7215                 never need to change this parameter.</para>
7216                 
7217                 <para>Default: <command>stat cache size = 50</command></para>
7218                 </listitem>
7219                 </varlistentry>
7220
7221
7222
7223                 <varlistentry>
7224                 <term><anchor id="STATUS">status (G)</term>
7225                 <listitem><para>This enables or disables logging of connections 
7226                 to a status file that <ulink url="smbstatus.1.html">smbstatus(1)</ulink>
7227                 can read.</para>
7228
7229                 <para>With this disabled <command>smbstatus</command> won't be able
7230                 to tell you what connections are active. You should never need to
7231                 change this parameter.</para>
7232
7233                 <para>Default: <command>status = yes</command></para>
7234                 </listitem>
7235                 </varlistentry>
7236
7237
7238                 
7239                 <varlistentry>
7240                 <term><anchor id="STRICTALLOCATE">strict allocate (S)</term>
7241                 <listitem><para>This is a boolean that controls the handling of 
7242                 disk space allocation in the server. When this is set to <constant>yes</constant> 
7243                 the server will change from UNIX behaviour of not committing real
7244                 disk storage blocks when a file is extended to the Windows behaviour
7245                 of actually forcing the disk system to allocate real storage blocks
7246                 when a file is created or extended to be a given size. In UNIX
7247                 terminology this means that Samba will stop creating sparse files.
7248                 This can be slow on some systems.</para>
7249
7250                 <para>When strict allocate is <constant>no</constant> the server does sparse
7251                 disk block allocation when a file is extended.</para>
7252
7253                 <para>Setting this to <constant>yes</constant> can help Samba return
7254                 out of quota messages on systems that are restricting the disk quota
7255                 of users.</para>
7256
7257                 <para>Default: <command>strict allocate = no</command></para>
7258                 </listitem>
7259                 </varlistentry>
7260
7261
7262
7263                 <varlistentry>
7264                 <term><anchor id="STRICTLOCKING">strict locking (S)</term>
7265                 <listitem><para>This is a boolean that controls the handling of 
7266                 file locking in the server. When this is set to <constant>yes</constant> 
7267                 the server will check every read and write access for file locks, and 
7268                 deny access if locks exist. This can be slow on some systems.</para>
7269
7270                 <para>When strict locking is <constant>no</constant> the server does file 
7271                 lock checks only when the client explicitly asks for them.</para>
7272
7273                 <para>Well-behaved clients always ask for lock checks when it 
7274                 is important, so in the vast majority of cases <command>strict 
7275                 locking = no</command> is preferable.</para>
7276
7277                 <para>Default: <command>strict locking = no</command></para>
7278                 </listitem>
7279                 </varlistentry>
7280
7281
7282
7283                 <varlistentry>
7284                 <term><anchor id="STRICTSYNC">strict sync (S)</term>
7285                 <listitem><para>Many Windows applications (including the Windows 
7286                 98 explorer shell) seem to confuse flushing buffer contents to 
7287                 disk with doing a sync to disk. Under UNIX, a sync call forces 
7288                 the process to be suspended until the kernel has ensured that 
7289                 all outstanding data in kernel disk buffers has been safely stored 
7290                 onto stable storage. This is very slow and should only be done 
7291                 rarely. Setting this parameter to <constant>no</constant> (the 
7292                 default) means that <ulink url="smbd.8.html">smbd</ulink> ignores the Windows applications requests for
7293                 a sync call. There is only a possibility of losing data if the
7294                 operating system itself that Samba is running on crashes, so there is
7295                 little danger in this default setting. In addition, this fixes many
7296                 performance problems that people have reported with the new Windows98
7297                 explorer shell file copies.</para>
7298
7299                 <para>See also the <link linkend="SYNCALWAYS"><parameter>sync 
7300                 always></parameter></link> parameter.</para>
7301
7302                 <para>Default: <command>strict sync = no</command></para>
7303                 </listitem>
7304                 </varlistentry>
7305
7306
7307                 <varlistentry>
7308                 <term><anchor id="STRIPDOT">strip dot (G)</term>
7309                 <listitem><para>This is a boolean that controls whether to 
7310                 strip trailing dots off UNIX filenames. This helps with some 
7311                 CDROMs that have filenames ending in a single dot.</para>
7312
7313                 <para>Default: <command>strip dot = no</command></para>
7314                 </listitem>
7315                 </varlistentry>
7316
7317
7318
7319                 <varlistentry>
7320                 <term><anchor id="SYNCALWAYS">sync always (S)</term>
7321                 <listitem><para>This is a boolean parameter that controls 
7322                 whether writes will always be written to stable storage before 
7323                 the write call returns. If this is <constant>false</constant> then the server will be 
7324                 guided by the client's request in each write call (clients can 
7325                 set a bit indicating that a particular write should be synchronous). 
7326                 If this is <constant>true</constant> then every write will be followed by a <command>fsync()
7327                 </command> call to ensure the data is written to disk. Note that 
7328                 the <parameter>strict sync</parameter> parameter must be set to
7329                 <constant>yes</constant> in order for this parameter to have 
7330                 any affect.</para>
7331                 
7332                 <para>See also the <link linkend="STRICTSYNC"><parameter>strict 
7333                 sync</parameter></link> parameter.</para>
7334
7335                 <para>Default: <command>sync always = no</command></para>
7336                 </listitem>
7337                 </varlistentry>
7338
7339
7340
7341                 <varlistentry>
7342                 <term><anchor id="SYSLOG">syslog (G)</term>
7343                 <listitem><para>This parameter maps how Samba debug messages 
7344                 are logged onto the system syslog logging levels. Samba debug 
7345                 level zero maps onto syslog <constant>LOG_ERR</constant>, debug 
7346                 level one maps onto <constant>LOG_WARNING</constant>, debug level 
7347                 two maps onto <constant>LOG_NOTICE</constant>, debug level three 
7348                 maps onto LOG_INFO. All higher levels are mapped to <constant>
7349                 LOG_DEBUG</constant>.</para>
7350
7351                 <para>This parameter sets the threshold for sending messages 
7352                 to syslog.  Only messages with debug level less than this value 
7353                 will be sent to syslog.</para>
7354
7355                 <para>Default: <command>syslog = 1</command></para>
7356                 </listitem>
7357                 </varlistentry>
7358
7359
7360
7361                 <varlistentry>
7362                 <term><anchor id="SYSLOGONLY">syslog only (G)</term>
7363                 <listitem><para>If this parameter is set then Samba debug 
7364                 messages are logged into the system syslog only, and not to 
7365                 the debug log files.</para>
7366
7367                 <para>Default: <command>syslog only = no</command></para>
7368                 </listitem>
7369                 </varlistentry>
7370
7371
7372
7373                 <varlistentry>
7374                 <term><anchor id="TEMPLATEHOMEDIR">template homedir (G)</term>
7375                 <listitem><para>When filling out the user information for a Windows NT 
7376                 user, the <ulink url="winbindd.8.html">winbindd(8)</ulink> daemon 
7377                 uses this parameter to fill in the home directory for that user.  
7378                 If the string <parameter>%D</parameter> is present it is substituted 
7379                 with the user's Windows NT domain name.  If the string <parameter>%U
7380                 </parameter> is present it is substituted with the user's Windows 
7381                 NT user name.</para>
7382
7383                 <para>Default: <command>template homedir = /home/%D/%U</command></para>
7384                 </listitem>
7385                 </varlistentry>
7386
7387
7388
7389                 <varlistentry>
7390                 <term><anchor id="TEMPLATESHELL">template shell (G)</term>
7391                 <listitem><para>When filling out the user information for a Windows NT 
7392                 user, the <ulink url="winbindd.8.html">winbindd(8)</ulink> daemon 
7393                 uses this parameter to fill in the login shell for that user.</para>
7394
7395                 <para>Default: <command>template shell = /bin/false</command></para>
7396                 </listitem>
7397                 </varlistentry>
7398
7399
7400
7401                 <varlistentry>
7402                 <term><anchor id="TIMEOFFSET">time offset (G)</term>
7403                 <listitem><para>This parameter is a setting in minutes to add 
7404                 to the normal GMT to local time conversion. This is useful if 
7405                 you are serving a lot of PCs that have incorrect daylight 
7406                 saving time handling.</para>
7407                 
7408                 <para>Default: <command>time offset = 0</command></para>
7409                 <para>Example: <command>time offset = 60</command></para>
7410                 </listitem>
7411                 </varlistentry>
7412
7413
7414
7415                 <varlistentry>
7416                 <term><anchor id="TIMESERVER">time server (G)</term>
7417                 <listitem><para>This parameter determines if <ulink url="nmbd.8.html">                  
7418                 nmbd(8)</ulink> advertises itself as a time server to Windows 
7419                 clients.</para>
7420
7421                 <para>Default: <command>time server = no</command></para>
7422                 </listitem>
7423                 </varlistentry>
7424
7425
7426                 <varlistentry>
7427                 <term><anchor id="TIMESTAMPLOGS">timestamp logs (G)</term>
7428                 <listitem><para>Synonym for <link linkend="DEBUGTIMESTAMP"><parameter>
7429                 debug timestamp</parameter></link>.</para>
7430                 </listitem>
7431                 </varlistentry>
7432
7433
7434
7435
7436
7437                 <varlistentry>
7438                 <term><anchor id="TOTALPRINTJOBS">total print jobs (G)</term>
7439                 <listitem><para>This parameter accepts an integer value which defines
7440                 a limit on the maximum number of print jobs that will be accepted 
7441                 system wide at any given time.  If a print job is submitted
7442                 by a client which will exceed this number, then <ulink url="smbd.8.html">smbd</ulink> will return an 
7443                 error indicating that no space is available on the server.  The 
7444                 default value of 0 means that no such limit exists.  This parameter
7445                 can be used to prevent a server from exceeding its capacity and is
7446                 designed as a printing throttle.  See also 
7447                 <link linkend="MAXPRINTJOBS"><parameter>max print jobs</parameter</link>.
7448                 </para>
7449                 
7450                 <para>Default: <command>total print jobs = 0</command></para>
7451                 <para>Example: <command>total print jobs = 5000</command></para>
7452                 </listitem>
7453                 </varlistentry>
7454
7455
7456
7457
7458                 <varlistentry>
7459                 <term><anchor id="UNIXEXTENSIONS">unix extensions(G)</term>
7460                 <listitem><para>This boolean parameter controls whether Samba 
7461                 implments the CIFS UNIX extensions, as defined by HP. These
7462                 extensions enable CIFS to server UNIX clients to UNIX servers
7463                 better, and allow such things as symbolic links, hard links etc.
7464                 These extensions require a similarly enabled client, and are of
7465                 no current use to Windows clients.</para>
7466
7467                 <para>Default: <command>unix extensions = no</command></para>
7468                 </listitem>
7469                 </varlistentry>
7470
7471
7472
7473
7474                 <varlistentry>
7475                 <term><anchor id="UNIXPASSWORDSYNC">unix password sync (G)</term>
7476                 <listitem><para>This boolean parameter controls whether Samba 
7477                 attempts to synchronize the UNIX password with the SMB password 
7478                 when the encrypted SMB password in the smbpasswd file is changed. 
7479                 If this is set to <constant>true</constant> the program specified in the <parameter>passwd
7480                 program</parameter>parameter is called <emphasis>AS ROOT</emphasis> - 
7481                 to allow the new UNIX password to be set without access to the 
7482                 old UNIX password (as the SMB password change code has no 
7483                 access to the old password cleartext, only the new).</para>
7484
7485                 <para>See also <link linkend="PASSWDPROGRAM"><parameter>passwd 
7486                 program</parameter></link>, <link linkend="PASSWDCHAT"><parameter>
7487                 passwd chat</parameter></link>.</para>
7488
7489                 <para>Default: <command>unix password sync = no</command></para>
7490                 </listitem>
7491                 </varlistentry>
7492
7493
7494
7495                 <varlistentry>
7496                 <term><anchor id="UPDATEENCRYPTED">update encrypted (G)</term>
7497                 <listitem><para>This boolean parameter allows a user logging 
7498                 on with a plaintext password to have their encrypted (hashed) 
7499                 password in the smbpasswd file to be updated automatically as 
7500                 they log on. This option allows a site to migrate from plaintext 
7501                 password authentication (users authenticate with plaintext 
7502                 password over the wire, and are checked against a UNIX account 
7503                 database) to encrypted password authentication (the SMB 
7504                 challenge/response authentication mechanism) without forcing
7505                 all users to re-enter their passwords via smbpasswd at the time the
7506                 change is made. This is a convenience option to allow the change over
7507                 to encrypted passwords to be made over a longer period. Once all users
7508                 have encrypted representations of their passwords in the smbpasswd
7509                 file this parameter should be set to <constant>no</constant>.</para>
7510
7511                 <para>In order for this parameter to work correctly the <link
7512                 linkend="ENCRYPTPASSWORDS"><parameter>encrypt passwords</parameter>
7513                 </link> parameter must be set to <constant>no</constant> when
7514                 this parameter is set to <constant>yes</constant>.</para>
7515
7516                 <para>Note that even when this parameter is set a user 
7517                 authenticating to <command>smbd</command> must still enter a valid 
7518                 password in order to connect correctly, and to update their hashed 
7519                 (smbpasswd) passwords.</para>
7520
7521                 <para>Default: <command>update encrypted = no</command></para>
7522                 </listitem>
7523                 </varlistentry>
7524
7525
7526                 <varlistentry>
7527                 <term><anchor id="USECLIENTDRIVER">use client driver (S)</term>
7528                 <listitem><para>This parameter applies only to Windows NT/2000
7529                 clients.  It has no affect on Windows 95/98/ME clients.  When 
7530                 serving a printer to Windows NT/2000 clients without first installing
7531                 a valid printer driver on the Samba host, the client will be required
7532                 to install a local printer driver.  From this point on, the client
7533                 will treat the print as a local printer and not a network printer 
7534                 connection.  This is much the same behavior that will occur
7535                 when <command>disable spoolss = yes</command>.  </para>
7536
7537                 <para>The differentiating 
7538                 factor is that under normal circumstances, the NT/2000 client will 
7539                 attempt to open the network printer using MS-RPC.  The problem is that
7540                 because the client considers the printer to be local, it will attempt
7541                 to issue the OpenPrinterEx() call requesting access rights associated 
7542                 with the logged on user. If the user possesses local administator rights
7543                 but not root privilegde on the Samba host (often the case), the OpenPrinterEx()
7544                 call will fail.  The result is that the client will now display an "Access
7545                 Denied; Unable to connect" message in the printer queue window (even though
7546                 jobs may successfully be printed).  </para>
7547
7548                 <para>If this parameter is enabled for a printer, then any attempt
7549                 to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped
7550                 to PRINTER_ACCESS_USE instead.  Thus allowing the OpenPrinterEx()
7551                 call to succeed.  <emphasis>This parameter MUST not be able enabled
7552                 on a print share which has valid print driver installed on the Samba 
7553                 server.</emphasis></para>
7554
7555                 <para>See also <link linkend="DISABLESPOOLSS">disable spoolss</link>
7556                 </para>
7557
7558                 <para>Default: <command>use client driver = no</command></para>
7559                 </listitem>
7560                 </varlistentry>
7561         
7562
7563
7564                 <varlistentry>
7565                 <term><anchor id="USEMMAP">use mmap (G)</term>
7566                 <listitem><para>This global parameter determines if the tdb internals of Samba can
7567                 depend on mmap working correctly on the running system. Samba requires a coherent
7568                 mmap/read-write system memory cache. Currently only HPUX does not have such a
7569                 coherent cache, and so this parameter is set to <constant>false</constant> by
7570                 default on HPUX. On all other systems this parameter should be left alone. This
7571                 parameter is provided to help the Samba developers track down problems with
7572                 the tdb internal code.
7573                 </para>
7574
7575                 <para>Default: <command>use mmap = yes</command></para>
7576                 </listitem>
7577                 </varlistentry>
7578
7579
7580
7581
7582                 <varlistentry>
7583                 <term><anchor id="USERHOSTS">use rhosts (G)</term>
7584                 <listitem><para>If this global parameter is <constant>true</constant>, it specifies 
7585                 that the UNIX user's <filename>.rhosts</filename> file in their home directory 
7586                 will be read to find the names of hosts and users who will be allowed 
7587                 access without specifying a password.</para>
7588
7589                 <para><emphasis>NOTE:</emphasis> The use of <parameter>use rhosts
7590                 </parameter> can be a major security hole. This is because you are 
7591                 trusting the PC to supply the correct username. It is very easy to 
7592                 get a PC to supply a false username. I recommend that the <parameter>
7593                 use rhosts</parameter> option be only used if you really know what 
7594                 you are doing.</para>
7595
7596                 <para>Default: <command>use rhosts = no</command></para>
7597                 </listitem>
7598                 </varlistentry>
7599
7600
7601
7602                 <varlistentry>
7603                 <term><anchor id="USER">user (S)</term>
7604                 <listitem><para>Synonym for <link linkend="USERNAME"><parameter>
7605                 username</parameter></link>.</para>
7606                 </listitem>
7607                 </varlistentry>
7608
7609
7610
7611                 <varlistentry>
7612                 <term><anchor id="USERS">users (S)</term>
7613                 <listitem><para>Synonym for <link linkend="USERNAME"><parameter>
7614                 username</parameter></link>.</para>
7615                 </listitem>
7616                 </varlistentry>
7617
7618
7619                 <varlistentry>
7620                 <term><anchor id="USERNAME">username (S)</term>
7621                 <listitem><para>Multiple users may be specified in a comma-delimited 
7622                 list, in which case the supplied password will be tested against 
7623                 each username in turn (left to right).</para>
7624
7625                 <para>The <parameter>username</parameter> line is needed only when 
7626                 the PC is unable to supply its own username. This is the case 
7627                 for the COREPLUS protocol or where your users have different WfWg 
7628                 usernames to UNIX usernames. In both these cases you may also be 
7629                 better using the \\server\share%user syntax instead.</para>
7630
7631                 <para>The <parameter>username</parameter> line is not a great 
7632                 solution in many cases as it means Samba will try to validate 
7633                 the supplied password against each of the usernames in the 
7634                 <parameter>username</parameter> line in turn. This is slow and 
7635                 a bad idea for lots of users in case of duplicate passwords. 
7636                 You may get timeouts or security breaches using this parameter 
7637                 unwisely.</para>
7638
7639                 <para>Samba relies on the underlying UNIX security. This 
7640                 parameter does not restrict who can login, it just offers hints 
7641                 to the Samba server as to what usernames might correspond to the 
7642                 supplied password. Users can login as whoever they please and 
7643                 they will be able to do no more damage than if they started a 
7644                 telnet session. The daemon runs as the user that they log in as, 
7645                 so they cannot do anything that user cannot do.</para>
7646
7647                 <para>To restrict a service to a particular set of users you 
7648                 can use the <link linkend="VALIDUSERS"><parameter>valid users
7649                 </parameter></link> parameter.</para>
7650
7651                 <para>If any of the usernames begin with a '@' then the name 
7652                 will be looked up first in the NIS netgroups list (if Samba 
7653                 is compiled with netgroup support), followed by a lookup in 
7654                 the UNIX groups database and will expand to a list of all users 
7655                 in the group of that name.</para>
7656                 
7657                 <para>If any of the usernames begin with a '+' then the name 
7658                 will be looked up only in the UNIX groups database and will 
7659                 expand to a list of all users in the group of that name.</para>
7660
7661                 <para>If any of the usernames begin with a '&'then the name 
7662                 will be looked up only in the NIS netgroups database (if Samba 
7663                 is compiled with netgroup support) and will expand to a list 
7664                 of all users in the netgroup group of that name.</para>
7665
7666                 <para>Note that searching though a groups database can take 
7667                 quite some time, and some clients may time out during the 
7668                 search.</para>
7669
7670                 <para>See the section <link linkend="VALIDATIONSECT">NOTE ABOUT 
7671                 USERNAME/PASSWORD VALIDATION</link> for more information on how 
7672                 this parameter determines access to the services.</para>
7673
7674                 <para>Default: <command>The guest account if a guest service, 
7675                 else &lt;empty string&gt;.</command></para>
7676
7677                 <para>Examples:<command>username = fred, mary, jack, jane, 
7678                 @users, @pcgroup</command></para>
7679                 </listitem>
7680                 </varlistentry>
7681
7682
7683
7684                 <varlistentry>
7685                 <term><anchor id="USERNAMELEVEL">username level (G)</term>
7686                 <listitem><para>This option helps Samba to try and 'guess' at 
7687                 the real UNIX username, as many DOS clients send an all-uppercase 
7688                 username. By default Samba tries all lowercase, followed by the 
7689                 username with the first letter capitalized, and fails if the 
7690                 username is not found on the UNIX machine.</para>
7691
7692                 <para>If this parameter is set to non-zero the behavior changes. 
7693                 This parameter is a number that specifies the number of uppercase
7694                 combinations to try while trying to determine the UNIX user name. The
7695                 higher the number the more combinations will be tried, but the slower
7696                 the discovery of usernames will be. Use this parameter when you have
7697                 strange usernames on your UNIX machine, such as <constant>AstrangeUser
7698                 </constant>.</para>
7699
7700                 <para>Default: <command>username level = 0</command></para>
7701                 <para>Example: <command>username level = 5</command></para>
7702                 </listitem>
7703                 </varlistentry>
7704
7705
7706
7707                 <varlistentry>
7708                 <term><anchor id="USERNAMEMAP">username map (G)</term>
7709                 <listitem><para>This option allows you to specify a file containing 
7710                 a mapping of usernames from the clients to the server. This can be 
7711                 used for several purposes. The most common is to map usernames 
7712                 that users use on DOS or Windows machines to those that the UNIX 
7713                 box uses. The other is to map multiple users to a single username 
7714                 so that they can more easily share files.</para>
7715
7716                 <para>The map file is parsed line by line. Each line should 
7717                 contain a single UNIX username on the left then a '=' followed 
7718                 by a list of usernames on the right. The list of usernames on the 
7719                 right may contain names of the form @group in which case they 
7720                 will match any UNIX username in that group. The special client 
7721                 name '*' is a wildcard and matches any name. Each line of the 
7722                 map file may be up to 1023 characters long.</para>
7723
7724                 <para>The file is processed on each line by taking the 
7725                 supplied username and comparing it with each username on the right 
7726                 hand side of the '=' signs. If the supplied name matches any of 
7727                 the names on the right hand side then it is replaced with the name 
7728                 on the left. Processing then continues with the next line.</para>
7729
7730                 <para>If any line begins with a '#' or a ';' then it is 
7731                 ignored</para>
7732
7733                 <para>If any line begins with an '!' then the processing 
7734                 will stop after that line if a mapping was done by the line. 
7735                 Otherwise mapping continues with every line being processed. 
7736                 Using '!' is most useful when you have a wildcard mapping line 
7737                 later in the file.</para>
7738                 
7739                 <para>For example to map from the name <constant>admin</constant> 
7740                 or <constant>administrator</constant> to the UNIX name <constant>
7741                 root</constant> you would use:</para>
7742
7743                 <para><command>root = admin administrator</command></para>
7744
7745                 <para>Or to map anyone in the UNIX group <constant>system</constant> 
7746                 to the UNIX name <constant>sys</constant> you would use:</para>
7747
7748                 <para><command>sys = @system</command></para>
7749
7750                 <para>You can have as many mappings as you like in a username 
7751                 map file.</para>
7752                 
7753                 
7754                 <para>If your system supports the NIS NETGROUP option then 
7755                 the netgroup database is checked before the <filename>/etc/group
7756                 </filename> database for matching groups.</para>
7757
7758                 <para>You can map Windows usernames that have spaces in them
7759                  by using double quotes around the name. For example:</para>
7760
7761                 <para><command>tridge = "Andrew Tridgell"</command></para>
7762
7763                 <para>would map the windows username "Andrew Tridgell" to the 
7764                 unix username "tridge".</para>
7765
7766                 <para>The following example would map mary and fred to the 
7767                 unix user sys, and map the rest to guest. Note the use of the 
7768                 '!' to tell Samba to stop processing if it gets a match on 
7769                 that line.</para>
7770
7771                 <para><programlisting>
7772                 !sys = mary fred
7773                 guest = *
7774                 </programlisting></para>
7775
7776                 <para>Note that the remapping is applied to all occurrences 
7777                 of usernames. Thus if you connect to \\server\fred and <constant>
7778                 fred</constant> is remapped to <constant>mary</constant> then you 
7779                 will actually be connecting to \\server\mary and will need to 
7780                 supply a password suitable for <constant>mary</constant> not 
7781                 <constant>fred</constant>. The only exception to this is the 
7782                 username passed to the <link linkend="PASSWORDSERVER"><parameter>
7783                 password server</parameter></link> (if you have one). The password 
7784                 server will receive whatever username the client supplies without 
7785                 modification.</para>
7786
7787                 <para>Also note that no reverse mapping is done. The main effect 
7788                 this has is with printing. Users who have been mapped may have 
7789                 trouble deleting print jobs as PrintManager under WfWg will think 
7790                 they don't own the print job.</para>
7791
7792                 <para>Default: <emphasis>no username map</emphasis></para>
7793                 <para>Example: <command>username map = /usr/local/samba/lib/users.map
7794                 </command></para>
7795                 </listitem>
7796                 </varlistentry>
7797
7798
7799
7800                 <varlistentry>
7801                 <term><anchor id="UTMP">utmp (G)</term>
7802                 <listitem><para>This boolean parameter is only available if 
7803                 Samba has been configured and compiled  with the option <command>
7804                 --with-utmp</command>. If set to <constant>true</constant> then Samba will attempt
7805                 to add utmp or utmpx records (depending on the UNIX system) whenever a
7806                 connection is made to a Samba server. Sites may use this to record the
7807                 user connecting to a Samba share.</para>
7808
7809                 <para>See also the <link linkend="UTMPDIRECTORY"><parameter>
7810                 utmp directory</parameter></link> parameter.</para>
7811
7812                 <para>Default: <command>utmp = no</command></para>
7813                 </listitem>
7814                 </varlistentry>
7815
7816
7817
7818                 <varlistentry>
7819                 <term><anchor id="UTMPDIRECTORY">utmp directory(G)</term>
7820                 <listitem><para>This parameter is only available if Samba has 
7821                 been configured and compiled with the option <command>
7822                 --with-utmp</command>. It specifies a directory pathname that is
7823                 used to store the utmp or utmpx files (depending on the UNIX system) that
7824                 record user connections to a Samba server. See also the <link linkend="UTMP">
7825                 <parameter>utmp</parameter></link> parameter. By default this is 
7826                 not set, meaning the system will use whatever utmp file the 
7827                 native system is set to use (usually 
7828                 <filename>/var/run/utmp</filename> on Linux).</para>
7829
7830                 <para>Default: <emphasis>no utmp directory</emphasis></para>
7831                 </listitem>
7832                 </varlistentry>
7833
7834
7835
7836
7837
7838                 <varlistentry>
7839                 <term><anchor id="VALIDUSERS">valid users (S)</term>
7840                 <listitem><para>This is a list of users that should be allowed 
7841                 to login to this service. Names starting with '@', '+' and  '&'
7842                 are interpreted using the same rules as described in the 
7843                 <parameter>invalid users</parameter> parameter.</para>
7844
7845                 <para>If this is empty (the default) then any user can login. 
7846                 If a username is in both this list and the <parameter>invalid 
7847                 users</parameter> list then access is denied for that user.</para>
7848
7849                 <para>The current servicename is substituted for <parameter>%S
7850                 </parameter>. This is useful in the [homes] section.</para>
7851
7852                 <para>See also <link linkend="INVALIDUSERS"><parameter>invalid users
7853                 </parameter></link></para>
7854
7855                 <para>Default: <emphasis>No valid users list (anyone can login)
7856                 </emphasis></para>
7857
7858                 <para>Example: <command>valid users = greg, @pcusers</command></para>
7859                 </listitem>
7860                 </varlistentry>
7861
7862
7863
7864
7865                 <varlistentry>
7866                 <term><anchor id="VETOFILES">veto files(S)</term>
7867                 <listitem><para>This is a list of files and directories that 
7868                 are neither visible nor accessible.  Each entry in the list must 
7869                 be separated by a '/', which allows spaces to be included 
7870                 in the entry. '*' and '?' can be used to specify multiple files 
7871                 or directories as in DOS wildcards.</para>
7872
7873                 <para>Each entry must be a unix path, not a DOS path and 
7874                 must <emphasis>not</emphasis> include the  unix directory 
7875                 separator '/'.</para>
7876
7877                 <para>Note that the <parameter>case sensitive</parameter> option 
7878                 is applicable in vetoing files.</para>
7879                 
7880                 <para>One feature of the veto files parameter that it
7881                 is important to be aware of is Samba's behaviour when
7882                 trying to delete a directory. If a directory that is
7883                 to be deleted contains nothing but veto files this
7884                 deletion will <emphasis>fail</emphasis> unless you also set
7885                 the <parameter>delete veto files</parameter> parameter to
7886                 <parameter>yes</parameter>.</para>
7887
7888                 <para>Setting this parameter will affect the performance 
7889                 of Samba, as it will be forced to check all files and directories 
7890                 for a match as they are scanned.</para>
7891
7892                 <para>See also <link linkend="HIDEFILES"><parameter>hide files
7893                 </parameter></link> and <link linkend="CASESENSITIVE"><parameter>
7894                 case sensitive</parameter></link>.</para>
7895
7896                 <para>Default: <emphasis>No files or directories are vetoed.
7897                 </emphasis></para>
7898
7899 <para>Examples:<programlisting>
7900 ; Veto any files containing the word Security, 
7901 ; any ending in .tmp, and any directory containing the
7902 ; word root.
7903 veto files = /*Security*/*.tmp/*root*/
7904
7905 ; Veto the Apple specific files that a NetAtalk server
7906 ; creates.
7907 veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
7908 </programlisting></para>
7909                 </listitem>
7910                 </varlistentry>
7911
7912
7913                 <varlistentry>
7914                 <term><anchor id="VETOOPLOCKFILES">veto oplock files (S)</term>
7915                 <listitem><para>This parameter is only valid when the <link
7916                 linkend="OPLOCKS"><parameter>oplocks</parameter></link>
7917                 parameter is turned on for a share. It allows the Samba administrator
7918                 to selectively turn off the granting of oplocks on selected files that
7919                 match a wildcarded list, similar to the wildcarded list used in the
7920                 <link linkend="VETOFILES"><parameter>veto files</parameter></link> 
7921                 parameter.</para>
7922
7923                 <para>Default: <emphasis>No files are vetoed for oplock 
7924                 grants</emphasis></para>
7925
7926                 <para>You might want to do this on files that you know will 
7927                 be heavily contended for by clients. A good example of this 
7928                 is in the NetBench SMB benchmark program, which causes heavy 
7929                 client contention for files ending in <filename>.SEM</filename>. 
7930                 To cause Samba not to grant oplocks on these files you would use 
7931                 the line (either in the [global] section or in the section for 
7932                 the particular NetBench share :</para>
7933
7934                 <para>Example: <command>veto oplock files = /*.SEM/
7935                 </command></para>
7936                 </listitem>
7937                 </varlistentry>
7938
7939
7940
7941                 <varlistentry>
7942                 <term><anchor id="VFSOBJECT">vfs object (S)</term>
7943                 <listitem><para>This parameter specifies a shared object file that 
7944                 is used for Samba VFS I/O operations.  By default, normal 
7945                 disk I/O operations are used but these can be overloaded 
7946                 with a VFS object.  The Samba VFS layer is new to Samba 2.2 and 
7947                 must be enabled at compile time with --with-vfs.</para>
7948                 
7949                 <para>Default : <emphasis>no value</emphasis></para>
7950                 </listitem>
7951                 </varlistentry>
7952
7953
7954
7955
7956                 <varlistentry>
7957                 <term><anchor id="VFSOPTIONS">vfs options (S)</term>
7958                 <listitem><para>This parameter allows parameters to be passed 
7959                 to the vfs layer at initialization time.  The Samba VFS layer 
7960                 is new to Samba 2.2 and must be enabled at compile time 
7961                 with --with-vfs.  See also <link linkend="VFSOBJECT"><parameter>
7962                 vfs object</parameter></link>.</para>
7963                 
7964                 <para>Default : <emphasis>no value</emphasis></para>
7965                 </listitem>
7966                 </varlistentry>
7967
7968
7969
7970                 <varlistentry>
7971                 <term><anchor id="VOLUME">volume (S)</term>
7972                 <listitem><para> This allows you to override the volume label 
7973                 returned for a share. Useful for CDROMs with installation programs 
7974                 that insist on a particular volume label.</para>
7975
7976                 <para>Default: <emphasis>the name of the share</emphasis></para>
7977                 </listitem>
7978                 </varlistentry>
7979
7980
7981
7982                 <varlistentry>
7983                 <term><anchor id="WIDELINKS">wide links (S)</term>
7984                 <listitem><para>This parameter controls whether or not links 
7985                 in the UNIX file system may be followed by the server. Links 
7986                 that point to areas within the directory tree exported by the 
7987                 server are always allowed; this parameter controls access only 
7988                 to areas that are outside the directory tree being exported.</para>
7989
7990                 <para>Note that setting this parameter can have a negative 
7991                 effect on your server performance due to the extra system calls 
7992                 that Samba has to  do in order to perform the link checks.</para>
7993
7994                 <para>Default: <command>wide links = yes</command></para>
7995                 </listitem>
7996                 </varlistentry>
7997
7998
7999
8000
8001                 <varlistentry>
8002                 <term><anchor id="WINBINDCACHETIME">winbind cache time</term>
8003                 <listitem><para>This parameter specifies the number of seconds the
8004                 <ulink url="winbindd.8.html">winbindd(8)</ulink> daemon will cache 
8005                 user and group information before querying a Windows NT server 
8006                 again.</para>
8007
8008                 <para>Default: <command>winbind cache type = 15</command></para>
8009                 </listitem>
8010                 </varlistentry>
8011
8012
8013                 <varlistentry>
8014                 <term><anchor id="WINBINDENUMUSERS">winbind enum
8015                 users</term> <listitem><para>On large installations using
8016                 <ulink url="winbindd.8.html">winbindd(8)</ulink> it may be
8017                 necessary to suppress the enumeration of users through the
8018                 <command> setpwent()</command>,
8019                 <command>getpwent()</command> and
8020                 <command>endpwent()</command> group of system calls.  If
8021                 the <parameter>winbind enum users</parameter> parameter is
8022                 false, calls to the <command>getpwent</command> system call
8023                 will not return any data. </para>
8024
8025                 <para><emphasis>Warning:</emphasis> Turning off user
8026                 enumeration may cause some programs to behave oddly.  For
8027                 example, the finger program relies on having access to the
8028                 full user list when searching for matching
8029                 usernames. </para>
8030
8031                 <para>Default: <command>winbind enum users = yes </command></para>
8032                 </listitem>
8033                 </varlistentry>
8034                 
8035                 <varlistentry>
8036                 <term><anchor id="WINBINDENUMGROUPS">winbind enum
8037                 groups</term> <listitem><para>On large installations using
8038                 <ulink url="winbindd.8.html">winbindd(8)</ulink> it may be
8039                 necessary to suppress the enumeration of groups through the
8040                 <command> setgrent()</command>,
8041                 <command>getgrent()</command> and
8042                 <command>endgrent()</command> group of system calls.  If
8043                 the <parameter>winbind enum groups</parameter> parameter is
8044                 false, calls to the <command>getgrent()</command> system
8045                 call will not return any data. </para>
8046
8047                 <para><emphasis>Warning:</emphasis> Turning off group
8048                 enumeration may cause some programs to behave oddly.
8049                 </para>
8050
8051                 <para>Default: <command>winbind enum groups = yes </command>
8052                 </para></listitem>
8053                 </varlistentry>
8054
8055         
8056                 <varlistentry>
8057                 <term><anchor id="WINBINDGID">winbind gid</term>
8058                 <listitem><para>The winbind gid parameter specifies the range of group 
8059                 ids that are allocated by the <ulink url="winbindd.8.html">
8060                 winbindd(8)</ulink> daemon.  This range of group ids should have no 
8061                 existing local or NIS groups within it as strange conflicts can 
8062                 occur otherwise.</para>
8063
8064                 <para>Default: <command>winbind gid = &lt;empty string&gt;
8065                 </command></para>
8066
8067                 <para>Example: <command>winbind gid = 10000-20000</command></para>
8068                 </listitem>
8069                 </varlistentry>
8070
8071
8072                 <varlistentry>
8073                 <term><anchor id="WINBINDSEPARATOR">winbind separator</term>
8074                 <listitem><para>This parameter allows an admin to define the character 
8075                 used when listing a username of the form of <replaceable>DOMAIN
8076                 </replaceable>\<replaceable>user</replaceable>.  This parameter 
8077                 is only applicable when using the <filename>pam_winbind.so</filename>
8078                 and <filename>nss_winbind.so</filename> modules for UNIX services.
8079                 </para>
8080
8081                 <para>Please note that setting this parameter to + causes problems
8082                 with group membership at least on glibc systems, as the character +
8083                 is used as a special character for NIS in /etc/group.</para>
8084
8085                 <para>Example: <command>winbind separator = \\</command></para>
8086                 <para>Example: <command>winbind separator = /</command></para>
8087                 </listitem>
8088                 </varlistentry>
8089
8090
8091
8092
8093                 <varlistentry>
8094                 <term><anchor id="WINBINDUID">winbind uid</term>
8095                 <listitem><para>The winbind gid parameter specifies the range of group 
8096                 ids that are allocated by the <ulink url="winbindd.8.html">
8097                 winbindd(8)</ulink> daemon.  This range of ids should have no 
8098                 existing local or NIS users within it as strange conflicts can 
8099                 occur otherwise.</para>
8100
8101                 <para>Default: <command>winbind uid = &lt;empty string&gt;
8102                 </command></para>
8103                 
8104                 <para>Example: <command>winbind uid = 10000-20000</command></para>
8105                 </listitem>
8106                 </varlistentry>
8107
8108
8109                 <varlistentry>
8110                 <term>winbind use default domain</term>
8111                 
8112                 <term><anchor id="WINBINDUSEDEFAULTDOMAIN">winbind use default domain</term>
8113                 <listitem><para>This parameter specifies whether the <ulink url="winbindd.8.html">
8114                 winbindd(8)</ulink>
8115                 daemon should operate on users without domain component in their username.  
8116                 Users without a domain component are treated as is part of the winbindd server's 
8117                 own domain.  While this does not benifit Windows users, it makes SSH, FTP and e-mail 
8118                 function in a way much closer to the way they would in a native unix system.</para>
8119                 
8120                 <para>Default: <command>winbind use default domain = &lt;falseg&gt; 
8121                 </command></para>
8122                 <para>Example: <command>winbind use default domain = true</command></para>
8123                 </listitem>
8124                 </varlistentry>
8125
8126
8127                 <varlistentry>
8128                 <term><anchor id="WINSHOOK">wins hook (G)</term>
8129                 <listitem><para>When Samba is running as a WINS server this 
8130                 allows you to call an external program for all changes to the 
8131                 WINS database. The primary use for this option is to allow the 
8132                 dynamic update of external name resolution databases such as 
8133                 dynamic DNS.</para>
8134
8135                 <para>The wins hook parameter specifies the name of a script 
8136                 or executable that will be called as follows:</para>
8137
8138                 <para><command>wins_hook operation name nametype ttl IP_list
8139                 </command></para>
8140
8141                 <itemizedlist>
8142                         <listitem><para>The first argument is the operation and is one 
8143                         of "add", "delete", or "refresh". In most cases the operation can 
8144                         be ignored as the rest of the parameters provide sufficient 
8145                         information. Note that "refresh" may sometimes be called when the 
8146                         name has not previously been added, in that case it should be treated 
8147                         as an add.</para></listitem>
8148
8149                         <listitem><para>The second argument is the NetBIOS name. If the 
8150                         name is not a legal name then the wins hook is not called. 
8151                         Legal names contain only  letters, digits, hyphens, underscores 
8152                         and periods.</para></listitem>
8153
8154                         <listitem><para>The third argument is the NetBIOS name 
8155                         type as a 2 digit hexadecimal number. </para></listitem>
8156
8157                         <listitem><para>The fourth argument is the TTL (time to live) 
8158                         for the name in seconds.</para></listitem>
8159                         
8160                         <listitem><para>The fifth and subsequent arguments are the IP 
8161                         addresses currently registered for that name. If this list is 
8162                         empty then the name should be deleted.</para></listitem>
8163                 </itemizedlist>
8164
8165                 <para>An example script that calls the BIND dynamic DNS update 
8166                 program <command>nsupdate</command> is provided in the examples 
8167                 directory of the Samba source code. </para>
8168                 </listitem>
8169                 </varlistentry>
8170
8171
8172
8173
8174
8175                 <varlistentry>
8176                 <term><anchor id="WINSPROXY">wins proxy (G)</term>
8177                 <listitem><para>This is a boolean that controls if <ulink 
8178                 url="nmbd.8.html">nmbd(8)</ulink> will respond to broadcast name 
8179                 queries on behalf of  other hosts. You may need to set this 
8180                 to <constant>yes</constant> for some older clients.</para>
8181
8182                 <para>Default: <command>wins proxy = no</command></para>
8183                 </listitem>
8184                 </varlistentry>
8185
8186
8187
8188
8189                 <varlistentry>
8190                 <term><anchor id="WINSSERVER">wins server (G)</term>
8191                 <listitem><para>This specifies the IP address (or DNS name: IP 
8192                 address for preference) of the WINS server that <ulink url="nmbd.8.html">
8193                 nmbd(8)</ulink> should register with. If you have a WINS server on 
8194                 your network then you should set this to the WINS server's IP.</para>
8195
8196                 <para>You should point this at your WINS server if you have a
8197                 multi-subnetted network.</para>
8198
8199                 <para><emphasis>NOTE</emphasis>. You need to set up Samba to point 
8200                 to a WINS server if you have multiple subnets and wish cross-subnet 
8201                 browsing to work correctly.</para>
8202
8203                 <para>See the documentation file <filename>BROWSING.txt</filename> 
8204                 in the docs/ directory of your Samba source distribution.</para>
8205
8206                 <para>Default: <emphasis>not enabled</emphasis></para>
8207                 <para>Example: <command>wins server = 192.9.200.1</command></para>
8208                 </listitem>
8209                 </varlistentry>
8210
8211
8212
8213                 <varlistentry>
8214                 <term><anchor id="WINSSUPPORT">wins support (G)</term>
8215                 <listitem><para>This boolean controls if the <ulink url="nmbd.8.html">          
8216                 nmbd(8)</ulink> process in Samba will act as a WINS server. You should 
8217                 not set this to <constant>true</constant> unless you have a multi-subnetted network and 
8218                 you wish a particular <command>nmbd</command> to be your WINS server. 
8219                 Note that you should <emphasis>NEVER</emphasis> set this to <constant>true</constant>
8220                 on more than one machine in your network.</para>
8221
8222                 <para>Default: <command>wins support = no</command></para>
8223                 </listitem>
8224                 </varlistentry>
8225
8226
8227
8228                 <varlistentry>
8229                 <term><anchor id="WORKGROUP">workgroup (G)</term>
8230                 <listitem><para>This controls what workgroup your server will 
8231                 appear to be in when queried by clients. Note that this parameter 
8232                 also controls the Domain name used with the <link 
8233                 linkend="SECURITYEQUALSDOMAIN"><command>security = domain</command></link>
8234                 setting.</para>
8235
8236                 <para>Default: <emphasis>set at compile time to WORKGROUP</emphasis></para>
8237                 <para>Example: <command>workgroup = MYGROUP</command></para>
8238                 </listitem>
8239                 </varlistentry>
8240
8241
8242
8243
8244                 <varlistentry>
8245                 <term><anchor id="WRITABLE">writable (S)</term>
8246                 <listitem><para>Synonym for <link linkend="WRITEABLE"><parameter>
8247                 writeable</parameter></link> for people who can't spell :-).</para>
8248                 </listitem>
8249                 </varlistentry>
8250
8251
8252
8253                 <varlistentry>
8254                 <term><anchor id="WRITECACHESIZE">write cache size (S)</term>
8255                 <listitem><para>If this integer parameter is set to non-zero value,
8256                 Samba will create an in-memory cache for each oplocked file 
8257                 (it does <emphasis>not</emphasis> do this for 
8258                 non-oplocked files). All writes that the client does not request 
8259                 to be flushed directly to disk will be stored in this cache if possible. 
8260                 The cache is flushed onto disk when a write comes in whose offset 
8261                 would not fit into the cache or when the file is closed by the client. 
8262                 Reads for the file are also served from this cache if the data is stored 
8263                 within it.</para>
8264
8265                 <para>This cache allows Samba to batch client writes into a more 
8266                 efficient write size for RAID disks (i.e. writes may be tuned to 
8267                 be the RAID stripe size) and can improve performance on systems 
8268                 where the disk subsystem is a bottleneck but there is free 
8269                 memory for userspace programs.</para>
8270
8271                 <para>The integer parameter specifies the size of this cache 
8272                 (per oplocked file) in bytes.</para>
8273
8274                 <para>Default: <command>write cache size = 0</command></para>
8275                 <para>Example: <command>write cache size = 262144</command></para>
8276
8277                 <para>for a 256k cache size per file.</para>
8278                 </listitem>
8279                 </varlistentry>
8280
8281
8282
8283
8284
8285                 <varlistentry>
8286                 <term><anchor id="WRITELIST">write list (S)</term>
8287                 <listitem><para>This is a list of users that are given read-write 
8288                 access to a service. If the connecting user is in this list then 
8289                 they will be given write access, no matter what the <link
8290                 linkend="WRITEABLE"><parameter>writeable</parameter></link>
8291                 option is set to. The list can include group names using the 
8292                 @group syntax.</para>
8293
8294                 <para>Note that if a user is in both the read list and the 
8295                 write list then they will be given write access.</para>
8296
8297                 <para>See also the <link linkend="READLIST"><parameter>read list
8298                 </parameter></link> option.</para>
8299
8300                 <para>Default: <command>write list = &lt;empty string&gt;
8301                 </command></para>
8302
8303                 <para>Example: <command>write list = admin, root, @staff
8304                 </command></para>
8305                 </listitem>
8306                 </varlistentry>
8307
8308
8309
8310
8311
8312                 <varlistentry>
8313                 <term><anchor id="WRITEOK">write ok (S)</term>
8314                 <listitem><para>Synonym for <link linkend="WRITEABLE"><parameter>
8315                 writeable</parameter></link>.</para>
8316                 </listitem>
8317                 </varlistentry>
8318
8319
8320
8321                 <varlistentry>
8322                 <term><anchor id="WRITERAW">write raw (G)</term>
8323                 <listitem><para>This parameter controls whether or not the server 
8324                 will support raw write SMB's when transferring data from clients. 
8325                 You should never need to change this parameter.</para>
8326
8327                 <para>Default: <command>write raw = yes</command></para>
8328                 </listitem>
8329                 </varlistentry>
8330
8331
8332
8333                 <varlistentry>
8334                 <term><anchor id="WRITEABLE">writeable (S)</term>
8335                 <listitem><para>An inverted synonym is <link linkend="READONLY">
8336                 <parameter>read only</parameter></link>.</para>
8337
8338                 <para>If this parameter is <constant>no</constant>, then users 
8339                 of a service may not create or modify files in the service's 
8340                 directory.</para>
8341
8342                 <para>Note that a printable service (<command>printable = yes</command>)
8343                 will <emphasis>ALWAYS</emphasis> allow writing to the directory 
8344                 (user privileges permitting), but only via spooling operations.</para>
8345
8346                 <para>Default: <command>writeable = no</command></para>
8347                 </listitem>
8348                 </varlistentry>
8349
8350
8351         </variablelist>
8352
8353 </refsect1>
8354
8355 <refsect1>
8356         <title>WARNINGS</title>
8357         
8358         <para>Although the configuration file permits service names 
8359         to contain spaces, your client software may not. Spaces will 
8360         be ignored in comparisons anyway, so it shouldn't be a 
8361         problem - but be aware of the possibility.</para>
8362
8363         <para>On a similar note, many clients - especially DOS clients - 
8364         limit service names to eight characters. <ulink url="smbd.8.html">smbd(8)
8365         </ulink> has no such limitation, but attempts to connect from such 
8366         clients will fail if they truncate the service names.  For this reason 
8367         you should probably keep your service names down to eight characters 
8368         in length.</para>
8369
8370         <para>Use of the [homes] and [printers] special sections make life 
8371         for an administrator easy, but the various combinations of default 
8372         attributes can be tricky. Take extreme care when designing these 
8373         sections. In particular, ensure that the permissions on spool 
8374         directories are correct.</para>
8375 </refsect1>
8376
8377 <refsect1>
8378         <title>VERSION</title>
8379
8380         <para>This man page is correct for version 2.2 of 
8381         the Samba suite.</para>
8382 </refsect1>
8383
8384 <refsect1>
8385         <title>SEE ALSO</title>
8386         <para><ulink url="samba.7.html">samba(7)</ulink>,
8387         <ulink url="smbpasswd.8.html"><command>smbpasswd(8)</command></ulink>,
8388         <ulink url="swat.8.html"><command>swat(8)</command></ulink>,
8389         <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>, 
8390         <ulink url="nmbd.8.html"><command>nmbd(8)</command></ulink>, 
8391         <ulink url="smbclient.1.html"><command>smbclient(1)</command></ulink>, 
8392         <ulink url="nmblookup.1.html"><command>nmblookup(1)</command></ulink>,
8393         <ulink url="testparm.1.html"><command>testparm(1)</command></ulink>, 
8394         <ulink url="testprns.1.html"><command>testprns(1)</command></ulink>
8395         </para>
8396 </refsect1>
8397
8398 <refsect1>
8399         <title>AUTHOR</title>
8400         
8401         <para>The original Samba software and related utilities 
8402         were created by Andrew Tridgell. Samba is now developed
8403         by the Samba Team as an Open Source project similar 
8404         to the way the Linux kernel is developed.</para>
8405         
8406         <para>The original Samba man pages were written by Karl Auer. 
8407         The man page sources were converted to YODL format (another 
8408         excellent piece of Open Source software, available at
8409         <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
8410         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
8411         release by Jeremy Allison.  The conversion to DocBook for 
8412         Samba 2.2 was done by Gerald Carter</para>
8413 </refsect1>
8414
8415 </refentry>