Added documentation for directory mode/directory mask parameter.
[ira/wip.git] / docs / manpages / smb.conf.5
1 .TH SMB.CONF 5 smb.conf smb.conf
2 .SH NAME
3 smb.conf \- configuration file for smbd
4 .SH SYNOPSIS
5 .B smb.conf
6 .SH DESCRIPTION
7 The
8 .B smb.conf
9 file is a configuration file for the Samba suite.
10
11 .B smb.conf
12 contains runtime configuration information for the
13 .B smbd
14 program. The
15 .B smbd
16 program provides LanManager-like services to clients
17 using the SMB protocol.
18 .SH FILE FORMAT
19 The file consists of sections and parameters. A section begins with the 
20 name of the section in square brackets and continues until the next
21 section begins. Sections contain parameters of the form 'name = value'.
22
23 The file is line-based - that is, each newline-terminated line represents
24 either a comment, a section name or a parameter.
25
26 Section and parameter names are not case sensitive.
27
28 Only the first equals sign in a parameter is significant. Whitespace before 
29 or after the first equals sign is discarded. Leading, trailing and internal
30 whitespace in section and parameter names is irrelevant. Leading and
31 trailing whitespace in a parameter value is discarded. Internal whitespace
32 within a parameter value is retained verbatim.
33
34 Any line beginning with a semicolon is ignored, as are lines containing 
35 only whitespace.
36
37 Any line ending in a \e is "continued" on the next line in the
38 customary UNIX fashion.
39
40 The values following the equals sign in parameters are all either a string
41 (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or
42 true/false. Case is not significant in boolean values, but is preserved
43 in string values. Some items such as create modes are numeric.
44 .SH SERVICE DESCRIPTIONS
45 Each section in the configuration file describes a service. The section name
46 is the service name and the parameters within the section define the service's
47 attributes.
48
49 There are three special sections, [global], [homes] and [printers], which are
50 described under 'special sections'. The following notes apply to ordinary 
51 service descriptions.
52
53 A service consists of a directory to which access is being given plus a 
54 description of the access rights which are granted to the user of the 
55 service. Some housekeeping options are also specifiable.
56
57 Services are either filespace services (used by the client as an extension of
58 their native file systems) or printable services (used by the client to access
59 print services on the host running the server).
60
61 Services may be guest services, in which case no password is required to
62 access them. A specified guest account is used to define access privileges
63 in this case.
64
65 Services other than guest services will require a password to access
66 them. The client provides the username. As many clients only provide
67 passwords and not usernames, you may specify a list of usernames to
68 check against the password using the "user=" option in the service
69 definition. 
70
71 Note that the access rights granted by the server are masked by the access
72 rights granted to the specified or guest user by the host system. The 
73 server does not grant more access than the host system grants.
74
75 The following sample section defines a file space service. The user has write
76 access to the path /home/bar. The service is accessed via the service name 
77 "foo":
78
79         [foo]
80                 path = /home/bar
81                 writable = true
82
83 The following sample section defines a printable service. The service is 
84 readonly, but printable. That is, the only write access permitted is via 
85 calls to open, write to and close a spool file. The 'guest ok' parameter 
86 means access will be permitted as the default guest user (specified elsewhere):
87
88         [aprinter]
89                 path = /usr/spool/public
90                 read only = true
91                 printable = true
92                 public = true
93 .SH SPECIAL SECTIONS
94
95 .SS The [global] section
96 .RS 3
97 Parameters in this section apply to the server as a whole, or are defaults
98 for services which do not specifically define certain items. See the notes
99 under 'Parameters' for more information.
100 .RE
101
102 .SS The [homes] section
103 .RS 3
104 If a section called 'homes' is included in the configuration file, services
105 connecting clients to their home directories can be created on the fly by the
106 server.
107
108 When the connection request is made, the existing services are scanned. If a
109 match is found, it is used. If no match is found, the requested service name is
110 treated as a user name and looked up in the local passwords file. If the
111 name exists and the correct password has been given, a service is created
112 by cloning the [homes] section.
113
114 Some modifications are then made to the newly created section:
115
116 .RS 3
117 The service name is changed from 'homes' to the located username
118
119 If no path was given, the path is set to the user's home directory.
120 .RE
121
122 If you decide to use a path= line in your [homes] section then you may
123 find it useful to use the %S macro. For example path=/data/pchome/%S
124 would be useful if you have different home directories for your PCs
125 than for UNIX access.
126
127 This is a fast and simple way to give a large number of clients access to
128 their home directories with a minimum of fuss.
129
130 A similar process occurs if the requested service name is "homes", except that
131 the service name is not changed to that of the requesting user. This method
132 of using the [homes] section works well if different users share a client PC.
133
134 The [homes] section can specify all the parameters a normal service section
135 can specify, though some make more sense than others. The following is a 
136 typical and suitable [homes] section:
137
138         [homes]
139                 writable = yes
140
141 An important point:
142
143 .RS 3
144 If guest access is specified in the [homes] section, all home directories will
145 be accessible to all clients
146 .B without a password.
147 In the very unlikely event
148 that this is actually desirable, it would be wise to also specify read only
149 access.
150 .RE
151 .RE
152
153 Note that the browseable flag for auto home directories will be
154 inherited from the global browseable flag, not the [homes] browseable
155 flag. This is useful as it means setting browseable=no in the [homes]
156 section will hide the [homes] service but make any auto home
157 directories visible.
158
159 .SS The [printers] section
160 .RS 3
161 This section works like [homes], but for printers.
162
163 If a [printers] section occurs in the configuration file, users are able 
164 to connect to any printer specified in the local host's printcap file.
165
166 When a connection request is made, the existing services are scanned. If a
167 match is found, it is used. If no match is found, but a [homes] section
168 exists, it is used as described above. Otherwise, the requested service name is
169 treated as a printer name and the appropriate printcap file is scanned to
170 see if the requested service name is a valid printer name. If a match is
171 found, a new service is created by cloning the [printers] section.
172
173 A few modifications are then made to the newly created section:
174
175 .RS 3
176 The service name is set to the located printer name
177
178 If no printer name was given, the printer name is set to the located printer
179 name
180
181 If the service does not permit guest access and no username was given, the 
182 username is set to the located printer name.
183 .RE
184
185 Note that the [printers] service MUST be printable - if you specify otherwise,
186 the server will refuse to load the configuration file.
187
188 Typically the path specified would be that of a world-writable spool directory
189 with the sticky bit set on it. A typical [printers] entry would look like this:
190
191         [printers]
192                 path = /usr/spool/public
193                 writable = no
194                 public = yes
195                 printable = yes 
196
197 All aliases given for a printer in the printcap file are legitimate printer
198 names as far as the server is concerned. If your printing subsystem doesn't
199 work like that, you will have to set up a pseudo-printcap. This is a file
200 consisting of one or more lines like this:
201
202         alias|alias|alias|alias...
203
204 Each alias should be an acceptable printer name for your printing 
205 subsystem. In the [global] section, specify the new file as your printcap.
206 The server will then only recognise names found in your pseudo-printcap,
207 which of course can contain whatever aliases you like. The same technique
208 could be used simply to limit access to a subset of your local printers.
209
210 An alias, by the way, is defined as any component of the first entry of a 
211 printcap record. Records are separated by newlines, components (if there are 
212 more than one) are separated by vertical bar symbols ("|").
213 .RE
214 .SH PARAMETERS
215 Parameters define the specific attributes of services.
216
217 Some parameters are specific to the [global] section (eg., security).
218 Some parameters are usable in all sections (eg., create mode). All others are
219 permissible only in normal sections. For the purposes of the following
220 descriptions the [homes] and [printers] sections will be considered normal.
221 The letter 'G' in parentheses indicates that a parameter is specific to the
222 [global] section. The letter 'S' indicates that a parameter can be
223 specified in a service specific section. Note that all S parameters
224 can also be specified in the [global] section - in which case they
225 will define the default behaviour for all services.
226
227 Parameters are arranged here in alphabetical order - this may not create
228 best bedfellows, but at least you can find them! Where there are synonyms,
229 the preferred synonym is described, others refer to the preferred synonym.
230
231 .SS VARIABLE SUBSTITUTIONS
232
233 Many of the strings that are settable in the config file can take
234 substitutions. For example the option "path = /tmp/%u" would be
235 interpreted as "path = /tmp/john" if the user connected with the
236 username john.
237
238 These substitutions are mostly noted in the descriptions below, but
239 there are some general substitutions which apply whenever they might be
240 relevant. These are:
241
242 %S = the name of the current service, if any
243
244 %P = the root directory of the current service, if any
245
246 %u = user name of the current service, if any
247
248 %g = primary group name of %u
249
250 %U = session user name (the user name that the client wanted, not
251 necessarily the same as the one they got)
252
253 %G = primary group name of %U
254
255 %H = the home directory of the user given by %u
256
257 %v = the Samba version
258
259 %h = the hostname that Samba is running on
260
261 %m = the netbios name of the client machine (very useful)
262
263 %L = the netbios name of the server. This allows you to change your
264 config based on what the client calls you. Your server can have a "dual
265 personality".
266
267 %M = the internet name of the client machine
268
269 %d = The process id of the current server process
270
271 %a = the architecture of the remote machine. Only some are recognised,
272 and those may not be 100% reliable. It currently recognises Samba,
273 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
274 gets it wrong then sending me a level 3 log should allow me to fix it.
275
276 %I = The IP address of the client machine
277
278 %T = the current date and time
279
280 There are some quite creative things that can be done with these
281 substitutions and other smb.conf options.
282
283 .SS NAME MANGLING
284
285 Samba supports "name mangling" so that DOS and Windows clients can use
286 files that don't conform to the 8.3 format. It can also be set to adjust
287 the case of 8.3 format filenames.
288
289 There are several options that control the way mangling is performed,
290 and they are grouped here rather than listed separately. For the
291 defaults look at the output of the testparm program.
292
293 All of these options can be set separately for each service (or
294 globally, of course).
295
296 The options are:
297
298 "mangle case = yes/no" controls if names that have characters that
299 aren't of the "default" case are mangled. For example, if this is yes
300 then a name like "Mail" would be mangled. Default no.
301
302 "case sensitive = yes/no" controls whether filenames are case
303 sensitive. If they aren't then Samba must do a filename search and
304 match on passed names. Default no.
305
306 "default case = upper/lower" controls what the default case is for new
307 filenames. Default lower.
308
309 "preserve case = yes/no" controls if new files are created with the
310 case that the client passes, or if they are forced to be the "default"
311 case. Default no.
312
313 "short preserve case = yes/no" controls if new files which conform to 8.3
314 syntax, that is all in upper case and of suitable length, are created
315 upper case, or if they are forced to be the "default" case. This option can
316 be use with "preserve case = yes" to permit long filenames to retain their
317 case, while short names are lowered. Default no.
318
319 .SS COMPLETE LIST OF GLOBAL PARAMETERS
320
321 Here is a list of all global parameters. See the section of each
322 parameter for details.  Note that some are synonyms.
323
324 auto services
325
326 config file
327
328 deadtime
329
330 debuglevel
331
332 default
333
334 default service
335
336 dfree command
337
338 domain master
339
340 encrypt passwords
341
342 getwd cache
343
344 hosts equiv
345
346 include
347
348 keepalive
349
350 lock dir
351
352 load printers
353
354 lock directory
355
356 log file
357
358 log level
359
360 lpq cache time
361
362 mangled stack
363
364 max log size
365
366 max packet
367
368 max xmit
369
370 message command
371
372 null passwords
373
374 os level
375
376 packet size
377
378 passwd chat
379
380 passwd program
381
382 password level
383
384 password server
385
386 preferred master
387
388 preload
389
390 printing
391
392 printcap name
393
394 protocol
395
396 read bmpx
397
398 read prediction
399
400 read raw
401
402 read size
403
404 remote announce
405
406 root
407
408 root dir
409
410 root directory
411
412 security
413
414 server string
415
416 smbrun
417
418 socket address
419
420 socket options
421
422 status
423
424 strip dot
425
426 time offset
427
428 username map
429
430 use rhosts
431
432 valid chars
433
434 workgroup
435
436 write raw
437
438 .SS COMPLETE LIST OF SERVICE PARAMETERS
439
440 Here is a list of all service parameters. See the section of each
441 parameter for details. Note that some are synonyms.
442
443 admin users
444
445 allow hosts
446
447 alternate permissions
448
449 available
450
451 browseable
452
453 case sensitive
454
455 case sig names
456
457 copy
458
459 create mask
460
461 create mode
462
463 comment
464
465 default case
466
467 delete readonly
468
469 deny hosts
470
471 directory
472
473 directory mask
474
475 directory mode
476
477 dont descend
478
479 exec
480
481 fake oplocks
482
483 force group
484
485 force user
486
487 guest account
488
489 guest ok
490
491 guest only
492
493 hide dot files
494
495 hosts allow
496
497 hosts deny
498
499 invalid users
500
501 locking
502
503 lppause command
504
505 lpq command
506
507 lpresume command
508
509 lprm command
510
511 magic output
512
513 magic script
514
515 mangle case
516
517 mangled names
518
519 mangling char
520
521 map archive
522
523 map hidden
524
525 map system
526
527 max connections
528
529 min print space
530
531 only guest
532
533 only user
534
535 path
536
537 postexec
538
539 postscript
540
541 preserve case
542
543 print command
544
545 printer driver
546
547 print ok
548
549 printable
550
551 printer
552
553 printer name
554
555 public
556
557 read only
558
559 read list
560
561 revalidate
562
563 root postexec
564
565 root preexec
566
567 set directory
568
569 share modes
570
571 short preserve case
572
573 strict locking
574
575 sync always
576
577 user
578
579 username
580
581 users
582
583 valid users
584
585 volume
586
587 wide links
588
589 writable
590
591 write ok
592
593 writeable
594
595 write list
596
597 .SS EXPLANATION OF EACH PARAMETER
598 .RS 3
599
600 .SS admin users (G)
601
602 This is a list of users who will be granted administrative privileges
603 on the share. This means that they will do all file operations as the
604 super-user (root).
605
606 You should use this option very carefully, as any user in this list
607 will be able to do anything they like on the share, irrespective of
608 file permissions.
609
610 .B Default:
611         no admin users
612
613 .B Example:
614         admin users = jason
615
616 .SS auto services (G)
617 This is a list of services that you want to be automatically added to
618 the browse lists. This is most useful for homes and printers services
619 that would otherwise not be visible.
620
621 Note that if you just want all printers in your printcap file loaded
622 then the "load printers" option is easier.
623
624 .B Default:
625         no auto services
626
627 .B Example:
628         auto services = fred lp colorlp
629
630 .SS allow hosts (S)
631 A synonym for this parameter is 'hosts allow'.
632
633 This parameter is a comma delimited set of hosts which are permitted to access
634 a services. If specified in the [global] section, matching hosts will be
635 allowed access to any service that does not specifically exclude them from
636 access. Specific services my have their own list, which override those
637 specified in the [global] section.
638
639 You can specify the hosts by name or IP number. For example, you could
640 restrict access to only the hosts on a Class C subnet with something like
641 "allow hosts = 150.203.5.". The full syntax of the list is described in
642 the man page
643 .BR hosts_access (5).
644
645 You can also specify hosts by network/netmask pairs and by netgroup
646 names if your system supports netgroups. The EXCEPT keyword can also
647 be used to limit a wildcard list. The following examples may provide
648 some help:
649
650 Example 1: allow all IPs in 150.203.*.* except one
651
652         hosts allow = 150.203. EXCEPT 150.203.6.66
653
654 Example 2: allow hosts that match the given network/netmask
655
656         hosts allow = 150.203.15.0/255.255.255.0
657
658 Example 3: allow a couple of hosts
659
660         hosts allow = lapland, arvidsjaur
661
662 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
663 deny access from one particular host
664
665         hosts allow = @foonet, localhost
666         hosts deny = pirate
667
668 Note that access still requires suitable user-level passwords.
669
670 See
671 .BR testparm (1)
672 for a way of testing your host access to see if it
673 does what you expect.
674
675 .B Default:
676         none (i.e., all hosts permitted access)
677
678 .B Example:
679         allow hosts = 150.203.5. myhost.mynet.edu.au
680
681 .SS alternate permissions (S)
682
683 This option affects the way the "read only" DOS attribute is produced
684 for UNIX files. If this is false then the read only bit is set for
685 files on writeable shares which the user cannot write to.
686
687 If this is true then it is set for files whos user write bit is not set.
688
689 The latter behaviour is useful for when users copy files from each
690 others directories, and use a file manager that preserves
691 permissions. Without this option they may get annoyed as all copied
692 files will have the "read only" bit set.
693
694 .B Default:
695         alternate permissions = no
696
697 .B Example:
698         alternate permissions = yes
699
700 .SS available (S)
701 This parameter lets you 'turn off' a service. If 'available = no', then
702 ALL attempts to connect to the service will fail. Such failures are logged.
703
704 .B Default:
705         available = yes
706
707 .B Example:
708         available = no
709 .SS browseable (S)
710 This controls whether this share is seen in the list of available
711 shares in a net view and in the browse list.
712
713 .B Default:
714         browseable = Yes
715
716 .B Example: 
717         browseable = No
718
719 .SS case sig names (G)
720 See "case sensitive"
721
722 .SS comment (S)
723 This is a text field that is seen when a client does a net view to
724 list what shares are available. It will also be used when browsing is
725 fully supported.
726
727 .B Default:
728         No comment string
729
730 .B Example:
731         comment = Fred's Files
732
733 .SS config file (G)
734
735 This allows you to override the config file to use, instead of the
736 default (usually smb.conf). There is a chicken and egg problem here as
737 this option is set in the config file! 
738
739 For this reason, if the name of the config file has changed when the
740 parameters are loaded then it will reload them from the new config
741 file.
742
743 This option takes the usual substitutions, which can be very useful.
744
745 If the config file doesn't exist then it won't be loaded (allowing
746 you to special case the config files of just a few clients).
747
748 .B Example:
749         config file = /usr/local/samba/lib/smb.conf.%m
750
751 .SS copy (S)
752 This parameter allows you to 'clone' service entries. The specified
753 service is simply duplicated under the current service's name. Any 
754 parameters specified in the current section will override those in the
755 section being copied.
756
757 This feature lets you set up a 'template' service and create similar 
758 services easily. Note that the service being copied must occur earlier 
759 in the configuration file than the service doing the copying.
760
761 .B Default:
762         none
763
764 .B Example:
765         copy = otherservice
766 .SS create mask (S)
767 A synonym for this parameter is 'create mode'.
768
769 This parameter is the octal modes which are used when converting DOS modes 
770 to UNIX modes.
771
772 Note that Samba will or this value with 0700 as you must have at least
773 user read, write and execute for Samba to work properly.
774
775 .B Default:
776         create mask = 0644
777
778 .B Example:
779         create mask = 0775
780 .SS create mode (S)
781 See
782 .B create mask.
783 .SS dead time (G)
784 The value of the parameter (a decimal integer) represents the number of
785 minutes of inactivity before a connection is considered dead, and it
786 is disconnected. The deadtime only takes effect if the number of open files
787 is zero.
788
789 This is useful to stop a server's resources being exhausted by a large
790 number of inactive connections.
791
792 Most clients have an auto-reconnect feature when a connection is broken so
793 in most cases this parameter should be transparent to users.
794
795 Using this parameter with a timeout of a few minutes is recommended
796 for most systems.
797
798 A deadtime of zero indicates that no auto-disconnection should be performed.
799
800 .B Default:
801         dead time = 0
802
803 .B Example:
804         dead time = 15
805 .SS debug level (G)
806 The value of the parameter (an integer) allows the debug level
807 (logging level) to be specified in the
808 .B smb.conf
809 file. This is to give
810 greater flexibility in the configuration of the system.
811
812 The default will be the debug level specified on the command line.
813
814 .B Example:
815         debug level = 3
816 .SS default (G)
817 See
818 .B default service.
819 .SS default case (S)
820
821 See the section on "NAME MANGLING" Also note the addition of "short
822 preserve case"
823
824 .SS default service (G)
825 A synonym for this parameter is 'default'.
826
827 This parameter specifies the name of a service which will be connected to
828 if the service actually requested cannot be found. Note that the square
829 brackets are NOT given in the parameter value (see example below).
830
831 There is no default value for this parameter. If this parameter is not given,
832 attempting to connect to a nonexistent service results in an error.
833
834 Typically the default service would be a public, read-only service.
835
836 Also note that as of 1.9.14 the apparent service name will be changed to
837 equal that of the requested service, this is very useful as it allows
838 you to use macros like %S to make a wildcard service.
839
840 Note also that any _ characters in the name of the service used in the
841 default service will get mapped to a /. This allows for interesting
842 things.
843
844
845 .B Example:
846         default service = pub
847         
848         [pub]
849              path = /%S
850           
851
852 .SS delete readonly (S)
853 This parameter allows readonly files to be deleted.  This is not normal DOS
854 semantics, but is allowed by UNIX.
855
856 This option may be useful for running applications such as rcs, where UNIX
857 file ownership prevents changing file permissions, and DOS semantics prevent
858 deletion of a read only file.
859
860 .B Default:
861         delete readonly = No
862
863 .B Example:
864         delete readonly = Yes
865 .SS deny hosts (S)
866 A synonym for this parameter is 'hosts deny'.
867
868 The opposite of 'allow hosts' - hosts listed here are NOT permitted
869 access to services unless the specific services have their own lists to
870 override this one. Where the lists conflict, the 'allow' list takes precedence.
871
872 .B Default:
873         none (i.e., no hosts specifically excluded)
874
875 .B Example:
876         deny hosts = 150.203.4. badhost.mynet.edu.au
877 .SS dfree command (G)
878 The dfree command setting should only be used on systems where a
879 problem occurs with the internal disk space calculations. This has
880 been known to happen with Ultrix, but may occur with other operating
881 systems. The symptom that was seen was an error of "Abort Retry
882 Ignore" at the end of each directory listing.
883
884 This setting allows the replacement of the internal routines to
885 calculate the total disk space and amount available with an external
886 routine. The example below gives a possible script that might fulfill
887 this function. 
888
889 The external program will be passed a single parameter indicating a
890 directory in the filesystem being queried. This will typically consist
891 of the string "./". The script should return two integers in ascii. The
892 first should be the total disk space in blocks, and the second should
893 be the number of available blocks. An optional third return value
894 can give the block size in bytes. The default blocksize is 1024 bytes.
895
896 Note: Your script should NOT be setuid or setgid and should be owned by
897 (and writable only by) root!
898
899 .B Default:
900         By default internal routines for determining the disk capacity
901 and remaining space will be used.
902
903 .B Example:
904         dfree command = /usr/local/samba/bin/dfree
905
906         Where the script dfree (which must be made executable) could be
907
908 .nf
909         #!/bin/sh
910         df $1 | tail -1 | awk '{print $2" "$4}'
911 .fi
912
913         or perhaps (on Sys V)
914
915 .nf
916         #!/bin/sh
917         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
918 .fi
919
920         Note that you may have to replace the command names with full
921 path names on some systems.
922 .SS directory (S)
923 See
924 .B path.
925
926 .SS directory mask (S)
927 A synonym for this parameter is 'directory mode'.
928
929 This parameter is the octal modes which are used when converting DOS modes 
930 to UNIX modes when creating UNIX directories.
931
932 Note that Samba will or this value with 0700 as you must have at least
933 user read, write and execute for Samba to work properly.
934
935 .B Default:
936         directory mask = 0755
937
938 .B Example:
939         directory mask = 0775
940 .SS directory mode (S)
941 See
942 .B directory mask.
943 .SS domain master (G)
944
945 Enable WAN-wide browse list collation.  Local master browsers on 
946 broadcast-isolated subnets will give samba their local browse lists, and 
947 ask for a complete copy of the browse list for the whole wide area network.
948 Browser clients will then contact their local master browser, and will
949 receive the domain-wide browse list, instead of just the list for their
950 broadcast-isolated subnet.
951
952 .B Default:
953         domain master = no
954
955 .SS dont descend (S)
956 There are certain directories on some systems (eg., the /proc tree under
957 Linux) that are either not of interest to clients or are infinitely deep
958 (recursive). This parameter allows you to specify a comma-delimited list
959 of directories that the server should always show as empty.
960
961 Note that Samba can be very fussy about the exact format of the "dont
962 descend" entries. For example you may need "./proc" instead of just
963 "/proc". Experimentation is the best policy :-)
964
965 .B Default:
966         none (i.e., all directories are OK to descend)
967
968 .B Example:
969         dont descend = /proc,/dev
970
971 .SS encrypt passwords (G)
972
973 This boolean controls whether encrypted passwords will be negotiated
974 with the client. Note that this option has no effect if you haven't
975 compiled in the necessary des libraries and encryption code. It
976 defaults to no.
977
978 .SS exec (S)
979
980 This is an alias for preexec
981
982
983 .SS force group (S)
984 This specifies a group name that all connections to this service
985 should be made as. This may be useful for sharing files.
986
987 .B Default:
988        no forced group
989
990 .B Example:
991        force group = agroup
992
993 .SS force user (S)
994 This specifies a user name that all connections to this service
995 should be made as. This may be useful for sharing files. You should
996 also use it carefully as using it incorrectly can cause security
997 problems.
998
999 This user name only gets used once a connection is established. Thus
1000 clients still need to connect as a valid user and supply a valid
1001 password. Once connected, all file operations will be performed as the
1002 "forced user", not matter what username the client connected as.
1003
1004 .B Default:
1005        no forced user
1006
1007 .B Example:
1008        force user = auser
1009
1010 .SS guest account (S)
1011 This is a username which will be used for access to services which are
1012 specified as 'guest ok' (see below). Whatever privileges this user has
1013 will be available to any client connecting to the guest
1014 service. Typically this user will exist in the password file, but will
1015 not have a valid login. If a username is specified in a given service,
1016 the specified username overrides this one.
1017
1018 One some systems the account "nobody" may not be able to print. Use
1019 another account in this case. You should test this by trying to log in
1020 as your guest user (perhaps by using the "su \-" command) and trying to
1021 print using
1022 .BR lpr .
1023
1024 Note that as of version 1.9 of Samba this option may be set
1025 differently for each service.
1026
1027 .B Default:
1028         specified at compile time
1029
1030 .B Example:
1031         guest account = nobody
1032 .SS getwd cache (G)
1033 This is a tuning option. When this is enabled a cacheing algorithm will
1034 be used to reduce the time taken for getwd() calls. This can have a
1035 significant impact on performance, especially when widelinks is False.
1036
1037 .B Default:
1038         getwd cache = No
1039
1040 .B Example:
1041         getwd cache = Yes
1042 .SS guest ok (S)
1043 See
1044 .B public.
1045 .SS guest only (S)
1046 If this parameter is 'yes' for a service, then only guest connections to the
1047 service are permitted. This parameter will have no affect if "guest ok" or
1048 "public" is not set for the service.
1049
1050 See the section below on user/password validation for more information about
1051 this option.
1052
1053 .B Default:
1054         guest only = no
1055
1056 .B Example:
1057         guest only = yes
1058 .SS hide dot files (S)
1059 This is a boolean parameter that controls whether files starting with
1060 a dot appear as hidden files.
1061
1062 .B Default:
1063         hide dot files = yes
1064
1065 .B Example:
1066         hide dot files = no
1067 .SS hosts allow (S)
1068 See
1069 .B allow hosts.
1070 .SS hosts deny (S)
1071 See
1072 .B deny hosts.
1073
1074 .SS group (S)
1075 This is an alias for "force group" and is only kept for compatibility
1076 with old versions of Samba. It may be removed in future versions.
1077
1078 .SS hosts equiv (G)
1079 If this global parameter is a non-null string, it specifies the name of
1080 a file to read for the names of hosts and users who will be allowed access
1081 without specifying a password.
1082
1083 This is not be confused with 
1084 .B allow hosts
1085 which is about hosts access to services and is more useful for guest services.
1086 .B hosts equiv
1087 may be useful for NT clients which will not supply passwords to samba.
1088
1089 NOTE: The use of hosts.equiv can be a major security hole. This is
1090 because you are trusting the PC to supply the correct username. It is
1091 very easy to get a PC to supply a false username. I recommend that the
1092 hosts.equiv option be only used if you really know what you are doing,
1093 or perhaps on a home network where you trust your wife and kids :-)
1094
1095 .B Default
1096         No host equivalences
1097
1098 .B Example
1099         hosts equiv = /etc/hosts.equiv
1100
1101 .SS interfaces (G)
1102
1103 This option allows you to setup multiple network interfaces, so that
1104 Samba can properly handle browsing on all interfaces.
1105
1106 The option takes a list of ip/netmask pairs. The netmask may either be
1107 a bitmask, or a bitlength. 
1108
1109 For example, the following line:
1110
1111 interfaces = 192.168.2.10/24 192.168.3.10/24
1112
1113 would configure two network interfaces with IP addresses 192.168.2.10
1114 and 192.168.3.10. The netmasks of both interfaces would be set to
1115 255.255.255.0. 
1116
1117 You could produce an equivalent result by using:
1118
1119 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1120
1121 if you prefer that format.
1122
1123 If this option is not set then Samba will attempt to find a primary
1124 interface, but won't attempt to configure more than one interface.
1125
1126 .SS invalid users (S)
1127 This is a list of users that should not be allowed to login to this
1128 service. This is really a "paranoid" check to absolutely ensure an
1129 improper setting does not breach your security.
1130
1131 A name starting with @ is interpreted as a UNIX group.
1132
1133 The current servicename is substituted for %S. This is useful in the
1134 [homes] section.
1135
1136 See also "valid users"
1137
1138 .B Default
1139         No invalid users
1140
1141 .B Example
1142         invalid users = root fred admin @wheel
1143
1144 .SS include (G)
1145
1146 This allows you to include one config file inside another.  The file is
1147 included literally, as though typed in place.
1148
1149 It takes the standard substitutions, except %u, %P and %S
1150
1151 .SS keep alive (G)
1152 The value of the parameter (an integer) represents the number of seconds 
1153 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1154 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1155 client is still present and responding.
1156
1157 Keepalives should, in general, not be needed if the socket being used
1158 has the SO_KEEPALIVE attribute set on it (see "socket
1159 options"). Basically you should only use this option if you strike
1160 difficulties.
1161
1162 .B Default:
1163         keep alive = 0
1164
1165 .B Example:
1166         keep alive = 60
1167 .SS load printers (G)
1168 A boolean variable that controls whether all printers in the printcap
1169 will be loaded for browsing by default. 
1170
1171 .B Default:
1172         load printers = no
1173
1174 .B Example:
1175         load printers = yes
1176
1177 .SS lock directory (G)
1178 This options specifies the directory where lock files will be placed.
1179 The lock files are used to implement the "max connections" option.
1180
1181 .B Default:
1182         lock directory = /tmp/samba
1183
1184 .B Example: 
1185         lock directory = /usr/local/samba/var/locks
1186 .SS locking (S)
1187 This controls whether or not locking will be performed by the server in 
1188 response to lock requests from the client.
1189
1190 If "locking = no", all lock and unlock requests will appear to succeed and 
1191 all lock queries will indicate that the queried lock is clear.
1192
1193 If "locking = yes", real locking will be performed by the server.
1194
1195 This option may be particularly useful for read-only filesystems which
1196 do not need locking (such as cdrom drives).
1197
1198 Be careful about disabling locking either globally or in a specific
1199 service, as lack of locking may result in data corruption.
1200
1201 .B Default:
1202         locking = yes
1203
1204 .B Example:
1205         locking = no
1206
1207 .SS log file (G)
1208
1209 This options allows you to override the name of the Samba log file
1210 (also known as the debug file).
1211
1212 This option takes the standard substitutions, allowing you to have
1213 separate log files for each user or machine.
1214
1215 .B Example:
1216         log file = /usr/local/samba/var/log.%m
1217
1218 .SS log level (G)
1219 see "debug level"
1220
1221 .SS lppause command (S)
1222 This parameter specifies the command to be executed on the server host in
1223 order to stop printing or spooling a specific print job.
1224
1225 This command should be a program or script which takes a printer name and
1226 job number to pause the print job. Currently I don't know of any print
1227 spooler system that can do this with a simple option, except for the PPR
1228 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1229 of implementing this is by using job priorities, where jobs having a too
1230 low priority won't be sent to the printer. See also the
1231 .B lppause
1232 command.
1233
1234 If a %p is given then the printername is put in its place. A %j is
1235 replaced with the job number (an integer).
1236 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1237 command, the job will show up with the correct status, i.e. if the job
1238 priority is lower than the set fence priority it will have the PAUSED
1239 status, whereas if the priority is equal or higher it will have the
1240 SPOOLED or PRINTING status.
1241
1242 Note that it is good practice to include the absolute path in the lppause
1243 command as the PATH may not be available to the server.
1244
1245 .B Default:
1246         Currently no default value is given to this string
1247
1248 .B Example for HPUX:
1249         lppause command = /usr/bin/lpalt %p-%j -p0
1250
1251 .SS lpq cache time (G)
1252
1253 This controls how long lpq info will be cached for to prevent the lpq
1254 command being called too often. A separate cache is kept for each
1255 variation of the lpq command used by the system, so if you use
1256 different lpq commands for different users then they won't share cache
1257 information.
1258
1259 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1260 of the lpq command in use.
1261
1262 The default is 10 seconds, meaning that the cached results of a
1263 previous identical lpq command will be used if the cached data is less
1264 than 10 seconds old. A large value may be advisable if your lpq
1265 command is very slow.
1266
1267 A value of 0 will disable cacheing completely.
1268
1269 .B Default:
1270         lpq cache time = 10
1271
1272 .B Example:
1273         lpq cache time = 30
1274
1275 .SS lpq command (S)
1276 This parameter specifies the command to be executed on the server host in
1277 order to obtain "lpq"-style printer status information. 
1278
1279 This command should be a program or script which takes a printer name
1280 as its only parameter and outputs printer status information. 
1281
1282 Currently six styles of printer status information are supported; BSD,
1283 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1284 control which type is expected using the "printing =" option.
1285
1286 Some clients (notably Windows for Workgroups) may not correctly send the
1287 connection number for the printer they are requesting status information
1288 about. To get around this, the server reports on the first printer service
1289 connected to by the client. This only happens if the connection number sent
1290 is invalid.
1291
1292 If a %p is given then the printername is put in its place. Otherwise
1293 it is placed at the end of the command.
1294
1295 Note that it is good practice to include the absolute path in the lpq
1296 command as the PATH may not be available to the server.
1297
1298 .B Default:
1299         depends on the setting of "printing ="
1300
1301 .B Example:
1302         lpq command = /usr/bin/lpq %p
1303
1304 .SS lpresume command (S)
1305 This parameter specifies the command to be executed on the server host in
1306 order to restart or continue printing or spooling a specific print job.
1307
1308 This command should be a program or script which takes a printer name and
1309 job number to resume the print job. See also the lppause command.
1310
1311 If a %p is given then the printername is put in its place. A %j is
1312 replaced with the job number (an integer).
1313
1314 Note that it is good practice to include the absolute path in the lpresume
1315 command as the PATH may not be available to the server.
1316
1317 .B Default:
1318         Currently no default value is given to this string
1319
1320 .B Example for HPUX:
1321         lpresume command = /usr/bin/lpalt %p-%j -p2
1322
1323 .SS lprm command (S)
1324 This parameter specifies the command to be executed on the server host in
1325 order to delete a print job.
1326
1327 This command should be a program or script which takes a printer name
1328 and job number, and deletes the print job.
1329
1330 Currently seven styles of printer control are supported; BSD, SYSV, AIX
1331 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
1332 which type is expected using the "printing =" option.
1333
1334 If a %p is given then the printername is put in its place. A %j is
1335 replaced with the job number (an integer).
1336
1337 Note that it is good practice to include the absolute path in the lprm
1338 command as the PATH may not be available to the server.
1339
1340 .B Default:
1341         depends on the setting of "printing ="
1342
1343 .B Example 1:
1344         lprm command = /usr/bin/lprm -P%p %j
1345
1346 .B Example 2:
1347         lprm command = /usr/bin/cancel %p-%j
1348
1349 .SS magic output (S)
1350 This parameter specifies the name of a file which will contain output
1351 created by a magic script (see
1352 .I magic script
1353 below).
1354
1355 Warning: If two clients use the same magic script in the same directory the
1356 output file content is undefined.
1357 .B Default:
1358         magic output = <magic script name>.out
1359
1360 .B Example:
1361         magic output = myfile.txt
1362 .SS magic script (S)
1363 This parameter specifies the name of a file which, if opened, will be
1364 executed by the server when the file is closed. This allows a UNIX script
1365 to be sent to the Samba host and executed on behalf of the connected user.
1366
1367 Scripts executed in this way will be deleted upon completion, permissions
1368 permitting.
1369
1370 If the script generates output, output will be sent to the file specified by
1371 the
1372 .I magic output
1373 parameter (see above).
1374
1375 Note that some shells are unable to interpret scripts containing
1376 carriage-return-linefeed instead of linefeed as the end-of-line
1377 marker. Magic scripts must be executable "as is" on the host, which
1378 for some hosts and some shells will require filtering at the DOS end.
1379
1380 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
1381
1382 .B Default:
1383         None. Magic scripts disabled.
1384
1385 .B Example:
1386         magic script = user.csh
1387 .SS mangled map (S)
1388 This is for those who want to directly map UNIX file names which are
1389 not representable on DOS.  The mangling of names is not always what is
1390 needed.  In particular you may have documents with file extensions
1391 that differ between DOS and UNIX. For example, under UNIX it is common
1392 to use .html for HTML files, whereas under DOS .htm is more commonly
1393 used.
1394
1395 So to map 'html' to 'htm' you put:
1396
1397   mangled map = (*.html *.htm)
1398
1399 One very useful case is to remove the annoying ;1 off the ends of
1400 filenames on some CDROMS (only visible under some UNIXes). To do this
1401 use a map of (*;1 *)
1402
1403 .B default:
1404         no mangled map
1405
1406 .B Example:
1407         mangled map = (*;1 *)
1408
1409 .SS mangle case (S)
1410
1411 See the section on "NAME MANGLING"
1412
1413 .SS mangled names (S)
1414 This controls whether non-DOS names under UNIX should be mapped to
1415 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
1416 should simply be ignored.
1417
1418 See the section on "NAME MANGLING" for details on how to control the
1419 mangling process.
1420
1421 If mangling is used then the mangling algorithm is as follows:
1422 .RS
1423 - the first (up to) five alphanumeric characters before the rightmost dot of
1424 the filename are preserved, forced to upper case, and appear as the first (up
1425 to) five characters of the mangled name.
1426
1427 - a tilde ("~") is appended to the first part of the mangled name, followed
1428 by a two-character unique sequence, based on the original root name 
1429 (i.e., the original filename minus its final extension). The final
1430 extension is included in the hash calculation only if it contains any upper
1431 case characters or is longer than three characters.
1432
1433 Note that the character to use may be specified using the "mangling
1434 char" option, if you don't like ~.
1435
1436 - the first three alphanumeric characters of the final extension are preserved,
1437 forced to upper case and appear as the extension of the mangled name. The 
1438 final extension is defined as that part of the original filename after the
1439 rightmost dot. If there are no dots in the filename, the mangled name will
1440 have no extension (except in the case of hidden files - see below).
1441
1442 - files whose UNIX name begins with a dot will be presented as DOS hidden
1443 files. The mangled name will be created as for other filenames, but with the
1444 leading dot removed and "___" as its extension regardless of actual original
1445 extension (that's three underscores).
1446 .RE
1447
1448 The two-digit hash value consists of upper case alphanumeric characters.
1449
1450 This algorithm can cause name collisions only if files in a directory share
1451 the same first five alphanumeric characters. The probability of such a clash 
1452 is 1/1300.
1453
1454 The name mangling (if enabled) allows a file to be copied between UNIX
1455 directories from DOS while retaining the long UNIX filename. UNIX files can
1456 be renamed to a new extension from DOS and will retain the same basename. 
1457 Mangled names do not change between sessions.
1458
1459 .B Default:
1460         mangled names = yes
1461
1462 .B Example:
1463         mangled names = no
1464 .SS mangling char (S)
1465 This controls what character is used as the "magic" character in name
1466 mangling. The default is a ~ but this may interfere with some
1467 software. Use this option to set it to whatever you prefer.
1468
1469 .B Default:
1470         mangling char = ~
1471
1472 .B Example:
1473         mangling char = ^
1474
1475 .SS max disk size (G)
1476 This option allows you to put an upper limit on the apparent size of
1477 disks. If you set this option to 100 then all shares will appear to be
1478 not larger than 100 MB in size.
1479
1480 Note that this option does not limit the amount of data you can put on
1481 the disk. In the above case you could still store much more than 100
1482 MB on the disk, but if a client ever asks for the amount of free disk
1483 space or the total disk size then the result will be bounded by the
1484 amount specified in "max disk size".
1485
1486 This option is primarily useful to work around bugs in some pieces of
1487 software that can't handle very large disks, particularly disks over
1488 1GB in size.
1489
1490 A "max disk size" of 0 means no limit.
1491
1492 .B Default:
1493         max disk size = 0
1494
1495 .B Example:
1496         max disk size = 1000
1497 .SS max log size (G)
1498
1499 This option (an integer in kilobytes) specifies the max size the log
1500 file should grow to. Samba periodically checks the size and if it is
1501 exceeded it will rename the file, adding a .old extension.
1502
1503 A size of 0 means no limit.
1504
1505 .B Default:
1506         max log size = 5000
1507
1508 .B Example:
1509         max log size = 1000
1510
1511 .SS max xmit (G)
1512
1513 This option controls the maximum packet size that will be negotiated
1514 by Samba. The default is 65535, which is the maximum. In some cases
1515 you may find you get better performance with a smaller value. A value
1516 below 2048 is likely to cause problems.
1517
1518 .B Default:
1519         max xmit = 65535
1520
1521 .B Example:
1522         max xmit = 8192
1523
1524 .SS mangled stack (G)
1525 This parameter controls the number of mangled names that should be cached in
1526 the Samba server.
1527
1528 This stack is a list of recently mangled base names (extensions are only
1529 maintained if they are longer than 3 characters or contains upper case
1530 characters).
1531
1532 The larger this value, the more likely it is that mangled names can be
1533 successfully converted to correct long UNIX names. However, large stack
1534 sizes will slow most directory access. Smaller stacks save memory in the
1535 server (each stack element costs 256 bytes).
1536
1537 It is not possible to absolutely guarantee correct long file names, so
1538 be prepared for some surprises!
1539
1540 .B Default:
1541         mangled stack = 50
1542
1543 .B Example:
1544         mangled stack = 100
1545
1546 .SS map archive (S)
1547 This controls whether the DOS archive attribute should be mapped to UNIX
1548 execute bits.  The DOS archive bit is set when a file has been modified
1549 since its last backup.  One motivation for this option it to keep Samba/your
1550 PC from making any file it touches from becoming executable under UNIX.
1551 This can be quite annoying for shared source code, documents,  etc...
1552
1553 .B Default:
1554       map archive = yes
1555
1556 .B Example:
1557       map archive = no
1558
1559 .SS map hidden (S)
1560 This controls whether DOS style hidden files should be mapped to UNIX
1561 execute bits.
1562
1563 .B Default:
1564         map hidden = no
1565
1566 .B Example:
1567         map hidden = yes
1568 .SS map system (S)
1569 This controls whether DOS style system files should be mapped to UNIX
1570 execute bits.
1571
1572 .B Default:
1573         map system = no
1574
1575 .B Example:
1576         map system = yes
1577 .SS max connections (S)
1578 This option allows the number of simultaneous connections to a
1579 service to be limited. If "max connections" is greater than 0 then
1580 connections will be refused if this number of connections to the
1581 service are already open. A value of zero mean an unlimited number of
1582 connections may be made.
1583
1584 Record lock files are used to implement this feature. The lock files
1585 will be stored in the directory specified by the "lock directory" option.
1586
1587 .B Default:
1588         max connections = 0
1589
1590 .B Example:
1591         max connections = 10
1592 .SS only user (S)
1593 This is a boolean option that controls whether connections with
1594 usernames not in the user= list will be allowed. By default this
1595 option is disabled so a client can supply a username to be used by
1596 the server.
1597
1598 Note that this also means Samba won't try to deduce usernames from the
1599 service name. This can be annoying for the [homes] section. To get
1600 around this you could use "user = %S" which means your "user" list
1601 will be just the service name, which for home directories is the name
1602 of the user.
1603
1604 .B Default: 
1605         only user = False
1606
1607 .B Example: 
1608         only user = True
1609
1610 .SS fake oplocks (S)
1611
1612 Oplocks are the way that SMB clients get permission from a server to
1613 locally cache file operations. If a server grants an oplock
1614 (opportunistic lock) then the client is free to assume that it is the
1615 only one accessing the file and it will aggressively cache file
1616 data. With some oplock types the client may even cache file open/close
1617 operations. This can give enormous performance benefits.
1618
1619 Samba does not support opportunistic locks because they are very
1620 difficult to do under Unix. Samba can fake them, however, by granting
1621 a oplock whenever a client asks for one. This is controlled using the
1622 smb.conf option "fake oplocks". If you set "fake oplocks = yes" then
1623 you are telling the client that it may aggressively cache the file
1624 data.
1625
1626 By enabling this option on all read-only shares or shares that you know
1627 will only be accessed from one client at a time you will see a big
1628 performance improvement on many operations. If you enable this option
1629 on shares where multiple clients may be accessing the files read-write
1630 at the same time you can get data corruption. Use this option
1631 carefully! 
1632
1633 This option is disabled by default.
1634
1635 .SS message command (G)
1636
1637 This specifies what command to run when the server receives a WinPopup
1638 style message.
1639
1640 This would normally be a command that would deliver the message
1641 somehow. How this is to be done is up to your imagination.
1642
1643 What I use is:
1644
1645    message command = csh -c 'xedit %s;rm %s' &
1646
1647 This delivers the message using xedit, then removes it
1648 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
1649 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
1650 immediately then your PCs may freeze when sending messages (they
1651 should recover after 30secs, hopefully).
1652
1653 All messages are delivered as the global guest user. The command takes
1654 the standard substitutions, although %u won't work (%U may be better
1655 in this case).
1656
1657 Apart from the standard substitutions, some additional ones apply. In
1658 particular:
1659
1660 %s = the filename containing the message
1661
1662 %t = the destination that the message was sent to (probably the server
1663 name)
1664
1665 %f = who the message is from
1666
1667 You could make this command send mail, or whatever else takes your
1668 fancy. Please let me know of any really interesting ideas you have.
1669
1670 Here's a way of sending the messages as mail to root:
1671
1672 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
1673
1674 If you don't have a message command then the message won't be
1675 delivered and Samba will tell the sender there was an
1676 error. Unfortunately WfWg totally ignores the error code and carries
1677 on regardless, saying that the message was delivered.
1678
1679 If you want to silently delete it then try "message command = rm %s".
1680
1681 For the really adventurous, try something like this:
1682
1683 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
1684                   -M %m; rm %s' &
1685
1686 this would execute the command as a script on the server, then give
1687 them the result in a WinPopup message. Note that this could cause a
1688 loop if you send a message from the server using smbclient! You better
1689 wrap the above in a script that checks for this :-)
1690
1691 .B Default:
1692         no message command
1693
1694 .B Example:
1695         message command = csh -c 'xedit %s;rm %s' &
1696
1697 .SS min print space (S)
1698
1699 This sets the minimum amount of free disk space that must be available
1700 before a user will be able to spool a print job. It is specified in
1701 kilobytes. The default is 0, which means no limit.
1702
1703 .B Default:
1704         min print space = 0
1705
1706 .B Example:
1707         min print space = 2000
1708
1709 .SS null passwords (G)
1710 Allow or disallow access to accounts that have null passwords. 
1711
1712 .B Default:
1713         null passwords = no
1714
1715 .B Example:
1716         null passwords = yes
1717
1718 .SS os level (G)
1719 This integer value controls what level Samba advertises itself as for
1720 browse elections. See BROWSING.txt for details.
1721
1722 .SS packet size (G)
1723 The maximum transmit packet size during a raw read. This option is no
1724 longer implemented as of version 1.7.00, and is kept only so old
1725 configuration files do not become invalid.
1726
1727 .SS passwd chat (G)
1728 This string controls the "chat" conversation that takes places
1729 between smbd and the local password changing program to change the
1730 users password. The string describes a sequence of response-receive
1731 pairs that smbd uses to determine what to send to the passwd program
1732 and what to expect back. If the expected output is not received then
1733 the password is not changed.
1734
1735 This chat sequence is often quite site specific, depending on what
1736 local methods are used for password control (such as NIS+ etc).
1737
1738 The string can contain the macros %o and %n which are substituted for
1739 the old and new passwords respectively. It can also contain the
1740 standard macros \en \er \et and \es to give line-feed, carriage-return,
1741 tab and space.
1742
1743 The string can also contain a * which matches any sequence of
1744 characters.
1745
1746 Double quotes can be used to collect strings with spaces in them into
1747 a single string.
1748
1749 If the send string in any part of the chat sequence is a fullstop "."
1750 then no string is sent. Similarly, is the expect string is a fullstop
1751 then no string is expected.
1752
1753 .B Example:
1754         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
1755                        "*Reenter NEW password*" %n\en "*Password changed*"
1756
1757
1758 .B Default:
1759        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
1760
1761 .SS passwd program (G)
1762 The name of a program that can be used to set user passwords.
1763
1764 This is only necessary if you have enabled remote password changing at
1765 compile time. Any occurrences of %u will be replaced with the user
1766 name.
1767
1768 Also note that many passwd programs insist in "reasonable" passwords,
1769 such as a minimum length, or the inclusion of mixed case chars and
1770 digits. This can pose a problem as some clients (such as Windows for
1771 Workgroups) uppercase the password before sending it. 
1772
1773 .B Default:
1774         passwd program = /bin/passwd
1775
1776 .B Example:
1777         passwd program = /sbin/passwd %u
1778
1779 .SS password level (G)
1780 Some client/server combinations have difficulty with mixed-case passwords.
1781 One offending client is Windows for Workgroups, which for some reason forces
1782 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
1783 when using COREPLUS!
1784
1785 This parameter defines the maximum number of characters that may be upper case
1786 in passwords.
1787
1788 For example, say the password given was "FRED". If
1789 .B password level
1790 is set to 1 (one), the following combinations would be tried if "FRED" failed:
1791 "Fred", "fred", "fRed", "frEd", "freD". If
1792 .B password level was set to 2 (two), the following combinations would also be
1793 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
1794
1795 The higher value this parameter is set to the more likely it is that a mixed
1796 case password will be matched against a single case password. However, you
1797 should be aware that use of this parameter reduces security and increases the
1798 time taken to process a new connection.
1799
1800 A value of zero will cause only two attempts to be made - the password as is
1801 and the password in all-lower case.
1802
1803 If you find the connections are taking too long with this option then
1804 you probably have a slow crypt() routine. Samba now comes with a fast
1805 "ufc crypt" that you can select in the Makefile. You should also make
1806 sure the PASSWORD_LENGTH option is correct for your system in local.h
1807 and includes.h. On most systems only the first 8 chars of a password
1808 are significant so PASSWORD_LENGTH should be 8, but on some longer
1809 passwords are significant. The includes.h file tries to select the
1810 right length for your system.
1811
1812 .B Default:
1813         password level = 0
1814
1815 .B Example:
1816         password level = 4
1817
1818 .SS password server (G)
1819
1820 By specifying the name of another SMB server (such as a WinNT box)
1821 with this option, and using "security = server" you can get Samba to
1822 do all its username/password validation via a remote server.
1823
1824 This options sets the name of the password server to use. It must be a
1825 netbios name, so if the machine's netbios name is different from its
1826 internet name then you may have to add its netbios name to
1827 /etc/hosts.
1828
1829 The password server much be a machine capable of using the "LM1.2X002"
1830 or the "LM NT 0.12" protocol, and it must be in user level security
1831 mode. 
1832
1833 NOTE: Using a password server means your UNIX box (running Samba) is
1834 only as secure as your password server. DO NOT CHOOSE A PASSWORD
1835 SERVER THAT YOU DON'T COMPLETELY TRUST.
1836
1837 Never point a Samba server at itself for password serving. This will
1838 cause a loop and could lock up your Samba server!
1839
1840 The name of the password server takes the standard substitutions, but
1841 probably the only useful one is %m, which means the Samba server will
1842 use the incoming client as the password server. If you use this then
1843 you better trust your clients, and you better restrict them with hosts
1844 allow!
1845
1846 If you list several hosts in the "password server" option then smbd
1847 will try each in turn till it finds one that responds. This is useful
1848 in case your primary server goes down.
1849
1850 .SS path (S)
1851 A synonym for this parameter is 'directory'.
1852
1853 This parameter specifies a directory to which the user of the service is to
1854 be given access. In the case of printable services, this is where print data 
1855 will spool prior to being submitted to the host for printing.
1856
1857 For a printable service offering guest access, the service should be readonly
1858 and the path should be world-writable and have the sticky bit set. This is not
1859 mandatory of course, but you probably won't get the results you expect if you
1860 do otherwise.
1861
1862 Any occurrences of %u in the path will be replaced with the username
1863 that the client is connecting as. Any occurrences of %m will be
1864 replaced by the name of the machine they are connecting from. These
1865 replacements are very useful for setting up pseudo home directories
1866 for users.
1867
1868 Note that this path will be based on 'root dir' if one was specified.
1869 .B Default:
1870         none
1871
1872 .B Example:
1873         path = /home/fred+ 
1874
1875 .SS postexec (S)
1876
1877 This option specifies a command to be run whenever the service is
1878 disconnected. It takes the usual substitutions. The command may be run
1879 as the root on some systems.
1880
1881 An interesting example may be do unmount server resources:
1882
1883 postexec = /etc/umount /cdrom
1884
1885 See also preexec
1886
1887 .B Default:
1888       none (no command executed)
1889
1890 .B Example:
1891       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
1892
1893 .SS postscript (S)
1894 This parameter forces a printer to interpret the print files as
1895 postscript. This is done by adding a %! to the start of print output. 
1896
1897 This is most useful when you have lots of PCs that persist in putting
1898 a control-D at the start of print jobs, which then confuses your
1899 printer.
1900
1901 .B Default: 
1902         postscript = False
1903
1904 .B Example: 
1905         postscript = True
1906
1907 .SS preexec (S)
1908
1909 This option specifies a command to be run whenever the service is
1910 connected to. It takes the usual substitutions.
1911
1912 An interesting example is to send the users a welcome message every
1913 time they log in. Maybe a message of the day? Here is an example:
1914
1915 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
1916        /usr/local/samba/bin/smbclient -M %m -I %I' &
1917
1918 Of course, this could get annoying after a while :-)
1919
1920 See also postexec
1921
1922 .B Default:
1923         none (no command executed)
1924
1925 .B Example:
1926         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
1927
1928 .SS preferred master (G)
1929 This boolean parameter controls if Samba is a preferred master browser
1930 for its workgroup.
1931 On startup, samba will force an election, and it will have a slight
1932 advantage in winning the election.  It is recommended that this 
1933 parameter is used in conjunction with domain master = yes, so that samba 
1934 can guarantee becoming a domain master.  
1935
1936 See
1937 .B os level = nn
1938
1939 .B Default:
1940         preferred master = yes
1941
1942 .SS preload
1943 This is an alias for "auto services"
1944
1945 .SS preserve case (S)
1946
1947 This controls if new filenames are created with the case that the
1948 client passes, or if they are forced to be the "default" case.
1949
1950 .B Default:
1951        preserve case = no
1952
1953 See the section on "NAME MANGLING" for a fuller discussion.
1954
1955 .SS print command (S)
1956 After a print job has finished spooling to a service, this command will be
1957 used via a system() call to process the spool file. Typically the command 
1958 specified will submit the spool file to the host's printing subsystem, but
1959 there is no requirement that this be the case. The server will not remove the
1960 spool file, so whatever command you specify should remove the spool file when
1961 it has been processed, otherwise you will need to manually remove old spool
1962 files.
1963
1964 The print command is simply a text string. It will be used verbatim,
1965 with two exceptions: All occurrences of "%s" will be replaced by the
1966 appropriate spool file name, and all occurrences of "%p" will be
1967 replaced by the appropriate printer name. The spool file name is
1968 generated automatically by the server, the printer name is discussed
1969 below.
1970
1971 The full path name will be used for the filename if %s is not preceded
1972 by a /. If you don't like this (it can stuff up some lpq output) then
1973 use %f instead. Any occurrences of %f get replaced by the spool
1974 filename without the full path at the front.
1975
1976 The print command MUST contain at least one occurrence of "%s" or %f -
1977 the "%p" is optional. At the time a job is submitted, if no printer
1978 name is supplied the "%p" will be silently removed from the printer
1979 command.
1980
1981 If specified in the [global] section, the print command given will be used
1982 for any printable service that does not have its own print command specified.
1983
1984 If there is neither a specified print command for a printable service nor a 
1985 global print command, spool files will be created but not processed and (most
1986 importantly) not removed.
1987
1988 Note that printing may fail on some UNIXes from the "nobody"
1989 account. If this happens then create an alternative guest account that
1990 can print and set the "guest account" in the [global] section.
1991
1992 You can form quite complex print commands by realising that they are
1993 just passed to a shell. For example the following will log a print
1994 job, print the file, then remove it. Note that ; is the usual
1995 separator for command in shell scripts.
1996
1997 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
1998
1999 You may have to vary this command considerably depending on how you
2000 normally print files on your system.
2001
2002 .B Default:
2003         print command = lpr -r -P %p %s
2004
2005 .B Example:
2006         print command = /usr/local/samba/bin/myprintscript %p %s
2007 .SS print ok (S)
2008 See
2009 .B printable.
2010 .SS printable (S)
2011 A synonym for this parameter is 'print ok'.
2012
2013 If this parameter is 'yes', then clients may open, write to and submit spool 
2014 files on the directory specified for the service.
2015
2016 Note that a printable service will ALWAYS allow writing to the service path
2017 (user privileges permitting) via the spooling of print data. The 'read only'
2018 parameter controls only non-printing access to the resource.
2019
2020 .B Default:
2021         printable = no
2022
2023 .B Example:
2024         printable = yes
2025
2026 .SS printing (G)
2027 This parameters controls how printer status information is interpreted
2028 on your system, and also affects the default values for the "print
2029 command", "lpq command" and "lprm command".
2030
2031 Currently six printing styles are supported. They are "printing =
2032 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2033 "printing = qnx" and "printing = plp".
2034
2035 To see what the defaults are for the other print commands when using
2036 these three options use the "testparm" program.
2037
2038
2039 .SS printcap name (G)
2040 This parameter may be used to override the compiled-in default printcap
2041 name used by the server (usually /etc/printcap). See the discussion of the
2042 [printers] section above for reasons why you might want to do this.
2043
2044 For those of you without a printcap (say on SysV) you can just create a
2045 minimal file that looks like a printcap and set "printcap name =" in
2046 [global] to point at it.
2047
2048 A minimal printcap file would look something like this:
2049
2050 print1|My Printer 1
2051 .br
2052 print2|My Printer 2
2053 .br
2054 print3|My Printer 3
2055 .br
2056 print4|My Printer 4
2057 .br
2058 print5|My Printer 5
2059
2060 where the | separates aliases of a printer. The fact that the second
2061 alias has a space in it gives a hint to Samba that it's a comment.
2062
2063 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2064 will assume the file is in AIX "qconfig" format if the string
2065 "/qconfig" appears in the printcap filename.
2066
2067 .B Default:
2068         printcap name = /etc/printcap
2069
2070 .B Example:
2071         printcap name = /etc/myprintcap
2072 .SS printer (S)
2073 A synonym for this parameter is 'printer name'.
2074
2075 This parameter specifies the name of the printer to which print jobs spooled
2076 through a printable service will be sent.
2077
2078 If specified in the [global] section, the printer name given will be used
2079 for any printable service that does not have its own printer name specified.
2080
2081 .B Default:
2082         none (but may be 'lp' on many systems)
2083
2084 .B Example:
2085         printer name = laserwriter
2086
2087 .SS printer driver (S)
2088 This option allows you to control the string that clients receive when
2089 they ask the server for the printer driver associated with a
2090 printer. If you are using Windows95 or WindowsNT then you can use this
2091 to automate the setup of printers on your system.
2092
2093 You need to set this parameter to the exact string (case sensitive)
2094 that describes the appropriate printer driver for your system. 
2095 If you don't know the exact string to use then you should first try
2096 with no "printer driver" option set and the client will give you a
2097 list of printer drivers. The appropriate strings are shown in a
2098 scrollbox after you have chosen the printer manufacturer.
2099
2100 .B Example:
2101         printer driver = HP LaserJet 4L
2102
2103 .SS printer name (S)
2104 See
2105 .B printer.
2106
2107 .SS protocol (G)
2108 The value of the parameter (a string) is the highest protocol level that will
2109 be supported by the server. 
2110
2111 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
2112 merits of each are discussed in the README file.
2113
2114 Normally this option should not be set as the automatic negotiation
2115 phase in the SMB protocol takes care of choosing the appropriate protocol.
2116
2117 .B Default:
2118         protocol = NT1
2119
2120 .B Example:
2121         protocol = LANMAN1
2122 .SS public (S)
2123 A synonym for this parameter is 'guest ok'.
2124
2125 If this parameter is 'yes' for a service, then no password is required
2126 to connect to the service. Privileges will be those of the guest
2127 account.
2128
2129 See the section below on user/password validation for more information about
2130 this option.
2131
2132 .B Default:
2133         public = no
2134
2135 .B Example:
2136         public = yes
2137 .SS read list (S)
2138 This is a list of users that are given read-only access to a
2139 service. If the connecting user is in this list then they will
2140 not be given write access, no matter what the "read only" option
2141 is set to. The list can include group names using the @group syntax.
2142
2143 See also the "write list" option
2144
2145 .B Default:
2146      read list =
2147
2148 .B Example:
2149      read list = mary, @students
2150
2151 .SS read only (S)
2152 See
2153 .B writable
2154 and
2155 .B write ok.
2156 Note that this is an inverted synonym for writable and write ok.
2157 .SS read prediction (G)
2158 This options enables or disables the read prediction code used to
2159 speed up reads from the server. When enabled the server will try to
2160 pre-read data from the last accessed file that was opened read-only
2161 while waiting for packets.
2162
2163 .SS Default:
2164         read prediction = False
2165
2166 .SS Example:
2167         read prediction = True
2168 .SS read raw (G)
2169 This parameter controls whether or not the server will support raw reads when
2170 transferring data to clients.
2171
2172 If enabled, raw reads allow reads of 65535 bytes in one packet. This
2173 typically provides a major performance benefit.
2174
2175 However, some clients either negotiate the allowable block size incorrectly
2176 or are incapable of supporting larger block sizes, and for these clients you
2177 may need to disable raw reads.
2178
2179 In general this parameter should be viewed as a system tuning tool and left
2180 severely alone. See also
2181 .B write raw.
2182
2183 .B Default:
2184         read raw = yes
2185
2186 .B Example:
2187         read raw = no
2188 .SS read size (G)
2189
2190 The option "read size" affects the overlap of disk reads/writes with
2191 network reads/writes. If the amount of data being transferred in
2192 several of the SMB commands (currently SMBwrite, SMBwriteX and
2193 SMBreadbraw) is larger than this value then the server begins writing
2194 the data before it has received the whole packet from the network, or
2195 in the case of SMBreadbraw, it begins writing to the network before
2196 all the data has been read from disk.
2197
2198 This overlapping works best when the speeds of disk and network access
2199 are similar, having very little effect when the speed of one is much
2200 greater than the other.
2201
2202 The default value is 2048, but very little experimentation has been
2203 done yet to determine the optimal value, and it is likely that the best
2204 value will vary greatly between systems anyway. A value over 65536 is
2205 pointless and will cause you to allocate memory unnecessarily.
2206
2207 .B Default:
2208         read size = 2048
2209
2210 .B Example:
2211         read size = 8192
2212
2213 .SS remote announce (G)
2214
2215 This option allows you to setup nmbd to periodically announce itself
2216 to arbitrary IP addresses with an arbitrary workgroup name. 
2217
2218 This is useful if you want your Samba server to appear in a remote
2219 workgroup for which the normal browse propagation rules don't
2220 work. The remote workgroup can be anywhere that you can send IP
2221 packets to.
2222
2223 For example:
2224
2225        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
2226
2227 the above line would cause nmbd to announce itself to the two given IP
2228 addresses using the given workgroup names. If you leave out the
2229 workgroup name then the one given in the "workgroup" option is used
2230 instead. 
2231
2232 The IP addresses you choose would normally be the broadcast addresses
2233 of the remote networks, but can also be the IP addresses of known
2234 browse masters if your network config is that stable.
2235
2236 This option replaces similar functionality from the nmbd lmhosts file.
2237
2238 .SS revalidate (S)
2239
2240 This options controls whether Samba will allow a previously validated
2241 username/password pair to be used to attach to a share. Thus if you
2242 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
2243 automatically allow the client to request connection to the second
2244 share as the same username as the first without a password.
2245
2246 If "revalidate" is True then the client will be denied automatic
2247 access as the same username.
2248
2249 .B Default:
2250         revalidate = False
2251
2252 .B Example:
2253         revalidate = True
2254
2255 .SS root (G)
2256 See
2257 .B root directory.
2258 .SS root dir (G)
2259 See
2260 .B root directory.
2261 .SS root directory (G)
2262 Synonyms for this parameter are 'root dir' and 'root'.
2263
2264 The server will chroot() to this directory on startup. This is not 
2265 strictly necessary for secure operation. Even without it the server
2266 will deny access to files not in one of the service entries. It may 
2267 also check for, and deny access to, soft links to other parts of the 
2268 filesystem, or attempts to use .. in file names to access other 
2269 directories (depending on the setting of the "wide links" parameter).
2270
2271 Adding a "root dir" entry other than "/" adds an extra level of security, 
2272 but at a price. It absolutely ensures that no access is given to files not
2273 in the sub-tree specified in the "root dir" option, *including* some files 
2274 needed for complete operation of the server. To maintain full operability
2275 of the server you will need to mirror some system files into the "root dir"
2276 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
2277 and any binaries or configuration files needed for printing (if required). 
2278 The set of files that must be mirrored is operating system dependent.
2279
2280 .B Default:
2281         root directory = /
2282
2283 .B Example:
2284         root directory = /homes/smb
2285 .SS security (G)
2286 This option affects how clients respond to Samba.
2287
2288 The option sets the "security mode bit" in replies to protocol negotiations
2289 to turn share level security on or off. Clients decide based on this bit 
2290 whether (and how) to transfer user and password information to the server.
2291
2292 The default is "security=SHARE", mainly because that was the only
2293 option at one stage.
2294
2295 The alternatives are "security = user" or "security = server". 
2296
2297 If your PCs use usernames that are the same as their usernames on the
2298 UNIX machine then you will want to use "security = user". If you
2299 mostly use usernames that don't exist on the UNIX box then use
2300 "security = share".
2301
2302 There is a bug in WfWg that may affect your decision. When in user
2303 level security a WfWg client will totally ignore the password you type
2304 in the "connect drive" dialog box. This makes it very difficult (if
2305 not impossible) to connect to a Samba service as anyone except the
2306 user that you are logged into WfWg as.
2307
2308 If you use "security = server" then Samba will try to validate the
2309 username/password by passing it to another SMB server, such as an NT
2310 box. If this fails it will revert to "security = USER".
2311
2312 See the "password server" option for more details.
2313
2314 .B Default:
2315         security = SHARE
2316
2317 .B Example:
2318         security = USER
2319 .SS server string (G)
2320 This controls what string will show up in the printer comment box in
2321 print manager and next to the IPC connection in "net view". It can be
2322 any string that you wish to show to your users.
2323
2324 It also sets what will appear in browse lists next to the machine name.
2325
2326 A %v will be replaced with the Samba version number.
2327
2328 A %h will be replaced with the hostname.
2329
2330 .B Default:
2331         server string = Samba %v
2332
2333 .B Example:
2334         server string = University of GNUs Samba Server
2335
2336 .SS smbrun (G)
2337 This sets the full path to the smbrun binary. This defaults to the
2338 value in the Makefile.
2339
2340 You must get this path right for many services to work correctly.
2341
2342 .B Default:
2343 taken from Makefile
2344
2345 .B Example:
2346         smbrun = /usr/local/samba/bin/smbrun
2347
2348 .SS short preserve case (S)
2349
2350 This controls if new short filenames are created with the case that
2351 the client passes, or if they are forced to be the "default" case.
2352
2353 .B Default:
2354        short preserve case = no
2355
2356 See the section on "NAME MANGLING" for a fuller discussion.
2357
2358 .SS root preexec (S)
2359
2360 This is the same as preexec except that the command is run as
2361 root. This is useful for mounting filesystems (such as cdroms) before
2362 a connection is finalised.
2363
2364 .SS root postexec (S)
2365
2366 This is the same as postexec except that the command is run as
2367 root. This is useful for unmounting filesystems (such as cdroms) after
2368 a connection is closed.
2369
2370 .SS set directory (S)
2371 If 'set directory = no', then users of the service may not use the setdir
2372 command to change directory.
2373
2374 The setdir command is only implemented in the Digital Pathworks client. See the
2375 Pathworks documentation for details.
2376
2377 .B Default:
2378         set directory = no
2379
2380 .B Example:
2381         set directory = yes
2382
2383 .SS share modes (S)
2384
2385 This enables or disables the honouring of the "share modes" during a
2386 file open. These modes are used by clients to gain exclusive read or
2387 write access to a file. 
2388
2389 These open modes are not directly supported by UNIX, so they are
2390 simulated using lock files in the "lock directory". The "lock
2391 directory" specified in smb.conf must be readable by all users.
2392
2393 The share modes that are enabled by this option are DENY_DOS,
2394 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
2395
2396 Enabling this option gives full share compatibility but may cost a bit
2397 of processing time on the UNIX server. They are enabled by default.
2398
2399 .B Default:
2400         share modes = yes
2401
2402 .B Example:
2403         share modes = no
2404
2405 .SS socket address (G)
2406
2407 This option allows you to control what address Samba will listen for
2408 connections on. This is used to support multiple virtual interfaces on
2409 the one server, each with a different configuration.
2410
2411 By default samba will accept connections on any address.
2412
2413 .B Example:
2414         socket address = 192.168.2.20
2415
2416 .SS socket options (G)
2417 This option (which can also be invoked with the -O command line
2418 option) allows you to set socket options to be used when talking with
2419 the client.
2420
2421 Socket options are controls on the networking layer of the operating
2422 systems which allow the connection to be tuned.
2423
2424 This option will typically be used to tune your Samba server for
2425 optimal performance for your local network. There is no way that Samba
2426 can know what the optimal parameters are for your net, so you must
2427 experiment and choose them yourself. I strongly suggest you read the
2428 appropriate documentation for your operating system first (perhaps
2429 "man setsockopt" will help).
2430
2431 You may find that on some systems Samba will say "Unknown socket
2432 option" when you supply an option. This means you either mis-typed it
2433 or you need to add an include file to includes.h for your OS. If the
2434 latter is the case please send the patch to me
2435 (samba-bugs@samba.anu.edu.au).
2436
2437 Any of the supported socket options may be combined in any way you
2438 like, as long as your OS allows it.
2439
2440 This is the list of socket options currently settable using this
2441 option:
2442
2443   SO_KEEPALIVE
2444
2445   SO_REUSEADDR
2446
2447   SO_BROADCAST
2448
2449   TCP_NODELAY
2450
2451   IPTOS_LOWDELAY
2452
2453   IPTOS_THROUGHPUT
2454
2455   SO_SNDBUF *
2456
2457   SO_RCVBUF *
2458
2459   SO_SNDLOWAT *
2460
2461   SO_RCVLOWAT *
2462
2463 Those marked with a * take an integer argument. The others can
2464 optionally take a 1 or 0 argument to enable or disable the option, by
2465 default they will be enabled if you don't specify 1 or 0.
2466
2467 To specify an argument use the syntax SOME_OPTION=VALUE for example
2468 SO_SNDBUF=8192. Note that you must not have any spaces before or after
2469 the = sign.
2470
2471 If you are on a local network then a sensible option might be
2472
2473 socket options = IPTOS_LOWDELAY
2474
2475 If you have an almost unloaded local network and you don't mind a lot
2476 of extra CPU usage in the server then you could try
2477
2478 socket options = IPTOS_LOWDELAY TCP_NODELAY
2479
2480 If you are on a wide area network then perhaps try setting
2481 IPTOS_THROUGHPUT. 
2482
2483 Note that several of the options may cause your Samba server to fail
2484 completely. Use these options with caution!
2485
2486 .B Default:
2487         no socket options
2488
2489 .B Example:
2490         socket options = IPTOS_LOWDELAY 
2491
2492
2493
2494
2495 .SS status (G)
2496 This enables or disables logging of connections to a status file that
2497 .B smbstatus
2498 can read.
2499
2500 With this disabled
2501 .B smbstatus
2502 won't be able to tell you what
2503 connections are active.
2504
2505 .B Default:
2506         status = yes
2507
2508 .B Example:
2509         status = no
2510
2511 .SS strip dot (G)
2512 This is a boolean that controls whether to strip trailing dots off
2513 filenames. This helps with some CDROMs that have filenames ending in a
2514 single dot.
2515
2516 NOTE: This option is now obsolete, and may be removed in future. You
2517 should use the "mangled map" option instead as it is much more
2518 general. 
2519
2520 .SS strict locking (S)
2521 This is a boolean that controls the handling of file locking in the
2522 server. When this is set to yes the server will check every read and
2523 write access for file locks, and deny access if locks exist. This can
2524 be slow on some systems.
2525
2526 When strict locking is "no" the server does file lock checks only when
2527 the client explicitly asks for them. 
2528
2529 Well behaved clients always ask for lock checks when it is important,
2530 so in the vast majority of cases "strict locking = no" is preferable.
2531
2532 .B Default:
2533         strict locking = no
2534
2535 .B Example:
2536         strict locking = yes
2537
2538 .SS sync always (S)
2539
2540 This is a boolean parameter that controls whether writes will always
2541 be written to stable storage before the write call returns. If this is
2542 false then the server will be guided by the client's request in each
2543 write call (clients can set a bit indicating that a particular write
2544 should be synchronous). If this is true then every write will be
2545 followed by a fsync() call to ensure the data is written to disk.
2546
2547 .B Default:
2548         sync always = no
2549
2550 .B Example:
2551         sync always = yes
2552
2553 .SS time offset (G)
2554 This parameter is a setting in minutes to add to the normal GMT to
2555 local time conversion. This is useful if you are serving a lot of PCs
2556 that have incorrect daylight saving time handling.
2557
2558 .B Default:
2559         time offset = 0
2560
2561 .B Example:
2562         time offset = 60
2563
2564 .SS user (S)
2565 See
2566 .B username.
2567 .SS username (S)
2568 A synonym for this parameter is 'user'.
2569
2570 Multiple users may be specified in a comma-delimited list, in which case the
2571 supplied password will be tested against each username in turn (left to right).
2572
2573 The username= line is needed only when the PC is unable to supply its own
2574 username. This is the case for the coreplus protocol or where your
2575 users have different WfWg usernames to UNIX usernames. In both these
2576 cases you may also be better using the \e\eserver\eshare%user syntax
2577 instead. 
2578
2579 The username= line is not a great solution in many cases as it means Samba
2580 will try to validate the supplied password against each of the
2581 usernames in the username= line in turn. This is slow and a bad idea for
2582 lots of users in case of duplicate passwords. You may get timeouts or
2583 security breaches using this parameter unwisely.
2584
2585 Samba relies on the underlying UNIX security. This parameter does not
2586 restrict who can login, it just offers hints to the Samba server as to
2587 what usernames might correspond to the supplied password. Users can
2588 login as whoever they please and they will be able to do no more
2589 damage than if they started a telnet session. The daemon runs as the
2590 user that they log in as, so they cannot do anything that user cannot
2591 do.
2592
2593 To restrict a service to a particular set of users you can use the
2594 "valid users=" line.
2595
2596 If any of the usernames begin with a @ then the name will be looked up
2597 in the groups file and will expand to a list of all users in the group
2598 of that name. Note that searching though a groups file can take quite
2599 some time, and some clients may time out during the search.
2600
2601 See the section below on username/password validation for more information
2602 on how this parameter determines access to the services.
2603
2604 .B Default:
2605         The guest account if a guest service, else the name of the service.
2606
2607 .B Examples:
2608         username = fred
2609         username = fred, mary, jack, jane, @users, @pcgroup
2610
2611 .SS username map (G)
2612
2613 This option allows you to to specify a file containing a mapping of
2614 usernames from the clients to the server. This can be used for several
2615 purposes. The most common is to map usernames that users use on DOS or
2616 Windows machines to those that the UNIX box uses. The other is to map
2617 multiple users to a single username so that they can more easily share
2618 files.
2619
2620 The map file is parsed line by line. Each line should contain a single
2621 UNIX username on the left then a '=' followed by a list of usernames
2622 on the right. The list of usernames on the right may contain names of
2623 the form @group in which case they will match any UNIX username in
2624 that group. The special client name '*' is a wildcard and matches any
2625 name.
2626
2627 The file is processed on each line by taking the supplied username and
2628 comparing it with each username on the right hand side of the '='
2629 signs. If the supplied name matches any of the names on the right
2630 hand side then it is replaced with the name on the left. Processing
2631 then continues with the next line.
2632
2633 If any line begins with a '#' or a ';' then it is ignored
2634
2635 For example to map from the name "admin" or "administrator" to the UNIX
2636 name "root" you would use
2637
2638         root = admin administrator
2639
2640 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
2641 would use
2642
2643         sys = @system
2644
2645 You can have as many mappings as you like in a username map file.
2646
2647 Note that the remapping is applied to all occurrences of
2648 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
2649 remapped to "mary" then you will actually be connecting to
2650 "\e\eserver\emary" and will need to supply a password suitable for
2651 "mary" not "fred". The only exception to this is the username passed
2652 to the "password server" (if you have one). The password server will
2653 receive whatever username the client supplies without modification.
2654
2655 Also note that no reverse mapping is done. The main effect this has is
2656 with printing. Users who have been mapped may have trouble deleting
2657 print jobs as PrintManager under WfWg will think they don't own the
2658 print job.
2659
2660 .B Default
2661         no username map
2662
2663 .B Example
2664         username map = /usr/local/samba/lib/users.map
2665
2666 .SS valid chars (S)
2667
2668 The option allows you to specify additional characters that should be
2669 considered valid by the server in filenames. This is particularly
2670 useful for national character sets, such as adding u-umlaut or a-ring.
2671
2672 The option takes a list of characters in either integer or character
2673 form with spaces between them. If you give two characters with a colon
2674 between them then it will be taken as an lowercase:uppercase pair.
2675
2676 If you have an editor capable of entering the characters into the
2677 config file then it is probably easiest to use this method. Otherwise
2678 you can specify the characters in octal, decimal or hexadecimal form
2679 using the usual C notation.
2680
2681 For example to add the single character 'Z' to the charset (which is a
2682 pointless thing to do as it's already there) you could do one of the
2683 following
2684
2685 valid chars = Z
2686 valid chars = z:Z
2687 valid chars = 0132:0172
2688
2689 The last two examples above actually add two characters, and alter
2690 the uppercase and lowercase mappings appropriately.
2691
2692 .B Default
2693 .br
2694         Samba defaults to using a reasonable set of valid characters
2695 .br
2696         for english systems
2697
2698 .B Example
2699         valid chars = 0345:0305 0366:0326 0344:0304
2700
2701 The above example allows filenames to have the swedish characters in
2702 them. 
2703
2704 NOTE: It is actually quite difficult to correctly produce a "valid
2705 chars" line for a particular system. To automate the process
2706 tino@augsburg.net has written a package called "validchars" which will
2707 automatically produce a complete "valid chars" line for a given client
2708 system. Look in the examples subdirectory for this package.
2709
2710 .SS valid users (S)
2711 This is a list of users that should be allowed to login to this
2712 service. A name starting with @ is interpreted as a UNIX group.
2713
2714 If this is empty (the default) then any user can login. If a username
2715 is in both this list and the "invalid users" list then access is
2716 denied for that user.
2717
2718 The current servicename is substituted for %S. This is useful in the
2719 [homes] section.
2720
2721 See also "invalid users"
2722
2723 .B Default
2724         No valid users list. (anyone can login)
2725
2726 .B Example
2727         valid users = greg, @pcusers
2728
2729 .SS volume (S)
2730 This allows you to override the volume label returned for a
2731 share. Useful for CDROMs with installation programs that insist on a
2732 particular volume label.
2733
2734 The default is the name of the share
2735
2736 .SS wide links (S)
2737 This parameter controls whether or not links in the UNIX file system may be
2738 followed by the server. Links that point to areas within the directory tree
2739 exported by the server are always allowed; this parameter controls access 
2740 only to areas that are outside the directory tree being exported.
2741
2742 .B Default:
2743         wide links = yes
2744
2745 .B Example:
2746         wide links = no
2747
2748 .SS wins proxy (G)
2749
2750 This is a boolean that controls if nmbd will respond to broadcast name
2751 queries on behalf of other hosts. You may need to set this to no for
2752 some older clients.
2753
2754 .B Default:
2755         wins proxy = no
2756 .SS wins support (G)
2757
2758 This boolean controls if Samba will act as a WINS server. You should
2759 normally set this to true unless you already have another WINS server
2760 on the network.
2761
2762 .B Default:
2763         wins support = yes
2764 .SS wins server (G)
2765
2766 This specifies the DNS name of the WINS server that Samba should
2767 register with. If you have a WINS server on your network then you
2768 should set this to the WINS servers name.
2769
2770 This option only takes effect if Samba is not acting as a WINS server
2771 itself. 
2772
2773 .B Default:
2774         wins server = 
2775 .SS workgroup (G)
2776
2777 This controls what workgroup your server will appear to be in when
2778 queried by clients. 
2779
2780 .B Default:
2781         set in the Makefile
2782
2783 .B Example:
2784         workgroup = MYGROUP
2785
2786 .SS write ok (S)
2787 See
2788 .B writable
2789 and
2790 .B read only.
2791 .SS writable (S)
2792 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
2793
2794 If this parameter is 'no', then users of a service may not create or modify
2795 files in the service's directory.
2796
2797 Note that a printable service ('printable = yes') will ALWAYS allow 
2798 writing to the directory (user privileges permitting), but only via
2799 spooling operations.
2800
2801 .B Default:
2802         writable = no
2803
2804 .B Examples:
2805         read only = no
2806         writable = yes
2807         write ok = yes
2808 .SS write list (S)
2809 This is a list of users that are given read-write access to a
2810 service. If the connecting user is in this list then they will be
2811 given write access, no matter what the "read only" option is set
2812 to. The list can include group names using the @group syntax.
2813
2814 Note that if a user is in both the read list and the write list then
2815 they will be given write access.
2816
2817 See also the "read list" option
2818
2819 .B Default:
2820      write list =
2821
2822 .B Example:
2823      write list = admin, root, @staff
2824
2825 .SS write raw (G)
2826 This parameter controls whether or not the server will support raw writes when
2827 transferring data from clients.
2828
2829 .B Default:
2830         write raw = yes
2831
2832 .B Example:
2833         write raw = no
2834 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
2835 There are a number of ways in which a user can connect to a
2836 service. The server follows the following steps in determining if it
2837 will allow a connection to a specified service. If all the steps fail
2838 then the connection request is rejected. If one of the steps pass then
2839 the following steps are not checked.
2840
2841 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
2842
2843 Step 1: If the client has passed a username/password pair and that
2844 username/password pair is validated by the UNIX system's password
2845 programs then the connection is made as that username. Note that this
2846 includes the \e\eserver\eservice%username method of passing a username.
2847
2848 Step 2: If the client has previously registered a username with the
2849 system and now supplies a correct password for that username then the
2850 connection is allowed.
2851
2852 Step 3: The client's netbios name and any previously used user names
2853 are checked against the supplied password, if they match then the
2854 connection is allowed as the corresponding user.
2855
2856 Step 4: If the client has previously validated a username/password
2857 pair with the server and the client has passed the validation token
2858 then that username is used. This step is skipped if "revalidate = yes" 
2859 for this service.
2860
2861 Step 5: If a "user = " field is given in the smb.conf file for the
2862 service and the client has supplied a password, and that password
2863 matches (according to the UNIX system's password checking) with one of
2864 the usernames from the user= field then the connection is made as the
2865 username in the "user=" line. If one of the username in the user= list
2866 begins with a @ then that name expands to a list of names in the group
2867 of the same name.
2868
2869 Step 6: If the service is a guest service then a connection is made as
2870 the username given in the "guest account =" for the service,
2871 irrespective of the supplied password.
2872 .SH WARNINGS
2873 Although the configuration file permits service names to contain spaces, 
2874 your client software may not. Spaces will be ignored in comparisons anyway,
2875 so it shouldn't be a problem - but be aware of the possibility.
2876
2877 On a similar note, many clients - especially DOS clients - limit service
2878 names to eight characters. Smbd has no such limitation, but attempts
2879 to connect from such clients will fail if they truncate the service names.
2880 For this reason you should probably keep your service names down to eight 
2881 characters in length.
2882
2883 Use of the [homes] and [printers] special sections make life for an 
2884 administrator easy, but the various combinations of default attributes can be
2885 tricky. Take extreme care when designing these sections. In particular,
2886 ensure that the permissions on spool directories are correct.
2887 .SH VERSION
2888 This man page is (mostly) correct for version 1.9.00 of the Samba suite, plus some
2889 of the recent patches to it. These notes will necessarily lag behind 
2890 development of the software, so it is possible that your version of 
2891 the server has extensions or parameter semantics that differ from or are not 
2892 covered by this man page. Please notify these to the address below for 
2893 rectification.
2894
2895 Prior to version 1.5.21 of the Samba suite, the configuration file was
2896 radically different (more primitive). If you are using a version earlier than
2897 1.8.05, it is STRONGLY recommended that you upgrade.
2898 .SH OPTIONS
2899 Not applicable.
2900 .SH FILES
2901 Not applicable.
2902 .SH ENVIRONMENT VARIABLES
2903 Not applicable.
2904 .SH SEE ALSO
2905 .BR smbd (8),
2906 .BR smbclient (1),
2907 .BR nmbd (8),
2908 .BR testparm (1), 
2909 .BR testprns (1),
2910 .BR lpq (1),
2911 .BR hosts_access (5)
2912 .SH DIAGNOSTICS
2913 [This section under construction]
2914
2915 Most diagnostics issued by the server are logged in a specified log file. The
2916 log file name is specified at compile time, but may be overridden on the
2917 smbd command line (see
2918 .BR smbd (8)).
2919
2920 The number and nature of diagnostics available depends on the debug level used
2921 by the server. If you have problems, set the debug level to 3 and peruse the
2922 log files.
2923
2924 Most messages are reasonably self-explanatory. Unfortunately, at time of
2925 creation of this man page the source code is still too fluid to warrant
2926 describing each and every diagnostic. At this stage your best bet is still
2927 to grep the source code and inspect the conditions that gave rise to the 
2928 diagnostics you are seeing.
2929 .SH BUGS
2930 None known.
2931
2932 Please send bug reports, comments and so on to:
2933
2934 .RS 3
2935 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
2936
2937 .RS 3
2938 or to the mailing list:
2939 .RE
2940
2941 .B samba@listproc.anu.edu.au
2942
2943 .RE
2944 You may also like to subscribe to the announcement channel:
2945
2946 .RS 3
2947 .B samba-announce@listproc.anu.edu.au
2948 .RE
2949
2950 To subscribe to these lists send a message to
2951 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
2952 Name" or "subscribe samba-announce Your Name".
2953
2954 Errors or suggestions for improvements to the Samba man pages should be 
2955 mailed to:
2956
2957 .RS 3
2958 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
2959 .RE
2960