Fix another bunch of samba-docs bugs. Use <literal> to escape slashes with text
[samba.git] / docs / manpages-3 / smb.conf.5.xml
1 <refentry id="smb.conf.5" xmlns:xi="http://www.w3.org/2003/XInclude"
2                          xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
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>
19         The <filename moreinfo="none">smb.conf</filename> file is a configuration  file for the Samba suite. <filename
20         moreinfo="none">smb.conf</filename> contains  runtime configuration information for the Samba programs. The
21          <filename moreinfo="none">smb.conf</filename> file is designed to be configured and administered by the
22          <citerefentry><refentrytitle>swat</refentrytitle> <manvolnum>8</manvolnum></citerefentry> program. The
23         complete description of the file format and possible parameters held within are here for reference purposes.
24         </para> 
25 </refsect1>
26
27 <refsect1 id="FILEFORMATSECT">
28         <title>FILE FORMAT</title>
29
30         <para>
31         The file consists of sections and parameters. A section begins with the name of the section in square brackets
32         and continues until the next section begins. Sections contain parameters of the form:
33 <programlisting>
34 <replaceable>name</replaceable> = <replaceable>value </replaceable>
35 </programlisting>
36         </para>
37
38         <para>
39         The file is line-based - that is, each newline-terminated line represents either a comment, a section name or
40         a parameter.
41         </para>
42
43         <para>Section and parameter names are not case sensitive.</para>
44
45         <para>
46         Only the first equals sign in a parameter is significant.  Whitespace before or after the first equals sign is
47         discarded.  Leading, trailing and internal whitespace in section and parameter names is irrelevant. Leading
48         and trailing whitespace in a parameter value is discarded. Internal whitespace within a parameter value is
49         retained verbatim.
50         </para>
51
52         <para>
53         Any line beginning with a semicolon (<quote>;</quote>) or a hash (<quote>#</quote>) 
54         character is ignored, as are lines containing only whitespace.
55         </para>
56
57         <para>
58         Any line ending in a <quote><literal>\</literal></quote> is continued on the next line in the customary UNIX fashion.
59         </para>
60
61         <para>
62         The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean,
63         which may be given as yes/no, 0/1 or true/false. Case is not significant in boolean values, but is preserved
64         in string values. Some items such as create masks are numeric.
65         </para>
66
67 </refsect1>
68
69 <refsect1>
70         <title>SECTION DESCRIPTIONS</title>
71
72         <para>
73         Each section in the configuration file (except for the [global] section) describes a shared resource (known as
74         a <quote>share</quote>). The section name is the name of the shared resource and the parameters within the
75         section define the shares attributes.
76         </para>
77
78         <para>
79         There are three special sections, [global], [homes] and [printers], which are described under
80          <emphasis>special sections</emphasis>. The following notes apply to ordinary section descriptions.
81         </para>
82
83         <para>
84         A share consists of a directory to which access is being given plus a description of the access rights
85         which are granted to the user of the service. Some housekeeping options are also specifiable.
86         </para>
87         
88         <para>
89         Sections are either file share services (used by the client as an extension of their native file systems)
90         or printable services (used by the client to access print services on the host running the server).
91         </para>
92         
93         <para>
94         Sections may be designated <emphasis>guest</emphasis> services, in which case no password is required to
95         access them. A specified UNIX <emphasis>guest account</emphasis> is used to define access privileges in this
96         case.
97         </para>
98
99         <para>
100         Sections other than guest services will require a password to access them. The client provides the
101         username. As older clients only provide passwords and not usernames, you may specify a list of usernames to
102         check against the password using the <literal>user =</literal> option in the share definition. For modern clients
103         such as Windows 95/98/ME/NT/2000, this should not be necessary.
104         </para> 
105
106         <para>
107         The access rights granted by the server are masked by the access rights granted to the specified or guest
108         UNIX user by the host system. The server does not grant more access than the host system grants.
109         </para>
110         
111         <para>
112         The following sample section defines a file space share.  The user has write access to the path <filename
113         moreinfo="none">/home/bar</filename>.  The share is accessed via the share name <literal>foo</literal>:
114 <programlisting>
115         <smbconfsection name="[foo]"/>
116         <smbconfoption name="path">/home/bar</smbconfoption>
117         <smbconfoption name="read only">no</smbconfoption>
118 </programlisting>
119         </para>
120
121         <para>
122         The following sample section defines a printable share.  The share is read-only, but printable. That is,
123         the only write access permitted is via calls to open, write to and close a spool file. The <emphasis>guest
124         ok</emphasis> parameter means access will be permitted as the default guest user (specified elsewhere):
125 <programlisting>
126         <smbconfsection name="[aprinter]"/>
127         <smbconfoption name="path">/usr/spool/public</smbconfoption>
128         <smbconfoption name="read only">yes</smbconfoption>
129         <smbconfoption name="printable">yes</smbconfoption>
130         <smbconfoption name="guest ok">yes</smbconfoption>
131 </programlisting>
132         </para>
133
134 </refsect1>
135
136 <refsect1>
137         <title>SPECIAL SECTIONS</title>
138         
139         <refsect2>
140                 <title>The [global] section</title>
141                 
142                 <para>
143                 Parameters in this section apply to the server as a whole, or are defaults for sections that do not
144                 specifically define certain items. See the notes under PARAMETERS for more information.
145                 </para>
146         </refsect2>
147         
148         <refsect2 id="HOMESECT">
149                 <title>The [homes] section</title>
150                 
151                 <para>
152                 If a section called [homes] is included in the configuration file, services connecting clients
153                 to their home directories can be created on the fly by the server.
154                 </para>
155
156                 <para>
157                 When the connection request is made, the existing sections are scanned. If a match is found, it is
158                 used. If no match is found, the requested section name is treated as a username and looked up in the local
159                 password file. If the name exists and the correct password has been given, a share is created by cloning the
160                 [homes] section.
161                 </para>
162                 
163                 <para>
164                 Some modifications are then made to the newly created share:
165                 </para>
166                 
167                 <itemizedlist>
168                         <listitem><para>
169                         The share name is changed from homes to the located username.
170                         </para></listitem>
171
172                         <listitem><para>
173                         If no path was given, the path is set to the user's home directory.
174                         </para></listitem>
175                 </itemizedlist>
176
177                 <para>
178                 If you decide to use a <emphasis>path =</emphasis> line in your [homes] section, it may be useful 
179                 to use the %S macro. For example:
180 <programlisting>
181 <userinput moreinfo="none">path = /data/pchome/%S</userinput>
182 </programlisting>
183                 is useful if you have different home directories for your PCs than for UNIX access.
184                 </para>
185
186                 <para>
187                 This is a fast and simple way to give a large number of clients access to their home directories with a minimum 
188                 of fuss.
189                 </para>
190
191                 <para>
192                 A similar process occurs if the requested section name is <quote>homes</quote>, except that the share
193                 name is not changed to that of the requesting user. This method of using the [homes] section works well if
194                 different users share a client PC.
195                 </para>
196                 
197                 <para>
198                 The [homes] section can specify all the parameters a normal service section can specify, though some make more sense 
199                 than others. The following is a typical and suitable [homes] section:
200 <programlisting>
201 <smbconfsection name="[homes]"/>
202 <smbconfoption name="read only">no</smbconfoption>
203 </programlisting>
204                 </para>
205         
206                 <para>
207                 An important point is that if guest access is specified in the [homes] section, all home directories will be 
208                 visible to all clients <emphasis>without a password</emphasis>.  In the very unlikely event that this is actually
209                 desirable, it is wise to also specify <emphasis>read only access</emphasis>.
210                 </para>
211
212                 <para>
213                 The <emphasis>browseable</emphasis> flag for auto home directories will be inherited from the global browseable 
214                 flag, not the [homes] browseable flag. This is useful as it means setting <emphasis>browseable = no</emphasis> in
215                 the [homes] section will hide the [homes] share but make any auto home directories visible.
216                 </para>
217         </refsect2>
218
219         <refsect2 id="PRINTERSSECT">
220                 <title>The [printers] section</title>
221                 
222                 <para>
223                 This section works like [homes], but for printers.
224                 </para>
225
226                 <para>
227                 If a [printers] section occurs in the configuration file, users are able to connect to any printer 
228                 specified in the local host's printcap file.
229                 </para>
230
231                 <para>
232                 When a connection request is made, the existing sections are scanned. If a match is found, it is used.
233                 If no match is found, but a [homes] section exists, it is used as described above. Otherwise, the requested
234                 section name is treated as a printer name and the appropriate printcap file is scanned to see if the requested
235                 section name is a valid printer share name. If a match is found, a new printer share is created by cloning the
236                 [printers] section.
237                 </para>
238
239                 <para>
240                 A few modifications are then made to the newly created share:
241                 </para>
242
243                 <itemizedlist>
244                         <listitem><para>The share name is set to the located printer name</para></listitem>
245
246                         <listitem><para>If no printer name was given, the printer name is set to the located printer name</para></listitem>
247
248                         <listitem><para>If the share does not permit guest access and no username was given, the username is set
249                                 to the located printer name.</para></listitem>
250                 </itemizedlist>
251
252                 <para>
253                 The [printers] service MUST be printable - if you specify otherwise, the server will refuse 
254                 to load the configuration file.
255                 </para>
256                 
257                 <para>
258                 Typically the path specified is that of a world-writeable spool directory with the sticky bit set on 
259                 it. A typical [printers] entry looks like this:
260 <programlisting>
261 <smbconfsection name="[printers]"/>
262 <smbconfoption name="path">/usr/spool/public</smbconfoption>
263 <smbconfoption name="guest ok">yes</smbconfoption>
264 <smbconfoption name="printable">yes</smbconfoption>
265 </programlisting>
266                 </para>
267
268                 <para>
269                 All aliases given for a printer in the printcap file are legitimate printer names as far as the server is concerned. 
270                 If your printing subsystem doesn't work like that, you will have to set up a pseudo-printcap. This is a file
271                 consisting of one or more lines like this:
272 <programlisting>
273 alias|alias|alias|alias...    
274 </programlisting>
275                 </para>
276
277                 <para>
278                 Each alias should be an acceptable printer name for your printing subsystem. In the [global] section,
279                 specify the new file as your printcap.  The server will only recognize names found in your pseudo-printcap,
280                 which of course can contain whatever aliases you like. The same technique could be used simply to limit access
281                 to a subset of your local printers.
282                 </para>
283
284                 <para>
285                 An alias, by the way, is defined as any component of the first entry of a printcap record. Records are separated by newlines,
286                 components (if there are more than one) are separated by vertical bar symbols (<literal>|</literal>).
287                 </para>
288                 
289                 <note><para>
290                 On SYSV systems which use lpstat to determine what printers are defined on the system you may be able to use
291                 <literal>printcap name = lpstat</literal> to automatically obtain a list of printers. See the
292                 <literal>printcap name</literal> option for more details.
293                 </para></note>
294         </refsect2>
295 </refsect1>
296
297 <refsect1>
298         <title>USERSHARES</title>
299
300         <para>Starting with Samba version 3.0.23 the capability for non-root users to add, modify, and delete
301         their own share definitions has been added. This capability is called <emphasis>usershares</emphasis> and
302         is controlled by a set of parameters in the [global] section of the smb.conf.
303         The relevant parameters are :
304         </para>
305
306         <variablelist>
307                 <varlistentry>
308                 <term>usershare allow guests</term>
309                 <listitem><para>Controls if usershares can permit guest access.</para></listitem>
310                 </varlistentry>
311
312                 <varlistentry>
313                 <term>usershare max shares</term>
314                 <listitem><para>Maximum number of user defined shares allowed.</para></listitem>
315                 </varlistentry>
316
317                 <varlistentry>
318                 <term>usershare owner only</term>
319                 <listitem><para>If set only directories owned by the sharing user can be shared.</para></listitem>
320                 </varlistentry>
321
322                 <varlistentry>
323                 <term>usershare path</term>
324                 <listitem><para>Points to the directory containing the user defined share definitions.
325                 The filesystem permissions on this directory control who can create user defined shares.</para></listitem>
326                 </varlistentry>
327
328                 <varlistentry>
329                 <term>usershare prefix allow list</term>
330                 <listitem><para>Comma-separated list of absolute pathnames restricting what directories
331                 can be shared. Only directories below the pathnames in this list are permitted.</para></listitem>
332                 </varlistentry>
333
334                 <varlistentry>
335                 <term>usershare prefix deny list</term>
336                 <listitem><para>Comma-separated list of absolute pathnames restricting what directories
337                 can be shared. Directories below the pathnames in this list are prohibited.</para></listitem>
338                 </varlistentry>
339
340                 <varlistentry>
341                 <term>usershare template share</term>
342                 <listitem><para>Names a pre-existing share used as a template for creating new usershares.
343                 All other share parameters not specified in the user defined share definition
344                 are copied from this named share.</para></listitem>
345                 </varlistentry>
346         </variablelist>
347
348         <para>To allow members of the UNIX group <literal>foo</literal> to create user defined
349         shares, create the directory to contain the share definitions as follows:
350         </para>
351         <para>Become root:</para>
352 <programlisting>
353 mkdir /usr/local/samba/lib/usershares
354 chgrp foo /usr/local/samba/lib/usershares
355 chmod 1770 /usr/local/samba/lib/usershares
356 </programlisting>
357 <para>Then add the parameters 
358
359 <programlisting>
360         <smbconfoption name="usershare path">/usr/local/samba/lib/usershares</smbconfoption>
361         <smbconfoption name="usershare max shares">10</smbconfoption> # (or the desired number of shares)
362 </programlisting> 
363
364         to the global
365         section of your <filename>smb.conf</filename>. Members of the group foo may then manipulate the user defined shares
366         using the following commands.</para>
367
368         <variablelist>
369                 <varlistentry>
370                 <term>net usershare add sharename path [comment] [acl] [guest_ok=[y|n]]</term>
371                 <listitem><para>To create or modify (overwrite) a user defined share.</para></listitem>
372                 </varlistentry>
373
374                 <varlistentry>
375                 <term>net usershare delete sharename</term>
376                 <listitem><para>To delete a user defined share.</para></listitem>
377                 </varlistentry>
378
379                 <varlistentry>
380                 <term>net usershare list wildcard-sharename</term>
381                 <listitem><para>To list user defined shares.</para></listitem>
382                 </varlistentry>
383
384                 <varlistentry>
385                 <term>net usershare info wildcard-sharename</term>
386                 <listitem><para>To print information about user defined shares.</para></listitem>
387                 </varlistentry>
388         </variablelist>
389 </refsect1>
390         
391 <refsect1>
392         <title>PARAMETERS</title>
393
394         <para>Parameters define the specific attributes of sections.</para>
395
396         <para>
397         Some parameters are specific to the [global] section (e.g., <emphasis>security</emphasis>).  Some parameters
398         are usable in all sections (e.g., <emphasis>create mask</emphasis>). All others are permissible only in normal
399         sections. For the purposes of the following descriptions the [homes] and [printers] sections will be
400         considered normal.  The letter <emphasis>G</emphasis> in parentheses indicates that a parameter is specific to
401         the [global] section. The letter <emphasis>S</emphasis> indicates that a parameter can be specified in a
402         service specific section. All <emphasis>S</emphasis> parameters can also be specified in the [global] section
403         - in which case they will define the default behavior for all services.
404         </para>
405
406         <para>
407         Parameters are arranged here in alphabetical order - this may not create best bedfellows, but at least you can
408         find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred
409         synonym.
410         </para>
411 </refsect1>
412
413 <refsect1>
414         <title>VARIABLE SUBSTITUTIONS</title>
415
416         <para>
417         Many of the strings that are settable in the config file can take substitutions. For example the option
418         <quote>path = /tmp/%u</quote> is interpreted as <quote>path = /tmp/john</quote> if the user connected with the
419         username john.
420         </para>
421
422         <para>
423         These substitutions are mostly noted in the descriptions below, but there are some general substitutions
424         which apply whenever they might be relevant. These are:
425         </para>
426
427         <variablelist>
428                 <varlistentry>
429                 <term>%U</term>
430                 <listitem><para>session username (the username that the client wanted, not
431                         necessarily the same as the one they got).</para></listitem>
432                 </varlistentry>
433                 
434                 <varlistentry>
435                 <term>%G</term>
436                 <listitem><para>primary group name of %U.</para></listitem>
437                 </varlistentry>
438
439                 <varlistentry>
440                 <term>%h</term>
441                 <listitem><para>the Internet hostname that Samba is running on.</para></listitem>
442                 </varlistentry>
443
444                 <varlistentry>
445                 <term>%m</term>
446                 <listitem><para>the NetBIOS name of the client machine (very useful).</para>
447
448                         <para>This parameter is not available when Samba listens on port 445, as clients no longer
449                         send this information. If you use this macro in an include statement on a domain that has
450                         a Samba domain controller be sure to set in the [global] section <parameter>smb ports =
451                         139</parameter>. This will cause Samba to not listen on port 445 and will permit include
452                         functionality to function as it did with Samba 2.x.
453                         </para></listitem>
454
455                 </varlistentry>
456                 
457                 <varlistentry>
458                 <term>%L</term>
459                 <listitem><para>the NetBIOS name of the server. This allows you to change your config based on what
460                         the client calls you. Your server can have a <quote>dual personality</quote>.
461                 </para></listitem>
462                 </varlistentry>
463                 
464                 <varlistentry>
465                 <term>%M</term>
466                 <listitem><para>the Internet name of the client machine.
467                 </para></listitem>
468                 </varlistentry>
469                 
470                 <varlistentry>
471                 <term>%R</term>
472                 <listitem><para>the selected protocol level after protocol negotiation. It can be one of CORE, COREPLUS, 
473                         LANMAN1, LANMAN2 or NT1.</para></listitem>
474                 </varlistentry>
475
476                 <varlistentry>
477                 <term>%d</term>
478                 <listitem><para>the process id of the current server
479                         process.</para></listitem>
480                 </varlistentry>
481                 
482                 <varlistentry>
483                 <term>%a</term>
484                 <listitem><para>the architecture of the remote
485                         machine.  It currently recognizes Samba (<constant>Samba</constant>), 
486                         the Linux CIFS file system (<constant>CIFSFS</constant>), OS/2, (<constant>OS2</constant>),
487                         Windows for Workgroups (<constant>WfWg</constant>), Windows 9x/ME 
488                         (<constant>Win95</constant>), Windows NT (<constant>WinNT</constant>),
489                         Windows 2000 (<constant>Win2K</constant>), Windows XP (<constant>WinXP</constant>),
490                         and Windows 2003 (<constant>Win2K3</constant>).  Anything else will be known as 
491                         <constant>UNKNOWN</constant>.</para> 
492                 </listitem>
493                 </varlistentry>
494                 
495                 <varlistentry>
496                 <term>%I</term>
497                 <listitem><para>the IP address of the client machine.</para>
498                 </listitem>
499                 </varlistentry>
500
501                 <varlistentry>
502                 <term>%i</term>
503                 <listitem><para>the local IP address to which a client connected.</para>
504                 </listitem>
505                 </varlistentry>
506
507                 <varlistentry>
508                 <term>%T</term>
509                 <listitem><para>the current date and time.</para></listitem>
510                 </varlistentry>
511
512                 <varlistentry>
513                 <term>%D</term>
514                 <listitem><para>name of the domain or workgroup of the current user.</para></listitem>
515                 </varlistentry>
516                 
517                 <varlistentry>
518                 <term>%w</term>
519                 <listitem><para>the winbind separator.</para></listitem>
520                 </varlistentry>
521                 
522                 <varlistentry>
523                 <term>%$(<replaceable>envvar</replaceable>)</term>
524                 <listitem><para>the value of the environment variable
525                 <replaceable>envar</replaceable>.</para></listitem>
526                 </varlistentry>
527         </variablelist>
528
529         <para>
530         The following substitutes apply only to some configuration options (only those that are
531         used when a connection has been established):
532         </para>
533
534         <variablelist>
535                 <varlistentry>
536                 <term>%S</term>
537                 <listitem><para>the name of the current service, if any.</para>
538                 </listitem>
539                 </varlistentry>
540         
541                 <varlistentry>
542                 <term>%P</term>
543                 <listitem><para>the root directory of the current service, if any.</para></listitem>
544                 </varlistentry>
545         
546                 <varlistentry>
547                 <term>%u</term>
548                 <listitem><para>username of the current service, if any.</para>
549                 </listitem>
550                 </varlistentry>
551         
552                 <varlistentry>
553                 <term>%g</term>
554                 <listitem><para>primary group name of %u.</para></listitem>
555                 </varlistentry>
556         
557                 <varlistentry>
558                 <term>%H</term>
559                 <listitem><para>the home directory of the user given by %u.</para></listitem>
560                 </varlistentry>
561
562                 <varlistentry>
563                 <term>%N</term>
564                 <listitem><para>
565                         the name of your NIS home directory server.  This is obtained from your NIS auto.map entry. 
566                         If you have not compiled Samba with the <emphasis>--with-automount</emphasis> option, this
567                         value will be the same as %L.</para></listitem>
568                 </varlistentry>
569         
570                 <varlistentry>
571                 <term>%p</term>
572                 <listitem><para>
573                         the path of the service's home directory, obtained from your NIS auto.map entry. The NIS
574                         auto.map entry is split up as <literal>%N:%p</literal>.</para></listitem>
575                 </varlistentry>
576         </variablelist>
577         
578         <para>
579         There are some quite creative things that can be done with these substitutions and other
580         <filename moreinfo="none">smb.conf</filename> options.
581         </para>
582 </refsect1>
583
584 <refsect1 id="NAMEMANGLINGSECT">
585         <title>NAME MANGLING</title>
586         
587         <para>
588         Samba supports <literal>name mangling</literal> so that DOS and Windows clients can use files that don't
589         conform to the 8.3 format. It can also be set to adjust the case of 8.3 format filenames.
590         </para>
591
592         <para>
593         There are several options that control the way mangling is performed, and they are grouped here rather
594         than listed separately. For the defaults look at the output of the testparm program.
595         </para>
596
597         <para>
598         These options can be set separately for each service.
599         </para>
600
601         <para>
602         The options are:
603         </para>
604         
605         <variablelist>
606         
607         <varlistentry>
608                 <term>case sensitive = yes/no/auto</term>
609                 <listitem><para>
610                 controls whether filenames are case sensitive. If they aren't, Samba must do a filename search and match on
611                 passed names. The default setting of auto allows clients that support case sensitive filenames (Linux CIFSVFS
612                 and smbclient 3.0.5 and above currently) to tell the Samba server on a per-packet basis that they wish to
613                 access the file system in a case-sensitive manner (to support UNIX case sensitive semantics). No Windows or
614                 DOS system supports case-sensitive filename so setting this option to auto is that same as setting it to no
615                 for them. Default <emphasis>auto</emphasis>.
616                 </para></listitem>
617                 </varlistentry> 
618
619                 <varlistentry>
620                 <term>default case = upper/lower</term>
621                 <listitem><para>
622                 controls what the default case is for new filenames (ie. files that don't currently exist in the filesystem).
623                 Default <emphasis>lower</emphasis>.  IMPORTANT NOTE: This option will be used to modify the case of
624                 <emphasis>all</emphasis> incoming client filenames, not just new filenames if the options <smbconfoption
625                 name="case sensitive">yes</smbconfoption>, <smbconfoption name="preserve case">No</smbconfoption>,
626                 <smbconfoption name="short preserve case">No</smbconfoption> are set.  This change is needed as part of the
627                 optimisations for directories containing large numbers of files.
628                 </para></listitem>
629                 </varlistentry> 
630         
631                 <varlistentry>
632                 <term>preserve case = yes/no</term>
633                 <listitem><para>
634                 controls whether new files (ie. files that don't currently exist in the filesystem) are created with the case
635                 that the client passes, or if they are forced to be the <literal>default</literal> case. Default
636                 <emphasis>yes</emphasis>.
637                 </para></listitem>
638                 </varlistentry> 
639
640                 <varlistentry>
641                 <term>short preserve case = yes/no</term>
642                 <listitem><para>
643                 controls if new files (ie. files that don't currently exist in the filesystem) which conform to 8.3 syntax,
644                 that is all in upper case and of suitable length, are created upper case, or if they are forced to be the
645                 <literal>default</literal> case. This option can be used with <literal>preserve case = yes</literal> to permit
646                 long filenames to retain their case, while short names are lowercased. Default <emphasis>yes</emphasis>.
647                 </para></listitem>
648                 </varlistentry> 
649         </variablelist>
650         
651         <para>
652         By default, Samba 3.0 has the same semantics as a Windows NT server, in that it is case insensitive
653         but case preserving. As a special case for directories with large numbers of files, if the case
654         options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no"
655         then the "default case" option will be applied and will modify all filenames sent from the client
656         when accessing this share.
657         </para>
658         
659 </refsect1>
660
661 <refsect1 id="VALIDATIONSECT">
662         <title>NOTE ABOUT USERNAME/PASSWORD VALIDATION</title>
663
664         <para>
665         There are a number of ways in which a user can connect to a service. The server uses the following steps
666         in determining if it will allow a connection to a specified service. If all the steps fail, the connection
667         request is rejected.  However, if one of the steps succeeds, the following steps are not checked.
668         </para>
669
670         <para>
671         If the service is marked <quote>guest only = yes</quote> and the server is running with share-level
672         security (<quote>security = share</quote>, steps 1 to 5 are skipped.
673         </para>
674
675
676         <orderedlist continuation="restarts" inheritnum="ignore" numeration="arabic">
677                 <listitem><para>
678                 If the client has passed a username/password pair and that username/password pair is validated by the UNIX 
679                 system's password programs, the connection is made as that username. This includes the
680                 <literal>\\server\service</literal>%<replaceable>username</replaceable> method of passing a username.
681                 </para></listitem>
682
683                 <listitem><para>
684                 If the client has previously registered a username with the system and now supplies a correct password for that 
685                 username, the connection is allowed.
686                 </para></listitem>
687                 
688                 <listitem><para>
689                 The client's NetBIOS name and any previously used usernames are checked against the supplied password. If 
690                 they match, the connection is allowed as the corresponding user.
691                 </para></listitem>
692                 
693                 <listitem><para>
694                 If the client has previously validated a username/password pair with the server and the client has passed 
695                 the validation token, that username is used.
696                 </para></listitem>
697
698                 <listitem><para>
699                 If a <literal>user = </literal> field is given in the <filename moreinfo="none">smb.conf</filename> file for the
700                 service and the client has supplied a password, and that password matches (according to the UNIX system's
701                 password checking) with one of the usernames from the <literal>user =</literal> field, the connection is made as
702                 the username in the <literal>user =</literal> line. If one of the usernames in the <literal>user =</literal> list
703                 begins with a <literal>@</literal>, that name expands to a list of names in the group of the same name.
704                 </para></listitem>
705
706                 <listitem><para>
707                 If the service is a guest service, a connection is made as the username given in the <literal>guest account
708                 =</literal> for the service, irrespective of the supplied password.
709                 </para></listitem>
710         </orderedlist>
711
712 </refsect1>
713
714 <refsect1>
715         <title>EXPLANATION OF EACH PARAMETER</title>
716         
717         <samba:parameterlist>
718                 <xi:include href="../smbdotconf/parameters.all.xml" parse="xml"/>
719         </samba:parameterlist>
720
721 </refsect1>
722
723 <refsect1>
724         <title>WARNINGS</title>
725         
726         <para>
727         Although the configuration file permits service names to contain spaces, your client software may not.
728         Spaces will be ignored in comparisons anyway, so it shouldn't be a problem - but be aware of the possibility.
729         </para>
730
731         <para>
732         On a similar note, many clients - especially DOS clients - limit service names to eight characters.
733         <citerefentry><refentrytitle>smbd</refentrytitle> <manvolnum>8</manvolnum></citerefentry> has no such
734         limitation, but attempts to connect from such clients will fail if they truncate the service names.  For this
735         reason you should probably keep your service names down to eight characters in length.
736         </para>
737
738         <para>
739         Use of the <literal>[homes]</literal> and <literal>[printers]</literal> special sections make life 
740         for an administrator easy, but the various combinations of default attributes can be tricky. Take extreme
741         care when designing these sections. In particular, ensure that the permissions on spool directories are
742         correct.
743         </para>
744
745 </refsect1>
746
747 <refsect1>
748         <title>VERSION</title>
749
750         <para>This man page is correct for version 3.0 of the Samba suite.</para>
751 </refsect1>
752
753 <refsect1>
754         <title>SEE ALSO</title>
755         <para>
756         <citerefentry><refentrytitle>samba</refentrytitle>
757         <manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbpasswd</refentrytitle>
758         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>swat</refentrytitle>
759         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbd</refentrytitle>
760         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>nmbd</refentrytitle>
761         <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbclient</refentrytitle>
762         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>nmblookup</refentrytitle>
763         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testparm</refentrytitle>
764         <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testprns</refentrytitle>
765         <manvolnum>1</manvolnum></citerefentry>.</para>
766 </refsect1>
767
768 <refsect1>
769         <title>AUTHOR</title>
770         
771         <para>
772         The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed
773         by the Samba Team as an Open Source project similar to the way the Linux kernel is developed.
774         </para>
775         
776         <para>
777         The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another 
778         excellent piece of Open Source software, available at <ulink noescape="1" url="ftp://ftp.icce.rug.nl/pub/unix/">
779         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 release by Jeremy Allison.  The conversion
780         to DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done by
781         Alexander Bokovoy.
782         </para>
783 </refsect1>
784
785 </refentry>