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