preparing for release of 1.9.18alpha12
[jra/samba/.git] / docs / manpages / smb.conf.5
1 .TH SMB.CONF 5 "28 Nov 1997" "smb.conf 1.9.18alpha12"
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 %N = the name of your NIS home directory server.  This is obtained from
270 your NIS auto.map entry.  If you have not compiled Samba with -DAUTOMOUNT
271 then this value will be the same as %L.
272
273 %d = The process id of the current server process
274
275 %a = the architecture of the remote machine. Only some are recognised,
276 and those may not be 100% reliable. It currently recognises Samba,
277 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
278 gets it wrong then sending me a level 3 log should allow me to fix it.
279
280 %I = The IP address of the client machine
281
282 %T = the current date and time
283
284 There are some quite creative things that can be done with these
285 substitutions and other smb.conf options.
286
287 .SS NAME MANGLING
288
289 Samba supports "name mangling" so that DOS and Windows clients can use
290 files that don't conform to the 8.3 format. It can also be set to adjust
291 the case of 8.3 format filenames.
292
293 There are several options that control the way mangling is performed,
294 and they are grouped here rather than listed separately. For the
295 defaults look at the output of the testparm program.
296
297 All of these options can be set separately for each service (or
298 globally, of course).
299
300 The options are:
301
302 "mangle case = yes/no" controls if names that have characters that
303 aren't of the "default" case are mangled. For example, if this is yes
304 then a name like "Mail" would be mangled. Default no.
305
306 "case sensitive = yes/no" controls whether filenames are case
307 sensitive. If they aren't then Samba must do a filename search and
308 match on passed names. Default no.
309
310 "default case = upper/lower" controls what the default case is for new
311 filenames. Default lower.
312
313 "preserve case = yes/no" controls if new files are created with the
314 case that the client passes, or if they are forced to be the "default"
315 case. Default no.
316
317 "short preserve case = yes/no" controls if new files which conform to 8.3
318 syntax, that is all in upper case and of suitable length, are created
319 upper case, or if they are forced to be the "default" case. This option can
320 be use with "preserve case = yes" to permit long filenames to retain their
321 case, while short names are lowered. Default no.
322
323 .SS COMPLETE LIST OF GLOBAL PARAMETERS
324
325 Here is a list of all global parameters. See the section of each
326 parameter for details.  Note that some are synonyms.
327
328 announce as
329
330 announce version
331
332 auto services
333
334 bind interfaces only
335
336 browse list
337
338 character set
339
340 client code page
341
342 config file
343
344 deadtime
345
346 debuglevel
347
348 default
349
350 default service
351
352 dfree command
353
354 dns proxy
355
356 domain allow hosts
357
358 domain controller
359
360 domain deny hosts
361
362 domain group
363
364 domain hosts allow
365
366 domain hosts deny
367
368 domain logons
369
370 domain master
371
372 domain sid
373
374 encrypt passwords
375
376 getwd cache
377
378 hide files
379
380 hide dot files
381
382 homedir map
383
384 hosts equiv
385
386 include
387
388 interfaces
389
390 keepalive
391
392 lock dir
393
394 load printers
395
396 local master
397
398 lock directory
399
400 log file
401
402 log level
403
404 logon drive
405
406 logon home
407
408 logon path
409
410 logon script
411
412 lpq cache time
413
414 mangled stack
415
416 max log size
417
418 max mux
419
420 max packet
421
422 max ttl
423
424 max xmit
425
426 message command
427
428 netbios aliases
429
430 netbios name
431
432 nis homedir
433
434 null passwords
435
436 os level
437
438 packet size
439
440 passwd chat
441
442 passwd program
443
444 password level
445
446 password server
447
448 preferred master
449
450 preload
451
452 printing
453
454 printcap name
455
456 printer driver file
457
458 protocol
459
460 read bmpx
461
462 read prediction
463
464 read raw
465
466 read size
467
468 remote announce
469
470 remote browse sync
471
472 root
473
474 root dir
475
476 root directory
477
478 security
479
480 server string
481
482 shared file entries
483
484 shared mem size
485
486 smb passwd file
487
488 smbrun
489
490 socket address
491
492 socket options
493
494 status
495
496 strip dot
497
498 syslog
499
500 syslog only
501
502 time offset
503
504 time server
505
506 unix realname
507
508 username level
509
510 username map
511
512 use rhosts
513
514 valid chars
515
516 veto files
517
518 workgroup
519
520 write raw
521
522 .SS COMPLETE LIST OF SERVICE PARAMETERS
523
524 Here is a list of all service parameters. See the section of each
525 parameter for details. Note that some are synonyms.
526
527 admin users
528
529 allow hosts
530
531 alternate permissions
532
533 available
534
535 browseable
536
537 case sensitive
538
539 case sig names
540
541 copy
542
543 create mask
544
545 create mode
546
547 comment
548
549 default case
550
551 delete readonly
552
553 delete veto files
554
555 deny hosts
556
557 directory
558
559 directory mask
560
561 directory mode
562
563 dont descend
564
565 dos filetimes
566
567 exec
568
569 fake oplocks
570
571 follow symlinks
572
573 force create mode
574
575 force directory mode
576
577 force group
578
579 force user
580
581 guest account
582
583 guest ok
584
585 guest only
586
587 hide dot files
588
589 hosts allow
590
591 hosts deny
592
593 invalid users
594
595 locking
596
597 lppause command
598
599 lpq command
600
601 lpresume command
602
603 lprm command
604
605 magic output
606
607 magic script
608
609 mangle case
610
611 mangled names
612
613 mangling char
614
615 map archive
616
617 map hidden
618
619 map system
620
621 max connections
622
623 min print space
624
625 only guest
626
627 only user
628
629 oplocks
630
631 path
632
633 postexec
634
635 postscript
636
637 preserve case
638
639 print command
640
641 printer driver
642
643 printer driver location
644
645 print ok
646
647 printable
648
649 printer
650
651 printer name
652
653 public
654
655 read only
656
657 read list
658
659 revalidate
660
661 root postexec
662
663 root preexec
664
665 set directory
666
667 share modes
668
669 short preserve case
670
671 strict locking
672
673 sync always
674
675 user
676
677 username
678
679 users
680
681 valid users
682
683 volume
684
685 wide links
686
687 writable
688
689 write ok
690
691 writeable
692
693 write list
694
695 .SS EXPLANATION OF EACH PARAMETER
696 .RS 3
697
698 .SS admin users (S)
699
700 This is a list of users who will be granted administrative privileges
701 on the share. This means that they will do all file operations as the
702 super-user (root).
703
704 You should use this option very carefully, as any user in this list
705 will be able to do anything they like on the share, irrespective of
706 file permissions.
707
708 .B Default:
709         no admin users
710
711 .B Example:
712         admin users = jason
713
714 .SS announce as (G)
715
716 This specifies what type of server nmbd will announce itself as in
717 browse lists. By default this is set to Windows NT. The valid options
718 are "NT", "Win95" or "WfW" meaining Windows NT, Windows 95 and
719 Windows for Workgroups respectively. Do not change this parameter
720 unless you have a specific need to stop Samba appearing as an NT
721 server as this may prevent Samba servers from participating as
722 browser servers correctly.
723
724 .B Default:
725     announce as = NT
726
727 .B Example
728     announce as = Win95
729
730 .SS announce version (G)
731
732 This specifies the major and minor version numbers that nmbd
733 will use when announcing itself as a server. The default is 4.2.
734 Do not change this parameter unless you have a specific need to
735 set a Samba server to be a downlevel server.
736
737 .B Default:
738    announce version = 4.2
739
740 .B Example:
741    announce version = 2.0
742
743 .SS auto services (G)
744 This is a list of services that you want to be automatically added to
745 the browse lists. This is most useful for homes and printers services
746 that would otherwise not be visible.
747
748 Note that if you just want all printers in your printcap file loaded
749 then the "load printers" option is easier.
750
751 .B Default:
752         no auto services
753
754 .B Example:
755         auto services = fred lp colorlp
756
757 .SS allow hosts (S)
758 A synonym for this parameter is 'hosts allow'.
759
760 This parameter is a comma delimited set of hosts which are permitted to access
761 a service. 
762
763 If specified in the [global] section then it will apply to all
764 services, regardless of whether the individual service has a different
765 setting. 
766
767 You can specify the hosts by name or IP number. For example, you could
768 restrict access to only the hosts on a Class C subnet with something like
769 "allow hosts = 150.203.5.". The full syntax of the list is described in
770 the man page
771 .BR hosts_access (5).
772
773 You can also specify hosts by network/netmask pairs and by netgroup
774 names if your system supports netgroups. The EXCEPT keyword can also
775 be used to limit a wildcard list. The following examples may provide
776 some help:
777
778 Example 1: allow all IPs in 150.203.*.* except one
779
780         hosts allow = 150.203. EXCEPT 150.203.6.66
781
782 Example 2: allow hosts that match the given network/netmask
783
784         hosts allow = 150.203.15.0/255.255.255.0
785
786 Example 3: allow a couple of hosts
787
788         hosts allow = lapland, arvidsjaur
789
790 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
791 deny access from one particular host
792
793         hosts allow = @foonet, localhost
794         hosts deny = pirate
795
796 Note that access still requires suitable user-level passwords.
797
798 See
799 .BR testparm (1)
800 for a way of testing your host access to see if it
801 does what you expect.
802
803 .B Default:
804         none (i.e., all hosts permitted access)
805
806 .B Example:
807         allow hosts = 150.203.5. myhost.mynet.edu.au
808
809 .SS alternate permissions (S)
810
811 This option affects the way the "read only" DOS attribute is produced
812 for UNIX files. If this is false then the read only bit is set for
813 files on writeable shares which the user cannot write to.
814
815 If this is true then it is set for files whos user write bit is not set.
816
817 The latter behaviour is useful for when users copy files from each
818 others directories, and use a file manager that preserves
819 permissions. Without this option they may get annoyed as all copied
820 files will have the "read only" bit set.
821
822 .B Default:
823         alternate permissions = no
824
825 .B Example:
826         alternate permissions = yes
827
828 .SS available (S)
829 This parameter lets you 'turn off' a service. If 'available = no', then
830 ALL attempts to connect to the service will fail. Such failures are logged.
831
832 .B Default:
833         available = yes
834
835 .B Example:
836         available = no
837
838 .SS bind interfaces only (G)
839 This global parameter (new for 1.9.18) allows the Samba admin to limit
840 what interfaces on a machine will serve smb requests. If affects file service
841 (smbd) and name service (nmbd) in slightly different ways.
842
843 For name service it causes nmbd to bind to ports 137 and 138 on
844 the interfaces listed in the 'interfaces' parameter. nmbd also binds
845 to the 'all addresses' interface (0.0.0.0) on ports 137 and 138
846 for the purposes of reading broadcast messages. If this option is
847 not set then nmbd will service name requests on all of these
848 sockets. If "bind interfaces only" is set then nmbd will check
849 the source address of any packets coming in on the broadcast
850 sockets and discard any that don't match the broadcast addresses
851 of the interfaces in the 'interfaces' parameter list. As unicast
852 packets are received on the other sockets it allows nmbd to
853 refuse to serve names to machines that send packets that arrive
854 through any interfaces not listed in the 'interfaces' list.
855 IP Source address spoofing does defeat this simple check, however
856 so it must not be used seriously as a security feature for nmbd.
857
858 For file service it causes smbd to bind only to the interface
859 list given in the 'interfaces' parameter. This restricts the
860 networks that smbd will serve to packets coming in those interfaces.
861 Note that you should not use this parameter for machines that
862 are serving ppp or other intermittant or non-broadcast network
863 interfaces as it will not cope with non-permanent interfaces.
864
865 .B Default:
866        bind interfaces only = False
867
868 .B Example:
869        bind interfaces only = True
870
871 .SS browseable (S)
872 This controls whether this share is seen in the list of available
873 shares in a net view and in the browse list.
874
875 .B Default:
876         browseable = Yes
877
878 .B Example: 
879         browseable = No
880 .SS browse list(G)
881 This controls whether the smbd will serve a browse list to a client
882 doing a NetServerEnum call. Normally set to true. You should never
883 need to change this.
884
885 .B Default:
886         browse list = Yes
887
888 .SS case sensitive (G)
889 See the discussion on NAME MANGLING.
890
891 .SS case sig names (G)
892 See "case sensitive"
893
894 .SS character set (G)
895 This allows a smbd to map incoming characters from a DOS 850 Code page
896 to either a Western European (ISO8859-1) or Easter European (ISO8859-2)
897 code page. Normally not set, meaning no filename translation is done.
898
899 .B Default
900
901         character set =
902
903 .B Example
904
905         character set = iso8859-1
906
907 .SS client code page (G)
908 Currently (Samba 1.9.17 and above) this may be set to one of two
909 values, 850 or 437. It specifies the base DOS code page that the
910 clients accessing Samba are using. To determine this, open a DOS
911 command prompt and type the command "chcp". This will output the
912 code page. The default for USA MS-DOS, Windows 95, and Windows NT
913 releases is code page 437. The default for western european 
914 releases of the above operating systems is code page 850.
915
916 This parameter co-operates with the "valid chars" parameter in
917 determining what characters are valid in filenames and how
918 capitalization is done. It has been added as a convenience for
919 clients whose code page is either 437 or 850 so a convoluted
920 "valid chars" string does not have to be determined. If you
921 set both this parameter and the "valid chars" parameter the 
922 "client code page" parameter MUST be set before the "valid chars"
923 in the smb.conf file. The "valid chars" string will then augment
924 the character settings in the "client code page" parameter.
925
926 If "client code page" is set to a value other than 850 or 437
927 it will default to 850.
928
929 See also : "valid chars".
930
931 .B Default
932
933         client code page = 850
934
935 .B Example
936
937         client code page = 437
938
939 .SS comment (S)
940 This is a text field that is seen next to a share when a client does a
941 net view to list what shares are available.
942
943 If you want to set the string that is displayed next to the machine
944 name then see the server string command.
945
946 .B Default:
947         No comment string
948
949 .B Example:
950         comment = Fred's Files
951
952 .SS config file (G)
953
954 This allows you to override the config file to use, instead of the
955 default (usually smb.conf). There is a chicken and egg problem here as
956 this option is set in the config file! 
957
958 For this reason, if the name of the config file has changed when the
959 parameters are loaded then it will reload them from the new config
960 file.
961
962 This option takes the usual substitutions, which can be very useful.
963
964 If the config file doesn't exist then it won't be loaded (allowing
965 you to special case the config files of just a few clients).
966
967 .B Example:
968         config file = /usr/local/samba/lib/smb.conf.%m
969
970 .SS copy (S)
971 This parameter allows you to 'clone' service entries. The specified
972 service is simply duplicated under the current service's name. Any 
973 parameters specified in the current section will override those in the
974 section being copied.
975
976 This feature lets you set up a 'template' service and create similar 
977 services easily. Note that the service being copied must occur earlier 
978 in the configuration file than the service doing the copying.
979
980 .B Default:
981         none
982
983 .B Example:
984         copy = otherservice
985 .SS create mask (S)
986 A synonym for this parameter is 'create mode'.
987
988 When a file is created, the neccessary permissions are calculated
989 according to the mapping from DOS modes to UNIX permissions, and
990 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
991 This parameter may be thought of as a bit-wise MASK for the UNIX
992 modes of a file. Any bit *not* set here will be removed from the
993 modes set on a file when it is created.
994
995 The default value of this parameter removes the 'group' and 'other' 
996 write and execute bits from the UNIX modes.
997
998 Following this Samba will bit-wise 'OR' the UNIX mode created from
999 this parameter with the value of the "force create mode" parameter 
1000 which is set to 000 by default.
1001
1002 For Samba 1.9.17 and above this parameter no longer affects directory
1003 modes. See the parameter 'directory mode' for details.
1004
1005 See also the "force create mode" parameter for forcing particular
1006 mode bits to be set on created files.
1007 See also the "directory mode" parameter for masking mode bits on created
1008 directories.
1009
1010 .B Default:
1011         create mask = 0744
1012
1013 .B Example:
1014         create mask = 0775
1015 .SS create mode (S)
1016 See
1017 .B create mask.
1018
1019 .SS dead time (G)
1020 The value of the parameter (a decimal integer) represents the number of
1021 minutes of inactivity before a connection is considered dead, and it
1022 is disconnected. The deadtime only takes effect if the number of open files
1023 is zero.
1024
1025 This is useful to stop a server's resources being exhausted by a large
1026 number of inactive connections.
1027
1028 Most clients have an auto-reconnect feature when a connection is broken so
1029 in most cases this parameter should be transparent to users.
1030
1031 Using this parameter with a timeout of a few minutes is recommended
1032 for most systems.
1033
1034 A deadtime of zero indicates that no auto-disconnection should be performed.
1035
1036 .B Default:
1037         dead time = 0
1038
1039 .B Example:
1040         dead time = 15
1041 .SS debug level (G)
1042 The value of the parameter (an integer) allows the debug level
1043 (logging level) to be specified in the
1044 .B smb.conf
1045 file. This is to give
1046 greater flexibility in the configuration of the system.
1047
1048 The default will be the debug level specified on the command line.
1049
1050 .B Example:
1051         debug level = 3
1052 .SS default (G)
1053 See
1054 .B default service.
1055 .SS default case (S)
1056
1057 See the section on "NAME MANGLING" Also note the addition of "short
1058 preserve case"
1059
1060 .SS default service (G)
1061 A synonym for this parameter is 'default'.
1062
1063 This parameter specifies the name of a service which will be connected to
1064 if the service actually requested cannot be found. Note that the square
1065 brackets are NOT given in the parameter value (see example below).
1066
1067 There is no default value for this parameter. If this parameter is not given,
1068 attempting to connect to a nonexistent service results in an error.
1069
1070 Typically the default service would be a public, read-only service.
1071
1072 Also note that as of 1.9.14 the apparent service name will be changed to
1073 equal that of the requested service, this is very useful as it allows
1074 you to use macros like %S to make a wildcard service.
1075
1076 Note also that any _ characters in the name of the service used in the
1077 default service will get mapped to a /. This allows for interesting
1078 things.
1079
1080
1081 .B Example:
1082         default service = pub
1083         
1084         [pub]
1085              path = /%S
1086           
1087
1088 .SS delete readonly (S)
1089 This parameter allows readonly files to be deleted.  This is not normal DOS
1090 semantics, but is allowed by UNIX.
1091
1092 This option may be useful for running applications such as rcs, where UNIX
1093 file ownership prevents changing file permissions, and DOS semantics prevent
1094 deletion of a read only file.
1095
1096 .B Default:
1097         delete readonly = No
1098
1099 .B Example:
1100         delete readonly = Yes
1101 .SS deny hosts (S)
1102 A synonym for this parameter is 'hosts deny'.
1103
1104 The opposite of 'allow hosts' - hosts listed here are NOT permitted
1105 access to services unless the specific services have their own lists to
1106 override this one. Where the lists conflict, the 'allow' list takes precedence.
1107
1108 .B Default:
1109         none (i.e., no hosts specifically excluded)
1110
1111 .B Example:
1112         deny hosts = 150.203.4. badhost.mynet.edu.au
1113
1114 .SS delete veto files (S)
1115
1116 This option is used when Samba is attempting to delete a directory
1117 that contains one or more vetoed directories (see the 'veto files' option).
1118 If this option is set to False (the default) then if a vetoed directory
1119 contains any non-vetoed files or directories then the directory delete 
1120 will fail. This is usually what you want. 
1121
1122 If this option is set to True, then Samba will attempt
1123 to recursively delete any files and directories within the vetoed
1124 directory. This can be useful for integration with file serving
1125 systems such as Netatalk, which create meta-files within directories
1126 you might normally veto DOS/Windows users from seeing (eg. .AppleDouble)
1127
1128 Setting 'delete veto files = True' allows these directories to be 
1129 transparently deleted when the parent directory is deleted (so long
1130 as the user has permissions to do so).
1131
1132 .B Default:
1133     delete veto files = False
1134
1135 .B Example:
1136     delete veto files = True
1137
1138 See
1139 .B veto files
1140
1141 .SS dfree command (G)
1142 The dfree command setting should only be used on systems where a
1143 problem occurs with the internal disk space calculations. This has
1144 been known to happen with Ultrix, but may occur with other operating
1145 systems. The symptom that was seen was an error of "Abort Retry
1146 Ignore" at the end of each directory listing.
1147
1148 This setting allows the replacement of the internal routines to
1149 calculate the total disk space and amount available with an external
1150 routine. The example below gives a possible script that might fulfill
1151 this function. 
1152
1153 The external program will be passed a single parameter indicating a
1154 directory in the filesystem being queried. This will typically consist
1155 of the string "./". The script should return two integers in ascii. The
1156 first should be the total disk space in blocks, and the second should
1157 be the number of available blocks. An optional third return value
1158 can give the block size in bytes. The default blocksize is 1024 bytes.
1159
1160 Note: Your script should NOT be setuid or setgid and should be owned by
1161 (and writable only by) root!
1162
1163 .B Default:
1164         By default internal routines for determining the disk capacity
1165 and remaining space will be used.
1166
1167 .B Example:
1168         dfree command = /usr/local/samba/bin/dfree
1169
1170         Where the script dfree (which must be made executable) could be
1171
1172 .nf
1173         #!/bin/sh
1174         df $1 | tail -1 | awk '{print $2" "$4}'
1175 .fi
1176
1177         or perhaps (on Sys V)
1178
1179 .nf
1180         #!/bin/sh
1181         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1182 .fi
1183
1184         Note that you may have to replace the command names with full
1185 path names on some systems.
1186 .SS directory (S)
1187 See
1188 .B path.
1189
1190 .SS directory mask (S)
1191 A synonym for this parameter is 'directory mode'.
1192
1193 This parameter is the octal modes which are used when converting DOS modes 
1194 to UNIX modes when creating UNIX directories.
1195
1196 When a directory is created, the neccessary permissions are calculated
1197 according to the mapping from DOS modes to UNIX permissions, and
1198 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1199 This parameter may be thought of as a bit-wise MASK for the UNIX
1200 modes of a directory. Any bit *not* set here will be removed from the
1201 modes set on a directory when it is created.
1202
1203 The default value of this parameter removes the 'group' and 'other'
1204 write bits from the UNIX mode, allowing only the user who owns the
1205 directory to modify it.
1206
1207 Following this Samba will bit-wise 'OR' the UNIX mode created from
1208 this parameter with the value of the "force directory mode" parameter. 
1209 This parameter is set to 000 by default (ie. no extra mode bits are added).
1210
1211 See the "force directory mode" parameter to cause particular mode
1212 bits to always be set on created directories.
1213
1214 See also the "create mode" parameter for masking mode bits on created
1215 files.
1216
1217 .B Default:
1218         directory mask = 0755
1219
1220 .B Example:
1221         directory mask = 0775
1222
1223 .SS directory mode (S)
1224 See
1225 .B directory mask.
1226
1227 .SS dns proxy (G)
1228
1229 Specifies that nmbd should (as a WINS server), on finding that a NetBIOS
1230 name has not been registered, treat the NetBIOS name word-for-word as
1231 a DNS name.
1232
1233 Note that the maximum length for a NetBIOS name is 15
1234 characters, so the DNS name (or DNS alias) can likewise only be 15
1235 characters, maximum.
1236
1237 Note also that nmbd will block completely until the DNS name is resolved.
1238 This will result in temporary loss of browsing and WINS services.
1239 Enable this option only if you are certain that DNS resolution is fast,
1240 or you can live with the consequences of periodic pauses in nmbd service.
1241
1242 .B Default:
1243          dns proxy = yes
1244
1245 .SS domain controller (G)
1246
1247 Specifies the DNS name or IP address of the machine to refer domain 
1248 logons from Win95 machines to. You should never need to set this parameter.
1249
1250 .B Default:
1251          domain controller = no
1252
1253 .SS domain groups (G)
1254
1255 Specifies the NT Domain groups that the user belongs to, and the attributes
1256 associated with that group.  This parameter is a white-space separated list
1257 of group ids (in decimal), followed by an option attribute (in decimal) which
1258 defaults to a value of 7 if not specified.  A group id and the user attributes
1259 associated with it are separated by "/".
1260
1261 .B
1262 It is known that attributes are ignored by NT 4.0 Workstation, but not by
1263 NT 3.51 Workstation.  Furthermore, no information on the exact meaning of
1264 NT Domain groups is presently known.  
1265
1266 .B Default:
1267          domain groups = 776/7
1268
1269 .B Example:
1270          domain groups = 776 1024/7 777
1271
1272 .SS domain hosts allow (G)
1273 A synonym for this parameter is 'domain allow hosts'.
1274
1275 This parameter is a comma delimited set of hosts which are permitted to access
1276 a Domain. 
1277
1278 Note that access still requires suitable user-level passwords for the Domain.
1279 See 'allow hosts' for a description of the syntax of this parameter.
1280
1281 .B Default:
1282         none (i.e., all hosts permitted login access to the domain)
1283
1284 .B Example:
1285         domain hosts allow = 150.203.5. myhost.mynet.edu.au
1286
1287 .SS domain hosts deny (G)
1288 A synonym for this parameter is 'domain deny hosts'.
1289
1290 The opposite of 'domain hosts deny' - hosts listed here are NOT permitted
1291 to Login to the Domain from those NT Workstations.  Where the lists conflict,
1292 the 'allow' list takes precedence.
1293
1294 .B Default:
1295         none (i.e., no hosts specifically excluded login access to the domain)
1296
1297 .B Example:
1298         domain hosts deny = guest_wksta 150.203.4. badhost.mynet.edu.au
1299
1300 .SS domain logons (G)
1301
1302 If set to true, the Samba server will serve Windows 95 domain logons
1303 for the workgroup it is in. For more details on setting up this feature
1304 see the file DOMAINS.txt in the Samba source documentation directory.
1305
1306 .B Default:
1307          domain logons = no
1308
1309 .SS domain master (G)
1310
1311 Enable WAN-wide browse list collation.  Local master browsers on 
1312 broadcast-isolated subnets will give samba their local browse lists, and 
1313 ask for a complete copy of the browse list for the whole wide area network.
1314 Browser clients will then contact their local master browser, and will
1315 receive the domain-wide browse list, instead of just the list for their
1316 broadcast-isolated subnet.
1317
1318 .B Default:
1319         domain master = no
1320
1321 .SS domain sid (G)
1322
1323 Specifies the SID when using Samba as a Logon Server for NT Workstations.
1324 The format of SIDs supported by samba at present is S-1-N-nnn-nnn-nnn-nnn-nnn.
1325 The number N indicates the number of sub-authorities (nnn).
1326
1327 .B Default:
1328          domain sid = none
1329
1330 .B Example:
1331          domain sid = S-1-5-21-123-456-789-123
1332
1333 .SS dont descend (S)
1334 There are certain directories on some systems (eg., the /proc tree under
1335 Linux) that are either not of interest to clients or are infinitely deep
1336 (recursive). This parameter allows you to specify a comma-delimited list
1337 of directories that the server should always show as empty.
1338
1339 Note that Samba can be very fussy about the exact format of the "dont
1340 descend" entries. For example you may need "./proc" instead of just
1341 "/proc". Experimentation is the best policy :-)
1342
1343 .B Default:
1344         none (i.e., all directories are OK to descend)
1345
1346 .B Example:
1347         dont descend = /proc,/dev
1348
1349 .SS dos filetimes (S)
1350 Under DOS and Windows, if a user can write to a file they can change
1351 the timestamp on it. Under POSIX semantics, only the owner of the file
1352 or root may change the timestamp. By default, Samba runs with POSIX
1353 semantics and refuses to change the timestamp on a file if the user
1354 smbd is acting on behalf of is not the file owner. Setting this option
1355 to True allows DOS semantics and smbd will change the file timstamp as 
1356 DOS requires. This is a correct implementation of a previous compile-time
1357 options (UTIME_WORKAROUND) which was broken and is now removed.
1358
1359 .B Default:
1360         dos filetimes = False
1361
1362 .B Example:
1363         dos filetimes = True
1364
1365 .SS encrypt passwords (G)
1366
1367 This boolean controls whether encrypted passwords will be negotiated
1368 with the client. Note that this option has no effect if you haven't
1369 compiled in the necessary des libraries and encryption code. It
1370 defaults to no.
1371
1372 .SS exec (S)
1373
1374 This is an alias for preexec
1375
1376 .SS fake oplocks (S)
1377
1378 Oplocks are the way that SMB clients get permission from a server to
1379 locally cache file operations. If a server grants an oplock
1380 (opportunistic lock) then the client is free to assume that it is the
1381 only one accessing the file and it will aggressively cache file
1382 data. With some oplock types the client may even cache file open/close
1383 operations. This can give enormous performance benefits.
1384
1385 When you set "fake oplocks = yes" Samba will always grant oplock
1386 requests no matter how many clients are using the file. 
1387
1388 By enabling this option on all read-only shares or shares that you know
1389 will only be accessed from one client at a time you will see a big
1390 performance improvement on many operations. If you enable this option
1391 on shares where multiple clients may be accessing the files read-write
1392 at the same time you can get data corruption. Use this option
1393 carefully! 
1394
1395 It is generally much better to use the real oplock support except for
1396 physically read-only media such as CDROMs.
1397
1398 This option is disabled by default.
1399
1400 .SS follow symlinks (S)
1401
1402 This parameter allows the Samba administrator to stop smbd from
1403 following symbolic links in a particular share. Setting this
1404 parameter to "No" prevents any file or directory that is a 
1405 symbolic link from being followed (the user will get an error).
1406 This option is very useful to stop users from adding a symbolic
1407 link to /etc/pasword in their home directory for instance.
1408 However it will slow filename lookups down slightly.
1409
1410 This option is enabled (ie. smbd will follow symbolic links)
1411 by default.
1412
1413 .SS force create mode (S)
1414 This parameter specifies a set of UNIX mode bit permissions that
1415 will *always* be set on a file created by Samba. This is done
1416 by bitwise 'OR'ing these bits onto the mode bits of a file that
1417 is being created. The default for this parameter is (in octel)
1418 000. The modes in this parameter are bitwise 'OR'ed onto the
1419 file mode after the mask set in the "create mask" parameter
1420 is applied.
1421
1422 See also the parameter "create mask" for details on masking mode
1423 bits on created files.
1424
1425 .B Default:
1426        force create mode = 000
1427
1428 .B Example:
1429        force create mode = 0755
1430
1431 would force all created files to have read and execute permissions
1432 set for 'group' and 'other' as well as the read/write/execute bits 
1433 set for the 'user'.
1434
1435 .SS force directory mode (S)
1436 This parameter specifies a set of UNIX mode bit permissions that
1437 will *always* be set on a directory created by Samba. This is done
1438 by bitwise 'OR'ing these bits onto the mode bits of a directory that
1439 is being created. The default for this parameter is (in octel)
1440 0000 which will not add any extra permission bits to a created
1441 directory. This operation is done after the mode mask in the parameter 
1442 "directory mask" is applied.
1443
1444 See also the parameter "directory mask" for details on masking mode
1445 bits on created directories.
1446
1447 .B Default:
1448        force directory mode = 000
1449
1450 .B Example:
1451        force directory mode = 0755
1452
1453 would force all created directories to have read and execute permissions
1454 set for 'group' and 'other' as well as the read/write/execute bits 
1455 set for the 'user'.
1456
1457 .SS force group (S)
1458 This specifies a group name that all connections to this service
1459 should be made as. This may be useful for sharing files.
1460
1461 .B Default:
1462        no forced group
1463
1464 .B Example:
1465        force group = agroup
1466
1467 .SS force user (S)
1468 This specifies a user name that all connections to this service
1469 should be made as. This may be useful for sharing files. You should
1470 also use it carefully as using it incorrectly can cause security
1471 problems.
1472
1473 This user name only gets used once a connection is established. Thus
1474 clients still need to connect as a valid user and supply a valid
1475 password. Once connected, all file operations will be performed as the
1476 "forced user", not matter what username the client connected as.
1477
1478 .B Default:
1479        no forced user
1480
1481 .B Example:
1482        force user = auser
1483
1484 .SS getwd cache (G)
1485 This is a tuning option. When this is enabled a cacheing algorithm will
1486 be used to reduce the time taken for getwd() calls. This can have a
1487 significant impact on performance, especially when widelinks is False.
1488
1489 .B Default:
1490         getwd cache = No
1491
1492 .B Example:
1493         getwd cache = Yes
1494
1495 .SS group (S)
1496 This is an alias for "force group" and is only kept for compatibility
1497 with old versions of Samba. It may be removed in future versions.
1498
1499 .SS guest account (S)
1500 This is a username which will be used for access to services which are
1501 specified as 'guest ok' (see below). Whatever privileges this user has
1502 will be available to any client connecting to the guest
1503 service. Typically this user will exist in the password file, but will
1504 not have a valid login. If a username is specified in a given service,
1505 the specified username overrides this one.
1506
1507 One some systems the account "nobody" may not be able to print. Use
1508 another account in this case. You should test this by trying to log in
1509 as your guest user (perhaps by using the "su \-" command) and trying to
1510 print using
1511 .BR lpr .
1512
1513 Note that as of version 1.9 of Samba this option may be set
1514 differently for each service.
1515
1516 .B Default:
1517         specified at compile time
1518
1519 .B Example:
1520         guest account = nobody
1521 .SS guest ok (S)
1522 See
1523 .B public.
1524 .SS guest only (S)
1525 If this parameter is 'yes' for a service, then only guest connections to the
1526 service are permitted. This parameter will have no affect if "guest ok" or
1527 "public" is not set for the service.
1528
1529 See the section below on user/password validation for more information about
1530 this option.
1531
1532 .B Default:
1533         guest only = no
1534
1535 .B Example:
1536         guest only = yes
1537 .SS hide dot files (S)
1538 This is a boolean parameter that controls whether files starting with
1539 a dot appear as hidden files.
1540
1541 .B Default:
1542         hide dot files = yes
1543
1544 .B Example:
1545         hide dot files = no
1546
1547
1548 .SS hide files(S)
1549 This is a list of files or directories that are not visible but are
1550 accessible.  The DOS 'hidden' attribute is applied to any files or
1551 directories that match.
1552
1553 Each entry in the list must be separated by a "/", which allows spaces
1554 to be included in the entry.  '*' and '?' can be used to specify multiple 
1555 files or directories as in DOS wildcards.
1556
1557 Each entry must be a unix path, not a DOS path and must not include the 
1558 unix directory separator "/".
1559
1560 Note that the case sensitivity option is applicable in hiding files.
1561
1562 Setting this parameter will affect the performance of Samba, as
1563 it will be forced to check all files and directories for a match
1564 as they are scanned.
1565
1566 See also "hide dot files", "veto files" and "case sensitive"
1567
1568 .B Default
1569         No files or directories are hidden by this option (dot files are
1570     hidden by default because of the "hide dot files" option).
1571
1572 .B Example
1573         hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
1574
1575 The above example is based on files that the Macintosh client (DAVE)
1576 creates for internal use, and also still hides all files beginning with
1577 a dot.
1578
1579 .SS homedir map (G)
1580 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
1581 from which the server for the user's home directory should be extracted.
1582 At present, only the Sun auto.home map format is understood. The form of
1583 the map is:
1584
1585 username        server:/some/file/system
1586
1587 and the program will extract the servername from before the first ':'.
1588 There should probably be a better parsing system that copes with different
1589 map formats and also Amd (another automounter) maps.
1590
1591 NB: The -DNETGROUP option is required in the Makefile for option to work
1592 and on some architectures the line -lrpcsvc needs to be added to the
1593 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
1594
1595 See also "nis homedir"
1596
1597 .B Default:
1598         homedir map = auto.home
1599
1600 .B Example:
1601         homedir map = amd.homedir
1602 .SS hosts allow (S)
1603 See
1604 .B allow hosts.
1605 .SS hosts deny (S)
1606 See
1607 .B deny hosts.
1608
1609 .SS hosts equiv (G)
1610 If this global parameter is a non-null string, it specifies the name of
1611 a file to read for the names of hosts and users who will be allowed access
1612 without specifying a password.
1613
1614 This is not be confused with 
1615 .B allow hosts
1616 which is about hosts access to services and is more useful for guest services.
1617 .B hosts equiv
1618 may be useful for NT clients which will not supply passwords to samba.
1619
1620 NOTE: The use of hosts.equiv can be a major security hole. This is
1621 because you are trusting the PC to supply the correct username. It is
1622 very easy to get a PC to supply a false username. I recommend that the
1623 hosts.equiv option be only used if you really know what you are doing,
1624 or perhaps on a home network where you trust your wife and kids :-)
1625
1626 .B Default
1627         No host equivalences
1628
1629 .B Example
1630         hosts equiv = /etc/hosts.equiv
1631
1632 .SS include (G)
1633
1634 This allows you to include one config file inside another.  The file is
1635 included literally, as though typed in place.
1636
1637 It takes the standard substitutions, except %u, %P and %S
1638
1639 .SS interfaces (G)
1640
1641 This option allows you to setup multiple network interfaces, so that
1642 Samba can properly handle browsing on all interfaces.
1643
1644 The option takes a list of ip/netmask pairs. The netmask may either be
1645 a bitmask, or a bitlength. 
1646
1647 For example, the following line:
1648
1649 interfaces = 192.168.2.10/24 192.168.3.10/24
1650
1651 would configure two network interfaces with IP addresses 192.168.2.10
1652 and 192.168.3.10. The netmasks of both interfaces would be set to
1653 255.255.255.0. 
1654
1655 You could produce an equivalent result by using:
1656
1657 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1658
1659 if you prefer that format.
1660
1661 If this option is not set then Samba will attempt to find a primary
1662 interface, but won't attempt to configure more than one interface.
1663
1664 .SS invalid users (S)
1665 This is a list of users that should not be allowed to login to this
1666 service. This is really a "paranoid" check to absolutely ensure an
1667 improper setting does not breach your security.
1668
1669 A name starting with @ is interpreted as a UNIX group.
1670
1671 The current servicename is substituted for %S. This is useful in the
1672 [homes] section.
1673
1674 See also "valid users"
1675
1676 .B Default
1677         No invalid users
1678
1679 .B Example
1680         invalid users = root fred admin @wheel
1681
1682 .SS keep alive (G)
1683 The value of the parameter (an integer) represents the number of seconds 
1684 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1685 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1686 client is still present and responding.
1687
1688 Keepalives should, in general, not be needed if the socket being used
1689 has the SO_KEEPALIVE attribute set on it (see "socket
1690 options"). Basically you should only use this option if you strike
1691 difficulties.
1692
1693 .B Default:
1694         keep alive = 0
1695
1696 .B Example:
1697         keep alive = 60
1698 .SS load printers (G)
1699 A boolean variable that controls whether all printers in the printcap
1700 will be loaded for browsing by default. 
1701
1702 .B Default:
1703         load printers = yes
1704
1705 .B Example:
1706         load printers = no
1707
1708 .SS local master (G)
1709 This option allows the nmbd to become a local master browser on a
1710 subnet. If set to False then nmbd will not attempt to become a local
1711 master browser on a subnet and will also lose in all browsing elections. 
1712 By default this value is set to true. Setting this value to true doesn't 
1713 mean that Samba will become the local master browser on a subnet, just 
1714 that the nmbd will participate in elections for local master browser.
1715
1716 .B Default:
1717         local master = yes
1718
1719 .SS lock directory (G)
1720 This option specifies the directory where lock files will be placed.
1721 The lock files are used to implement the "max connections" option.
1722
1723 .B Default:
1724         lock directory = /tmp/samba
1725
1726 .B Example: 
1727         lock directory = /usr/local/samba/var/locks
1728
1729 .SS locking (S)
1730 This controls whether or not locking will be performed by the server in 
1731 response to lock requests from the client.
1732
1733 If "locking = no", all lock and unlock requests will appear to succeed and 
1734 all lock queries will indicate that the queried lock is clear.
1735
1736 If "locking = yes", real locking will be performed by the server.
1737
1738 This option may be particularly useful for read-only filesystems which
1739 do not need locking (such as cdrom drives).
1740
1741 Be careful about disabling locking either globally or in a specific
1742 service, as lack of locking may result in data corruption.
1743
1744 .B Default:
1745         locking = yes
1746
1747 .B Example:
1748         locking = no
1749
1750 .SS log file (G)
1751
1752 This options allows you to override the name of the Samba log file
1753 (also known as the debug file).
1754
1755 This option takes the standard substitutions, allowing you to have
1756 separate log files for each user or machine.
1757
1758 .B Example:
1759         log file = /usr/local/samba/var/log.%m
1760
1761 .SS log level (G)
1762 see "debug level"
1763
1764 .SS logon drive (G)
1765
1766 This parameter specifies the local path to which the home directory
1767 will be connected (see "logon home") and is only used by NT Workstations.
1768
1769 .B Example:
1770         logon drive = h:
1771
1772 .SS logon home (G)
1773
1774 This parameter specifies the home directory location when a Win95 or
1775 NT Workstation logs into a Samba PDC.  It allows you to do "NET USE
1776 H: /HOME" from a command prompt, for example.
1777
1778 .B
1779 This option takes the standard substitutions, allowing you to have
1780 separate logon scripts for each user or machine.
1781
1782 .B Example:
1783         logon home = "\\\\remote_smb_server\\%U"
1784
1785 .B Default:
1786         logon home = "\\\\%N\\%U"
1787
1788 .SS logon path (G)
1789
1790 This parameter specifies the home directory where roaming profiles 
1791 (USER.DAT / USER.MAN files for Windows 95) are stored.
1792
1793 This option takes the standard substitutions, allowing you to have
1794 separate logon scripts for each user or machine.  It also specifies
1795 the directory from which the "desktop", "start menu", "nethood" and
1796 "programs" folders, and their contents, are loaded and displayed
1797 on your Windows 95 client.
1798
1799 The share and the path must be readable by the user for the preferences
1800 and directories to be loaded onto the Windows 95 client.  The share
1801 must be writeable when the logs in for the first time, in order that
1802 the Windows 95 client can create the user.dat and other directories.
1803
1804 Thereafter, the directories and any of contents can, if required,
1805 be made read-only.  It is not adviseable that the USER.DAT file be made
1806 read-only - rename it to USER.MAN to achieve the desired effect
1807 (a MANdatory profile).
1808
1809 Windows clients can sometimes maintain a connection to the [homes]
1810 share, even though there is no user logged in.  Therefore, it is
1811 vital that the logon path does not include a reference to the
1812 homes share (i.e \\\\%N\\HOMES\profile_path will cause problems).
1813
1814 .B
1815 This option takes the standard substitutions, allowing you to have
1816 separate logon scripts for each user or machine.
1817
1818 .B Default:
1819         logon path = \\\\%N\\%U\\profile
1820
1821 .B Example:
1822         logon path = \\\\PROFILESERVER\\HOME_DIR\\%U\\PROFILE
1823
1824 .SS logon script (G)
1825
1826 This parameter specifies the batch file (.bat) or NT command file (.cmd)
1827 to be downloaded and run on a machine when a user successfully logs in.
1828 The file must contain the DOS style cr/lf line endings.  Using a DOS-style
1829 editor to create the file is recommended.
1830
1831 The script must be a relative path to the [netlogon] service.  If the
1832 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
1833 logon script = STARTUP.BAT, then file that will be downloaded is:
1834
1835 .B /usr/local/samba/netlogon/STARTUP.BAT
1836
1837 The contents of the batch file is entirely your choice.  A suggested
1838 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
1839 machine to synchronise clocks with the same time server.  Another use
1840 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
1841 or NET USE Q: \\\\SERVER\\ISO9001_QA.
1842
1843 Note that it is particularly important not to allow write access to
1844 the [netlogon] share, or to grant users write permission on the
1845 batch files in a secure environment, as this would allow the batch
1846 files to be arbitrarily modified.
1847
1848 .B
1849 This option takes the standard substitutions, allowing you to have
1850 separate logon scripts for each user or machine.
1851
1852 .B Example:
1853         logon script = scripts/%U.bat
1854
1855 .SS lppause command (S)
1856 This parameter specifies the command to be executed on the server host in
1857 order to stop printing or spooling a specific print job.
1858
1859 This command should be a program or script which takes a printer name and
1860 job number to pause the print job. Currently I don't know of any print
1861 spooler system that can do this with a simple option, except for the PPR
1862 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1863 of implementing this is by using job priorities, where jobs having a too
1864 low priority won't be sent to the printer. See also the
1865 .B lppause
1866 command.
1867
1868 If a %p is given then the printername is put in its place. A %j is
1869 replaced with the job number (an integer).
1870 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1871 command, the job will show up with the correct status, i.e. if the job
1872 priority is lower than the set fence priority it will have the PAUSED
1873 status, whereas if the priority is equal or higher it will have the
1874 SPOOLED or PRINTING status.
1875
1876 Note that it is good practice to include the absolute path in the lppause
1877 command as the PATH may not be available to the server.
1878
1879 .B Default:
1880         Currently no default value is given to this string
1881
1882 .B Example for HPUX:
1883         lppause command = /usr/bin/lpalt %p-%j -p0
1884
1885 .SS lpq cache time (G)
1886
1887 This controls how long lpq info will be cached for to prevent the lpq
1888 command being called too often. A separate cache is kept for each
1889 variation of the lpq command used by the system, so if you use
1890 different lpq commands for different users then they won't share cache
1891 information.
1892
1893 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1894 of the lpq command in use.
1895
1896 The default is 10 seconds, meaning that the cached results of a
1897 previous identical lpq command will be used if the cached data is less
1898 than 10 seconds old. A large value may be advisable if your lpq
1899 command is very slow.
1900
1901 A value of 0 will disable cacheing completely.
1902
1903 .B Default:
1904         lpq cache time = 10
1905
1906 .B Example:
1907         lpq cache time = 30
1908
1909 .SS lpq command (S)
1910 This parameter specifies the command to be executed on the server host in
1911 order to obtain "lpq"-style printer status information. 
1912
1913 This command should be a program or script which takes a printer name
1914 as its only parameter and outputs printer status information. 
1915
1916 Currently six styles of printer status information are supported; BSD,
1917 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1918 control which type is expected using the "printing =" option.
1919
1920 Some clients (notably Windows for Workgroups) may not correctly send the
1921 connection number for the printer they are requesting status information
1922 about. To get around this, the server reports on the first printer service
1923 connected to by the client. This only happens if the connection number sent
1924 is invalid.
1925
1926 If a %p is given then the printername is put in its place. Otherwise
1927 it is placed at the end of the command.
1928
1929 Note that it is good practice to include the absolute path in the lpq
1930 command as the PATH may not be available to the server.
1931
1932 .B Default:
1933         depends on the setting of "printing ="
1934
1935 .B Example:
1936         lpq command = /usr/bin/lpq %p
1937
1938 .SS lpresume command (S)
1939 This parameter specifies the command to be executed on the server host in
1940 order to restart or continue printing or spooling a specific print job.
1941
1942 This command should be a program or script which takes a printer name and
1943 job number to resume the print job. See also the lppause command.
1944
1945 If a %p is given then the printername is put in its place. A %j is
1946 replaced with the job number (an integer).
1947
1948 Note that it is good practice to include the absolute path in the lpresume
1949 command as the PATH may not be available to the server.
1950
1951 .B Default:
1952         Currently no default value is given to this string
1953
1954 .B Example for HPUX:
1955         lpresume command = /usr/bin/lpalt %p-%j -p2
1956
1957 .SS lprm command (S)
1958 This parameter specifies the command to be executed on the server host in
1959 order to delete a print job.
1960
1961 This command should be a program or script which takes a printer name
1962 and job number, and deletes the print job.
1963
1964 Currently seven styles of printer control are supported; BSD, SYSV, AIX
1965 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
1966 which type is expected using the "printing =" option.
1967
1968 If a %p is given then the printername is put in its place. A %j is
1969 replaced with the job number (an integer).
1970
1971 Note that it is good practice to include the absolute path in the lprm
1972 command as the PATH may not be available to the server.
1973
1974 .B Default:
1975         depends on the setting of "printing ="
1976
1977 .B Example 1:
1978         lprm command = /usr/bin/lprm -P%p %j
1979
1980 .B Example 2:
1981         lprm command = /usr/bin/cancel %p-%j
1982
1983 .SS magic output (S)
1984 This parameter specifies the name of a file which will contain output
1985 created by a magic script (see
1986 .I magic script
1987 below).
1988
1989 Warning: If two clients use the same magic script in the same directory the
1990 output file content is undefined.
1991 .B Default:
1992         magic output = <magic script name>.out
1993
1994 .B Example:
1995         magic output = myfile.txt
1996 .SS magic script (S)
1997 This parameter specifies the name of a file which, if opened, will be
1998 executed by the server when the file is closed. This allows a UNIX script
1999 to be sent to the Samba host and executed on behalf of the connected user.
2000
2001 Scripts executed in this way will be deleted upon completion, permissions
2002 permitting.
2003
2004 If the script generates output, output will be sent to the file specified by
2005 the
2006 .I magic output
2007 parameter (see above).
2008
2009 Note that some shells are unable to interpret scripts containing
2010 carriage-return-linefeed instead of linefeed as the end-of-line
2011 marker. Magic scripts must be executable "as is" on the host, which
2012 for some hosts and some shells will require filtering at the DOS end.
2013
2014 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
2015
2016 .B Default:
2017         None. Magic scripts disabled.
2018
2019 .B Example:
2020         magic script = user.csh
2021
2022 .SS mangle case (S)
2023
2024 See the section on "NAME MANGLING"
2025
2026 .SS mangled map (S)
2027 This is for those who want to directly map UNIX file names which are
2028 not representable on DOS.  The mangling of names is not always what is
2029 needed.  In particular you may have documents with file extensions
2030 that differ between DOS and UNIX. For example, under UNIX it is common
2031 to use .html for HTML files, whereas under DOS .htm is more commonly
2032 used.
2033
2034 So to map 'html' to 'htm' you put:
2035
2036   mangled map = (*.html *.htm)
2037
2038 One very useful case is to remove the annoying ;1 off the ends of
2039 filenames on some CDROMS (only visible under some UNIXes). To do this
2040 use a map of (*;1 *)
2041
2042 .B default:
2043         no mangled map
2044
2045 .B Example:
2046         mangled map = (*;1 *)
2047
2048 .SS mangled names (S)
2049 This controls whether non-DOS names under UNIX should be mapped to
2050 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2051 should simply be ignored.
2052
2053 See the section on "NAME MANGLING" for details on how to control the
2054 mangling process.
2055
2056 If mangling is used then the mangling algorithm is as follows:
2057 .RS
2058 - the first (up to) five alphanumeric characters before the rightmost dot of
2059 the filename are preserved, forced to upper case, and appear as the first (up
2060 to) five characters of the mangled name.
2061
2062 - a tilde ("~") is appended to the first part of the mangled name, followed
2063 by a two-character unique sequence, based on the original root name 
2064 (i.e., the original filename minus its final extension). The final
2065 extension is included in the hash calculation only if it contains any upper
2066 case characters or is longer than three characters.
2067
2068 Note that the character to use may be specified using the "mangling
2069 char" option, if you don't like ~.
2070
2071 - the first three alphanumeric characters of the final extension are preserved,
2072 forced to upper case and appear as the extension of the mangled name. The 
2073 final extension is defined as that part of the original filename after the
2074 rightmost dot. If there are no dots in the filename, the mangled name will
2075 have no extension (except in the case of hidden files - see below).
2076
2077 - files whose UNIX name begins with a dot will be presented as DOS hidden
2078 files. The mangled name will be created as for other filenames, but with the
2079 leading dot removed and "___" as its extension regardless of actual original
2080 extension (that's three underscores).
2081 .RE
2082
2083 The two-digit hash value consists of upper case alphanumeric characters.
2084
2085 This algorithm can cause name collisions only if files in a directory share
2086 the same first five alphanumeric characters. The probability of such a clash 
2087 is 1/1300.
2088
2089 The name mangling (if enabled) allows a file to be copied between UNIX
2090 directories from DOS while retaining the long UNIX filename. UNIX files can
2091 be renamed to a new extension from DOS and will retain the same basename. 
2092 Mangled names do not change between sessions.
2093
2094 .B Default:
2095         mangled names = yes
2096
2097 .B Example:
2098         mangled names = no
2099 .SS mangling char (S)
2100 This controls what character is used as the "magic" character in name
2101 mangling. The default is a ~ but this may interfere with some
2102 software. Use this option to set it to whatever you prefer.
2103
2104 .B Default:
2105         mangling char = ~
2106
2107 .B Example:
2108         mangling char = ^
2109
2110 .SS mangled stack (G)
2111 This parameter controls the number of mangled names that should be cached in
2112 the Samba server.
2113
2114 This stack is a list of recently mangled base names (extensions are only
2115 maintained if they are longer than 3 characters or contains upper case
2116 characters).
2117
2118 The larger this value, the more likely it is that mangled names can be
2119 successfully converted to correct long UNIX names. However, large stack
2120 sizes will slow most directory access. Smaller stacks save memory in the
2121 server (each stack element costs 256 bytes).
2122
2123 It is not possible to absolutely guarantee correct long file names, so
2124 be prepared for some surprises!
2125
2126 .B Default:
2127         mangled stack = 50
2128
2129 .B Example:
2130         mangled stack = 100
2131
2132 .SS map archive (S)
2133 This controls whether the DOS archive attribute should be mapped to the
2134 UNIX owner execute bit.  The DOS archive bit is set when a file has been modified
2135 since its last backup.  One motivation for this option it to keep Samba/your
2136 PC from making any file it touches from becoming executable under UNIX.
2137 This can be quite annoying for shared source code, documents,  etc...
2138
2139 Note that this requires the 'create mask' to be set such that owner
2140 execute bit is not masked out (ie. it must include 100). See the 
2141 parameter "create mask" for details.
2142
2143 .B Default:
2144       map archive = yes
2145
2146 .B Example:
2147       map archive = no
2148
2149 .SS map hidden (S)
2150 This controls whether DOS style hidden files should be mapped to the
2151 UNIX world execute bit.
2152
2153 Note that this requires the 'create mask' to be set such that the world
2154 execute bit is not masked out (ie. it must include 001). 
2155 See the parameter "create mask" for details.
2156
2157 .B Default:
2158         map hidden = no
2159
2160 .B Example:
2161         map hidden = yes
2162 .SS map system (S)
2163 This controls whether DOS style system files should be mapped to the
2164 UNIX group execute bit.
2165
2166 Note that this requires the 'create mask' to be set such that the group
2167 execute bit is not masked out (ie. it must include 010). See the parameter 
2168 "create mask" for details.
2169
2170 .B Default:
2171         map system = no
2172
2173 .B Example:
2174         map system = yes
2175 .SS max connections (S)
2176 This option allows the number of simultaneous connections to a
2177 service to be limited. If "max connections" is greater than 0 then
2178 connections will be refused if this number of connections to the
2179 service are already open. A value of zero mean an unlimited number of
2180 connections may be made.
2181
2182 Record lock files are used to implement this feature. The lock files
2183 will be stored in the directory specified by the "lock directory" option.
2184
2185 .B Default:
2186         max connections = 0
2187
2188 .B Example:
2189         max connections = 10
2190
2191 .SS max disk size (G)
2192 This option allows you to put an upper limit on the apparent size of
2193 disks. If you set this option to 100 then all shares will appear to be
2194 not larger than 100 MB in size.
2195
2196 Note that this option does not limit the amount of data you can put on
2197 the disk. In the above case you could still store much more than 100
2198 MB on the disk, but if a client ever asks for the amount of free disk
2199 space or the total disk size then the result will be bounded by the
2200 amount specified in "max disk size".
2201
2202 This option is primarily useful to work around bugs in some pieces of
2203 software that can't handle very large disks, particularly disks over
2204 1GB in size.
2205
2206 A "max disk size" of 0 means no limit.
2207
2208 .B Default:
2209         max disk size = 0
2210
2211 .B Example:
2212         max disk size = 1000
2213
2214 .SS max log size (G)
2215
2216 This option (an integer in kilobytes) specifies the max size the log
2217 file should grow to. Samba periodically checks the size and if it is
2218 exceeded it will rename the file, adding a .old extension.
2219
2220 A size of 0 means no limit.
2221
2222 .B Default:
2223         max log size = 5000
2224
2225 .B Example:
2226         max log size = 1000
2227
2228 .SS max mux (G)
2229
2230 This option controls the maximum number of outstanding simultaneous SMB 
2231 operations that samba tells the client it will allow. You should never need 
2232 to set this parameter.
2233
2234 .B Default:
2235         max mux = 50
2236
2237 .SS max packet (G)
2238
2239 A synonym for this parameter is 'packet size'.
2240
2241 .SS max ttl (G)
2242
2243 This option tells nmbd what the default 'time to live' of NetBIOS
2244 names should be (in seconds). You should never need to change this parameter.
2245
2246 .B Default:
2247         max ttl = 14400
2248 .SS max xmit (G)
2249
2250 This option controls the maximum packet size that will be negotiated
2251 by Samba. The default is 65535, which is the maximum. In some cases
2252 you may find you get better performance with a smaller value. A value
2253 below 2048 is likely to cause problems.
2254
2255 .B Default:
2256         max xmit = 65535
2257
2258 .B Example:
2259         max xmit = 8192
2260
2261 .SS message command (G)
2262
2263 This specifies what command to run when the server receives a WinPopup
2264 style message.
2265
2266 This would normally be a command that would deliver the message
2267 somehow. How this is to be done is up to your imagination.
2268
2269 What I use is:
2270
2271    message command = csh -c 'xedit %s;rm %s' &
2272
2273 This delivers the message using xedit, then removes it
2274 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2275 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
2276 immediately then your PCs may freeze when sending messages (they
2277 should recover after 30secs, hopefully).
2278
2279 All messages are delivered as the global guest user. The command takes
2280 the standard substitutions, although %u won't work (%U may be better
2281 in this case).
2282
2283 Apart from the standard substitutions, some additional ones apply. In
2284 particular:
2285
2286 %s = the filename containing the message
2287
2288 %t = the destination that the message was sent to (probably the server
2289 name)
2290
2291 %f = who the message is from
2292
2293 You could make this command send mail, or whatever else takes your
2294 fancy. Please let me know of any really interesting ideas you have.
2295
2296 Here's a way of sending the messages as mail to root:
2297
2298 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
2299
2300 If you don't have a message command then the message won't be
2301 delivered and Samba will tell the sender there was an
2302 error. Unfortunately WfWg totally ignores the error code and carries
2303 on regardless, saying that the message was delivered.
2304
2305 If you want to silently delete it then try "message command = rm %s".
2306
2307 For the really adventurous, try something like this:
2308
2309 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
2310                   -M %m; rm %s' &
2311
2312 this would execute the command as a script on the server, then give
2313 them the result in a WinPopup message. Note that this could cause a
2314 loop if you send a message from the server using smbclient! You better
2315 wrap the above in a script that checks for this :-)
2316
2317 .B Default:
2318         no message command
2319
2320 .B Example:
2321         message command = csh -c 'xedit %s;rm %s' &
2322
2323 .SS min print space (S)
2324
2325 This sets the minimum amount of free disk space that must be available
2326 before a user will be able to spool a print job. It is specified in
2327 kilobytes. The default is 0, which means no limit.
2328
2329 .B Default:
2330         min print space = 0
2331
2332 .B Example:
2333         min print space = 2000
2334
2335 .SS netbios aliases (G)
2336
2337 This is a list of names that nmbd will advertise as additional
2338 names by which the Samba server is known. This allows one machine
2339 to appear in browse lists under multiple names. If a machine is
2340 acting as a browse server or logon server none of these names
2341 will be advertised as either browse server or logon servers, only
2342 the primary name of the machine will be advertised with these
2343 capabilities.
2344
2345 See also 'netbios name'.
2346
2347 .B Example:
2348    netbios aliases = TEST TEST1 TEST2
2349
2350 .SS netbios name (G)
2351
2352 This sets the NetBIOS name by which a Samba server is known. By
2353 default it is the same as the first component of the host's DNS name.
2354 If a machine is a browse server or logon server this name (or the
2355 first component of the hosts DNS name) will be the name that these
2356 services are advertised under.
2357
2358 See also 'netbios aliases'.
2359
2360 .B Example:
2361    netbios name = MYNAME
2362
2363 .SS nis homedir (G)
2364 Get the home share server from a NIS (or YP) map. For unix systems that
2365 use an automounter, the user's home directory will often be mounted on
2366 a workstation on demand from a remote server. When the Samba logon server
2367 is not the actual home directory server, two network hops are required
2368 to access the home directory and this can be very slow especially with 
2369 writing via Samba to an NFS mounted directory. This option allows samba
2370 to return the home share as being on a different server to the logon
2371 server and as long as a samba daemon is running on the home directory 
2372 server, it will be mounted on the Samba client directly from the directory
2373 server. When Samba is returning the home share to the client, it will
2374 consult the NIS (or YP) map specified in "homedir map" and return the
2375 server listed there.
2376
2377 .B Default:
2378         nis homedir = false
2379
2380 .B Example:
2381         nis homedir = true
2382
2383 .SS null passwords (G)
2384 Allow or disallow access to accounts that have null passwords. 
2385
2386 .B Default:
2387         null passwords = no
2388
2389 .B Example:
2390         null passwords = yes
2391
2392 .SS only guest (S)
2393 A synonym for this command is 'guest only'.
2394
2395 .SS only user (S)
2396 This is a boolean option that controls whether connections with
2397 usernames not in the user= list will be allowed. By default this
2398 option is disabled so a client can supply a username to be used by
2399 the server.
2400
2401 Note that this also means Samba won't try to deduce usernames from the
2402 service name. This can be annoying for the [homes] section. To get
2403 around this you could use "user = %S" which means your "user" list
2404 will be just the service name, which for home directories is the name
2405 of the user.
2406
2407 .B Default: 
2408         only user = False
2409
2410 .B Example: 
2411         only user = True
2412
2413 .SS oplocks (S)
2414 This boolean option tells smbd whether to issue oplocks (opportunistic
2415 locks) to file open requests on this share. The oplock code was introduced in
2416 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
2417 of access to files on Samba servers. It allows the clients to agressively
2418 cache files locally and you may want to disable this option for unreliable
2419 network environments (it is turned on by default in Windows NT Servers).
2420 For more information see the file Speed.txt in the Samba docs/ directory.
2421
2422 .B Default:
2423     oplocks = True
2424
2425 .B Example:
2426     oplocks = False
2427
2428
2429 .SS os level (G)
2430 This integer value controls what level Samba advertises itself as for
2431 browse elections. See BROWSING.txt for details.
2432
2433 .SS packet size (G)
2434 The maximum transmit packet size during a raw read. This option is no
2435 longer implemented as of version 1.7.00, and is kept only so old
2436 configuration files do not become invalid.
2437
2438 .SS passwd chat (G)
2439 This string controls the "chat" conversation that takes places
2440 between smbd and the local password changing program to change the
2441 users password. The string describes a sequence of response-receive
2442 pairs that smbd uses to determine what to send to the passwd program
2443 and what to expect back. If the expected output is not received then
2444 the password is not changed.
2445
2446 This chat sequence is often quite site specific, depending on what
2447 local methods are used for password control (such as NIS+ etc).
2448
2449 The string can contain the macros %o and %n which are substituted for
2450 the old and new passwords respectively. It can also contain the
2451 standard macros \en \er \et and \es to give line-feed, carriage-return,
2452 tab and space.
2453
2454 The string can also contain a * which matches any sequence of
2455 characters.
2456
2457 Double quotes can be used to collect strings with spaces in them into
2458 a single string.
2459
2460 If the send string in any part of the chat sequence is a fullstop "."
2461 then no string is sent. Similarly, is the expect string is a fullstop
2462 then no string is expected.
2463
2464 .B Example:
2465         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
2466                        "*Reenter NEW password*" %n\en "*Password changed*"
2467
2468
2469 .B Default:
2470        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
2471
2472 .SS passwd program (G)
2473 The name of a program that can be used to set user passwords.
2474
2475 This is only necessary if you have enabled remote password changing at
2476 compile time. Any occurrences of %u will be replaced with the user
2477 name.
2478
2479 Also note that many passwd programs insist in "reasonable" passwords,
2480 such as a minimum length, or the inclusion of mixed case chars and
2481 digits. This can pose a problem as some clients (such as Windows for
2482 Workgroups) uppercase the password before sending it. 
2483
2484 .B Default:
2485         passwd program = /bin/passwd
2486
2487 .B Example:
2488         passwd program = /sbin/passwd %u
2489
2490 .SS password level (G)
2491 Some client/server combinations have difficulty with mixed-case passwords.
2492 One offending client is Windows for Workgroups, which for some reason forces
2493 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
2494 when using COREPLUS!
2495
2496 This parameter defines the maximum number of characters that may be upper case
2497 in passwords.
2498
2499 For example, say the password given was "FRED". If
2500 .B password level
2501 is set to 1 (one), the following combinations would be tried if "FRED" failed:
2502 "Fred", "fred", "fRed", "frEd", "freD". If
2503 .B password level was set to 2 (two), the following combinations would also be
2504 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
2505
2506 The higher value this parameter is set to the more likely it is that a mixed
2507 case password will be matched against a single case password. However, you
2508 should be aware that use of this parameter reduces security and increases the
2509 time taken to process a new connection.
2510
2511 A value of zero will cause only two attempts to be made - the password as is
2512 and the password in all-lower case.
2513
2514 If you find the connections are taking too long with this option then
2515 you probably have a slow crypt() routine. Samba now comes with a fast
2516 "ufc crypt" that you can select in the Makefile. You should also make
2517 sure the PASSWORD_LENGTH option is correct for your system in local.h
2518 and includes.h. On most systems only the first 8 chars of a password
2519 are significant so PASSWORD_LENGTH should be 8, but on some longer
2520 passwords are significant. The includes.h file tries to select the
2521 right length for your system.
2522
2523 .B Default:
2524         password level = 0
2525
2526 .B Example:
2527         password level = 4
2528
2529 .SS password server (G)
2530
2531 By specifying the name of another SMB server (such as a WinNT box)
2532 with this option, and using "security = server" you can get Samba to
2533 do all its username/password validation via a remote server.
2534
2535 This options sets the name of the password server to use. It must be a
2536 netbios name, so if the machine's netbios name is different from its
2537 internet name then you may have to add its netbios name to
2538 /etc/hosts.
2539
2540 The password server much be a machine capable of using the "LM1.2X002"
2541 or the "LM NT 0.12" protocol, and it must be in user level security
2542 mode. 
2543
2544 NOTE: Using a password server means your UNIX box (running Samba) is
2545 only as secure as your password server. DO NOT CHOOSE A PASSWORD
2546 SERVER THAT YOU DON'T COMPLETELY TRUST.
2547
2548 Never point a Samba server at itself for password serving. This will
2549 cause a loop and could lock up your Samba server!
2550
2551 The name of the password server takes the standard substitutions, but
2552 probably the only useful one is %m, which means the Samba server will
2553 use the incoming client as the password server. If you use this then
2554 you better trust your clients, and you better restrict them with hosts
2555 allow!
2556
2557 If you list several hosts in the "password server" option then smbd
2558 will try each in turn till it finds one that responds. This is useful
2559 in case your primary server goes down.
2560
2561 If you are using a WindowsNT server as your password server then you
2562 will have to ensure that your users are able to login from the Samba 
2563 server, as the network logon will appear to come from there rather
2564 than from the users workstation.
2565
2566 .SS path (S)
2567 A synonym for this parameter is 'directory'.
2568
2569 This parameter specifies a directory to which the user of the service is to
2570 be given access. In the case of printable services, this is where print data 
2571 will spool prior to being submitted to the host for printing.
2572
2573 For a printable service offering guest access, the service should be readonly
2574 and the path should be world-writable and have the sticky bit set. This is not
2575 mandatory of course, but you probably won't get the results you expect if you
2576 do otherwise.
2577
2578 Any occurrences of %u in the path will be replaced with the username
2579 that the client is connecting as. Any occurrences of %m will be
2580 replaced by the name of the machine they are connecting from. These
2581 replacements are very useful for setting up pseudo home directories
2582 for users.
2583
2584 Note that this path will be based on 'root dir' if one was specified.
2585 .B Default:
2586         none
2587
2588 .B Example:
2589         path = /home/fred+ 
2590
2591 .SS postexec (S)
2592
2593 This option specifies a command to be run whenever the service is
2594 disconnected. It takes the usual substitutions. The command may be run
2595 as the root on some systems.
2596
2597 An interesting example may be do unmount server resources:
2598
2599 postexec = /etc/umount /cdrom
2600
2601 See also preexec
2602
2603 .B Default:
2604       none (no command executed)
2605
2606 .B Example:
2607       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
2608
2609 .SS postscript (S)
2610 This parameter forces a printer to interpret the print files as
2611 postscript. This is done by adding a %! to the start of print output. 
2612
2613 This is most useful when you have lots of PCs that persist in putting
2614 a control-D at the start of print jobs, which then confuses your
2615 printer.
2616
2617 .B Default: 
2618         postscript = False
2619
2620 .B Example: 
2621         postscript = True
2622
2623 .SS preexec (S)
2624
2625 This option specifies a command to be run whenever the service is
2626 connected to. It takes the usual substitutions.
2627
2628 An interesting example is to send the users a welcome message every
2629 time they log in. Maybe a message of the day? Here is an example:
2630
2631 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
2632        /usr/local/samba/bin/smbclient -M %m -I %I' &
2633
2634 Of course, this could get annoying after a while :-)
2635
2636 See also postexec
2637
2638 .B Default:
2639         none (no command executed)
2640
2641 .B Example:
2642         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
2643
2644 .SS preferred master (G)
2645 This boolean parameter controls if Samba is a preferred master browser
2646 for its workgroup.
2647 If this is set to true, on startup, samba will force an election, 
2648 and it will have a slight advantage in winning the election.  
2649 It is recommended that this parameter is used in conjunction 
2650 with domain master = yes, so that samba can guarantee becoming 
2651 a domain master.  
2652
2653 Use this option with caution, because if there are several hosts
2654 (whether samba servers, Windows 95 or NT) that are preferred master
2655 browsers on the same subnet, they will each periodically and continuously
2656 attempt to become the local master browser.  This will result in
2657 unnecessary broadcast traffic and reduced browsing capabilities.
2658
2659 See
2660 .B os level = nn
2661
2662 .B Default:
2663         preferred master = no
2664
2665 .SS preload
2666 This is an alias for "auto services"
2667
2668 .SS preserve case (S)
2669
2670 This controls if new filenames are created with the case that the
2671 client passes, or if they are forced to be the "default" case.
2672
2673 .B Default:
2674        preserve case = no
2675
2676 See the section on "NAME MANGLING" for a fuller discussion.
2677
2678 .SS print command (S)
2679 After a print job has finished spooling to a service, this command will be
2680 used via a system() call to process the spool file. Typically the command 
2681 specified will submit the spool file to the host's printing subsystem, but
2682 there is no requirement that this be the case. The server will not remove the
2683 spool file, so whatever command you specify should remove the spool file when
2684 it has been processed, otherwise you will need to manually remove old spool
2685 files.
2686
2687 The print command is simply a text string. It will be used verbatim,
2688 with two exceptions: All occurrences of "%s" will be replaced by the
2689 appropriate spool file name, and all occurrences of "%p" will be
2690 replaced by the appropriate printer name. The spool file name is
2691 generated automatically by the server, the printer name is discussed
2692 below.
2693
2694 The full path name will be used for the filename if %s is not preceded
2695 by a /. If you don't like this (it can stuff up some lpq output) then
2696 use %f instead. Any occurrences of %f get replaced by the spool
2697 filename without the full path at the front.
2698
2699 The print command MUST contain at least one occurrence of "%s" or %f -
2700 the "%p" is optional. At the time a job is submitted, if no printer
2701 name is supplied the "%p" will be silently removed from the printer
2702 command.
2703
2704 If specified in the [global] section, the print command given will be used
2705 for any printable service that does not have its own print command specified.
2706
2707 If there is neither a specified print command for a printable service nor a 
2708 global print command, spool files will be created but not processed and (most
2709 importantly) not removed.
2710
2711 Note that printing may fail on some UNIXes from the "nobody"
2712 account. If this happens then create an alternative guest account that
2713 can print and set the "guest account" in the [global] section.
2714
2715 You can form quite complex print commands by realising that they are
2716 just passed to a shell. For example the following will log a print
2717 job, print the file, then remove it. Note that ; is the usual
2718 separator for command in shell scripts.
2719
2720 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
2721
2722 You may have to vary this command considerably depending on how you
2723 normally print files on your system.
2724
2725 .B Default:
2726         print command = lpr -r -P %p %s
2727
2728 .B Example:
2729         print command = /usr/local/samba/bin/myprintscript %p %s
2730 .SS print ok (S)
2731 See
2732 .B printable.
2733 .SS printable (S)
2734 A synonym for this parameter is 'print ok'.
2735
2736 If this parameter is 'yes', then clients may open, write to and submit spool 
2737 files on the directory specified for the service.
2738
2739 Note that a printable service will ALWAYS allow writing to the service path
2740 (user privileges permitting) via the spooling of print data. The 'read only'
2741 parameter controls only non-printing access to the resource.
2742
2743 .B Default:
2744         printable = no
2745
2746 .B Example:
2747         printable = yes
2748
2749 .SS printcap name (G)
2750 This parameter may be used to override the compiled-in default printcap
2751 name used by the server (usually /etc/printcap). See the discussion of the
2752 [printers] section above for reasons why you might want to do this.
2753
2754 For those of you without a printcap (say on SysV) you can just create a
2755 minimal file that looks like a printcap and set "printcap name =" in
2756 [global] to point at it.
2757
2758 A minimal printcap file would look something like this:
2759
2760 print1|My Printer 1
2761 .br
2762 print2|My Printer 2
2763 .br
2764 print3|My Printer 3
2765 .br
2766 print4|My Printer 4
2767 .br
2768 print5|My Printer 5
2769
2770 where the | separates aliases of a printer. The fact that the second
2771 alias has a space in it gives a hint to Samba that it's a comment.
2772
2773 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2774 will assume the file is in AIX "qconfig" format if the string
2775 "/qconfig" appears in the printcap filename.
2776
2777 .B Default:
2778         printcap name = /etc/printcap
2779
2780 .B Example:
2781         printcap name = /etc/myprintcap
2782
2783 .SS printer (S)
2784 A synonym for this parameter is 'printer name'.
2785
2786 This parameter specifies the name of the printer to which print jobs spooled
2787 through a printable service will be sent.
2788
2789 If specified in the [global] section, the printer name given will be used
2790 for any printable service that does not have its own printer name specified.
2791
2792 .B Default:
2793         none (but may be 'lp' on many systems)
2794
2795 .B Example:
2796         printer name = laserwriter
2797
2798 .SS printer driver (S)
2799 This option allows you to control the string that clients receive when
2800 they ask the server for the printer driver associated with a
2801 printer. If you are using Windows95 or WindowsNT then you can use this
2802 to automate the setup of printers on your system.
2803
2804 You need to set this parameter to the exact string (case sensitive)
2805 that describes the appropriate printer driver for your system. 
2806 If you don't know the exact string to use then you should first try
2807 with no "printer driver" option set and the client will give you a
2808 list of printer drivers. The appropriate strings are shown in a
2809 scrollbox after you have chosen the printer manufacturer.
2810
2811 .B Example:
2812         printer driver = HP LaserJet 4L
2813
2814 .SS printer name (S)
2815 See
2816 .B printer.
2817
2818 .SS printer driver file (G)
2819 This parameter tells Samba where the printer driver definition file,
2820 used when serving drivers to Windows 95 clients, is to be found. If
2821 this is not set, the default is :
2822
2823 SAMBA_INSTALL_DIRECTORY/lib/printers.def
2824
2825 This file is created from Windows 95 'msprint.def' files found on the
2826 Windows 95 client system. For more details on setting up serving of
2827 printer drivers to Windows 95 clients, see the documentation file
2828 docs/PRINTER_DRIVER.txt.
2829
2830 .B Default:
2831     None (set in compile).
2832
2833 .B Example:
2834     printer driver file = /usr/local/samba/printers/drivers.def
2835
2836 Related parameters.
2837 .B printer driver location
2838
2839 .SS printer driver location (S)
2840 This parameter tells clients of a particular printer share where
2841 to find the printer driver files for the automatic installation
2842 of drivers for Windows 95 machines. If Samba is set up to serve
2843 printer drivers to Windows 95 machines, this should be set to
2844
2845 \e\eMACHINE\ePRINTER$
2846
2847 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$ 
2848 is a share you set up for serving printer driver files. For more 
2849 details on setting this up see the documentation file 
2850 docs/PRINTER_DRIVER.txt.
2851
2852 .B Default:
2853     None
2854
2855 .B Example:
2856     printer driver location = \e\eMACHINE\ePRINTER$
2857
2858 Related paramerers.
2859 .B printer driver file
2860
2861
2862 .SS printing (G)
2863 This parameters controls how printer status information is interpreted
2864 on your system, and also affects the default values for the "print
2865 command", "lpq command" and "lprm command".
2866
2867 Currently six printing styles are supported. They are "printing =
2868 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2869 "printing = qnx" and "printing = plp".
2870
2871 To see what the defaults are for the other print commands when using
2872 these three options use the "testparm" program.
2873
2874
2875 .SS protocol (G)
2876 The value of the parameter (a string) is the highest protocol level that will
2877 be supported by the server. 
2878
2879 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
2880 merits of each are discussed in the README file.
2881
2882 Normally this option should not be set as the automatic negotiation
2883 phase in the SMB protocol takes care of choosing the appropriate protocol.
2884
2885 .B Default:
2886         protocol = NT1
2887
2888 .B Example:
2889         protocol = LANMAN1
2890 .SS public (S)
2891 A synonym for this parameter is 'guest ok'.
2892
2893 If this parameter is 'yes' for a service, then no password is required
2894 to connect to the service. Privileges will be those of the guest
2895 account.
2896
2897 See the section below on user/password validation for more information about
2898 this option.
2899
2900 .B Default:
2901         public = no
2902
2903 .B Example:
2904         public = yes
2905 .SS read list (S)
2906 This is a list of users that are given read-only access to a
2907 service. If the connecting user is in this list then they will
2908 not be given write access, no matter what the "read only" option
2909 is set to. The list can include group names using the @group syntax.
2910
2911 See also the "write list" option
2912
2913 .B Default:
2914      read list =
2915
2916 .B Example:
2917      read list = mary, @students
2918
2919 .SS read only (S)
2920 See
2921 .B writable
2922 and
2923 .B write ok.
2924 Note that this is an inverted synonym for writable and write ok.
2925 .SS read prediction (G)
2926 This options enables or disables the read prediction code used to
2927 speed up reads from the server. When enabled the server will try to
2928 pre-read data from the last accessed file that was opened read-only
2929 while waiting for packets.
2930
2931 .SS Default:
2932         read prediction = False
2933
2934 .SS Example:
2935         read prediction = True
2936 .SS read raw (G)
2937 This parameter controls whether or not the server will support raw reads when
2938 transferring data to clients.
2939
2940 If enabled, raw reads allow reads of 65535 bytes in one packet. This
2941 typically provides a major performance benefit.
2942
2943 However, some clients either negotiate the allowable block size incorrectly
2944 or are incapable of supporting larger block sizes, and for these clients you
2945 may need to disable raw reads.
2946
2947 In general this parameter should be viewed as a system tuning tool and left
2948 severely alone. See also
2949 .B write raw.
2950
2951 .B Default:
2952         read raw = yes
2953
2954 .B Example:
2955         read raw = no
2956 .SS read size (G)
2957
2958 The option "read size" affects the overlap of disk reads/writes with
2959 network reads/writes. If the amount of data being transferred in
2960 several of the SMB commands (currently SMBwrite, SMBwriteX and
2961 SMBreadbraw) is larger than this value then the server begins writing
2962 the data before it has received the whole packet from the network, or
2963 in the case of SMBreadbraw, it begins writing to the network before
2964 all the data has been read from disk.
2965
2966 This overlapping works best when the speeds of disk and network access
2967 are similar, having very little effect when the speed of one is much
2968 greater than the other.
2969
2970 The default value is 2048, but very little experimentation has been
2971 done yet to determine the optimal value, and it is likely that the best
2972 value will vary greatly between systems anyway. A value over 65536 is
2973 pointless and will cause you to allocate memory unnecessarily.
2974
2975 .B Default:
2976         read size = 2048
2977
2978 .B Example:
2979         read size = 8192
2980
2981 .SS remote announce (G)
2982
2983 This option allows you to setup nmbd to periodically announce itself
2984 to arbitrary IP addresses with an arbitrary workgroup name. 
2985
2986 This is useful if you want your Samba server to appear in a remote
2987 workgroup for which the normal browse propagation rules don't
2988 work. The remote workgroup can be anywhere that you can send IP
2989 packets to.
2990
2991 For example:
2992
2993        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
2994
2995 the above line would cause nmbd to announce itself to the two given IP
2996 addresses using the given workgroup names. If you leave out the
2997 workgroup name then the one given in the "workgroup" option is used
2998 instead. 
2999
3000 The IP addresses you choose would normally be the broadcast addresses
3001 of the remote networks, but can also be the IP addresses of known
3002 browse masters if your network config is that stable.
3003
3004 This option replaces similar functionality from the nmbd lmhosts file.
3005
3006 .SS remote browse sync (G)
3007
3008 This option allows you to setup nmbd to periodically request synchronisation
3009 of browse lists with the master browser of a samba server that is on a remote
3010 segment. This option will allow you to gain browse lists for multiple
3011 workgroups across routed networks. This is done in a manner that does not work
3012 with any non-samba servers.
3013
3014 This is useful if you want your Samba server and all local clients
3015 to appear in a remote workgroup for which the normal browse propagation
3016 rules don't work. The remote workgroup can be anywhere that you can send IP
3017 packets to.
3018
3019 For example:
3020
3021        remote browse sync = 192.168.2.255 192.168.4.255
3022
3023 the above line would cause nmbd to request the master browser on the
3024 specified subnets or addresses to synchronise their browse lists with
3025 the local server.
3026
3027 The IP addresses you choose would normally be the broadcast addresses
3028 of the remote networks, but can also be the IP addresses of known
3029 browse masters if your network config is that stable. If a machine IP
3030 address is given Samba makes NO attempt to validate that the remote
3031 machine is available, is listening, nor that it is in fact the browse
3032 master on it's segment.
3033
3034
3035 .SS revalidate (S)
3036
3037 This options controls whether Samba will allow a previously validated
3038 username/password pair to be used to attach to a share. Thus if you
3039 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
3040 automatically allow the client to request connection to the second
3041 share as the same username as the first without a password.
3042
3043 If "revalidate" is True then the client will be denied automatic
3044 access as the same username.
3045
3046 .B Default:
3047         revalidate = False
3048
3049 .B Example:
3050         revalidate = True
3051
3052 .SS root (G)
3053 See
3054 .B root directory.
3055 .SS root dir (G)
3056 See
3057 .B root directory.
3058 .SS root directory (G)
3059 Synonyms for this parameter are 'root dir' and 'root'.
3060
3061 The server will chroot() to this directory on startup. This is not 
3062 strictly necessary for secure operation. Even without it the server
3063 will deny access to files not in one of the service entries. It may 
3064 also check for, and deny access to, soft links to other parts of the 
3065 filesystem, or attempts to use .. in file names to access other 
3066 directories (depending on the setting of the "wide links" parameter).
3067
3068 Adding a "root dir" entry other than "/" adds an extra level of security, 
3069 but at a price. It absolutely ensures that no access is given to files not
3070 in the sub-tree specified in the "root dir" option, *including* some files 
3071 needed for complete operation of the server. To maintain full operability
3072 of the server you will need to mirror some system files into the "root dir"
3073 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
3074 and any binaries or configuration files needed for printing (if required). 
3075 The set of files that must be mirrored is operating system dependent.
3076
3077 .B Default:
3078         root directory = /
3079
3080 .B Example:
3081         root directory = /homes/smb
3082 .SS root postexec (S)
3083
3084 This is the same as postexec except that the command is run as
3085 root. This is useful for unmounting filesystems (such as cdroms) after
3086 a connection is closed.
3087
3088 .SS root preexec (S)
3089
3090 This is the same as preexec except that the command is run as
3091 root. This is useful for mounting filesystems (such as cdroms) before
3092 a connection is finalised.
3093
3094 .SS security (G)
3095 This option affects how clients respond to Samba.
3096
3097 The option sets the "security mode bit" in replies to protocol negotiations
3098 to turn share level security on or off. Clients decide based on this bit 
3099 whether (and how) to transfer user and password information to the server.
3100
3101 The default is "security=SHARE", mainly because that was the only
3102 option at one stage.
3103
3104 The alternatives are "security = user" or "security = server". 
3105
3106 If your PCs use usernames that are the same as their usernames on the
3107 UNIX machine then you will want to use "security = user". If you
3108 mostly use usernames that don't exist on the UNIX box then use
3109 "security = share".
3110
3111 There is a bug in WfWg that may affect your decision. When in user
3112 level security a WfWg client will totally ignore the password you type
3113 in the "connect drive" dialog box. This makes it very difficult (if
3114 not impossible) to connect to a Samba service as anyone except the
3115 user that you are logged into WfWg as.
3116
3117 If you use "security = server" then Samba will try to validate the
3118 username/password by passing it to another SMB server, such as an NT
3119 box. If this fails it will revert to "security = USER".
3120
3121 See the "password server" option for more details.
3122
3123 .B Default:
3124         security = SHARE
3125
3126 .B Example:
3127         security = USER
3128 .SS server string (G)
3129 This controls what string will show up in the printer comment box in
3130 print manager and next to the IPC connection in "net view". It can be
3131 any string that you wish to show to your users.
3132
3133 It also sets what will appear in browse lists next to the machine name.
3134
3135 A %v will be replaced with the Samba version number.
3136
3137 A %h will be replaced with the hostname.
3138
3139 .B Default:
3140         server string = Samba %v
3141
3142 .B Example:
3143         server string = University of GNUs Samba Server
3144
3145 .SS set directory (S)
3146 If 'set directory = no', then users of the service may not use the setdir
3147 command to change directory.
3148
3149 The setdir command is only implemented in the Digital Pathworks client. See the
3150 Pathworks documentation for details.
3151
3152 .B Default:
3153         set directory = no
3154
3155 .B Example:
3156         set directory = yes
3157
3158 .SS shared file entries (G)
3159 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3160 It specifies the number of hash bucket entries used for share file locking.
3161 You should never change this parameter unless you have studied the source 
3162 and know what you are doing.
3163
3164 .B Default
3165         shared file entries = 113
3166
3167 .SS shared mem size (G)
3168 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3169 It specifies the size of the shared memory (in bytes) to use between smbd 
3170 processes. You should never change this parameter unless you have studied 
3171 the source and know what you are doing.
3172
3173 .B Default
3174         shared mem size = 102400
3175
3176 .SS smb passwd file (G)
3177 This option sets the path to the encrypted smbpasswd file. This is a *VERY
3178 DANGEROUS OPTION* if the smb.conf is user writable. By default the path
3179 to the smbpasswd file is compiled into Samba.
3180
3181 .SS smbrun (G)
3182 This sets the full path to the smbrun binary. This defaults to the
3183 value in the Makefile.
3184
3185 You must get this path right for many services to work correctly.
3186
3187 .B Default:
3188 taken from Makefile
3189
3190 .B Example:
3191         smbrun = /usr/local/samba/bin/smbrun
3192
3193 .SS share modes (S)
3194
3195 This enables or disables the honouring of the "share modes" during a
3196 file open. These modes are used by clients to gain exclusive read or
3197 write access to a file. 
3198
3199 These open modes are not directly supported by UNIX, so they are
3200 simulated using lock files in the "lock directory". The "lock
3201 directory" specified in smb.conf must be readable by all users.
3202
3203 The share modes that are enabled by this option are DENY_DOS,
3204 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
3205
3206 Enabling this option gives full share compatibility but may cost a bit
3207 of processing time on the UNIX server. They are enabled by default.
3208
3209 .B Default:
3210         share modes = yes
3211
3212 .B Example:
3213         share modes = no
3214
3215 .SS short preserve case (S)
3216
3217 This controls if new short filenames are created with the case that
3218 the client passes, or if they are forced to be the "default" case.
3219
3220 .B Default:
3221        short preserve case = no
3222
3223 See the section on "NAME MANGLING" for a fuller discussion.
3224
3225 .SS socket address (G)
3226
3227 This option allows you to control what address Samba will listen for
3228 connections on. This is used to support multiple virtual interfaces on
3229 the one server, each with a different configuration.
3230
3231 By default samba will accept connections on any address.
3232
3233 .B Example:
3234         socket address = 192.168.2.20
3235
3236 .SS socket options (G)
3237 This option (which can also be invoked with the -O command line
3238 option) allows you to set socket options to be used when talking with
3239 the client.
3240
3241 Socket options are controls on the networking layer of the operating
3242 systems which allow the connection to be tuned.
3243
3244 This option will typically be used to tune your Samba server for
3245 optimal performance for your local network. There is no way that Samba
3246 can know what the optimal parameters are for your net, so you must
3247 experiment and choose them yourself. I strongly suggest you read the
3248 appropriate documentation for your operating system first (perhaps
3249 "man setsockopt" will help).
3250
3251 You may find that on some systems Samba will say "Unknown socket
3252 option" when you supply an option. This means you either mis-typed it
3253 or you need to add an include file to includes.h for your OS. If the
3254 latter is the case please send the patch to me
3255 (samba-bugs@samba.anu.edu.au).
3256
3257 Any of the supported socket options may be combined in any way you
3258 like, as long as your OS allows it.
3259
3260 This is the list of socket options currently settable using this
3261 option:
3262
3263   SO_KEEPALIVE
3264
3265   SO_REUSEADDR
3266
3267   SO_BROADCAST
3268
3269   TCP_NODELAY
3270
3271   IPTOS_LOWDELAY
3272
3273   IPTOS_THROUGHPUT
3274
3275   SO_SNDBUF *
3276
3277   SO_RCVBUF *
3278
3279   SO_SNDLOWAT *
3280
3281   SO_RCVLOWAT *
3282
3283 Those marked with a * take an integer argument. The others can
3284 optionally take a 1 or 0 argument to enable or disable the option, by
3285 default they will be enabled if you don't specify 1 or 0.
3286
3287 To specify an argument use the syntax SOME_OPTION=VALUE for example
3288 SO_SNDBUF=8192. Note that you must not have any spaces before or after
3289 the = sign.
3290
3291 If you are on a local network then a sensible option might be
3292
3293 socket options = IPTOS_LOWDELAY
3294
3295 If you have an almost unloaded local network and you don't mind a lot
3296 of extra CPU usage in the server then you could try
3297
3298 socket options = IPTOS_LOWDELAY TCP_NODELAY
3299
3300 If you are on a wide area network then perhaps try setting
3301 IPTOS_THROUGHPUT. 
3302
3303 Note that several of the options may cause your Samba server to fail
3304 completely. Use these options with caution!
3305
3306 .B Default:
3307         no socket options
3308
3309 .B Example:
3310         socket options = IPTOS_LOWDELAY 
3311
3312
3313
3314
3315 .SS status (G)
3316 This enables or disables logging of connections to a status file that
3317 .B smbstatus
3318 can read.
3319
3320 With this disabled
3321 .B smbstatus
3322 won't be able to tell you what
3323 connections are active.
3324
3325 .B Default:
3326         status = yes
3327
3328 .B Example:
3329         status = no
3330
3331 .SS strict locking (S)
3332 This is a boolean that controls the handling of file locking in the
3333 server. When this is set to yes the server will check every read and
3334 write access for file locks, and deny access if locks exist. This can
3335 be slow on some systems.
3336
3337 When strict locking is "no" the server does file lock checks only when
3338 the client explicitly asks for them. 
3339
3340 Well behaved clients always ask for lock checks when it is important,
3341 so in the vast majority of cases "strict locking = no" is preferable.
3342
3343 .B Default:
3344         strict locking = no
3345
3346 .B Example:
3347         strict locking = yes
3348
3349 .SS strip dot (G)
3350 This is a boolean that controls whether to strip trailing dots off
3351 UNIX filenames. This helps with some CDROMs that have filenames ending in a
3352 single dot.
3353
3354 .B Default:
3355         strip dot = no
3356
3357 .B Example:
3358     strip dot = yes
3359
3360 .SS syslog (G)
3361 This parameter maps how Samba debug messages are logged onto the
3362 system syslog logging levels. Samba debug level zero maps onto
3363 syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug
3364 level two maps to LOG_NOTICE, debug level three maps onto LOG_INFO.
3365 The paramter sets the threshold for doing the mapping, all Samba
3366 debug messages above this threashold are mapped to syslog LOG_DEBUG
3367 messages.
3368
3369 .B Default:
3370
3371         syslog = 1
3372
3373 .SS syslog only (G)
3374 If this parameter is set then Samba debug messages are logged into
3375 the system syslog only, and not to the debug log files.
3376
3377 .B Default:
3378         syslog only = no
3379
3380 .SS sync always (S)
3381
3382 This is a boolean parameter that controls whether writes will always
3383 be written to stable storage before the write call returns. If this is
3384 false then the server will be guided by the client's request in each
3385 write call (clients can set a bit indicating that a particular write
3386 should be synchronous). If this is true then every write will be
3387 followed by a fsync() call to ensure the data is written to disk.
3388
3389 .B Default:
3390         sync always = no
3391
3392 .B Example:
3393         sync always = yes
3394
3395 .SS time offset (G)
3396 This parameter is a setting in minutes to add to the normal GMT to
3397 local time conversion. This is useful if you are serving a lot of PCs
3398 that have incorrect daylight saving time handling.
3399
3400 .B Default:
3401         time offset = 0
3402
3403 .B Example:
3404         time offset = 60
3405
3406 .SS time server (G)
3407 This parameter determines if nmbd advertises itself as a time server
3408 to Windows clients. The default is False.
3409
3410 .B Default:
3411         time server = False
3412
3413 .B Example:
3414         time server = True
3415
3416 .SS unix realname (G)
3417 This boolean parameter when set causes samba to supply the real name field
3418 from the unix password file to the client. This is useful for setting up
3419 mail clients and WWW browsers on systems used by more than one person.
3420
3421 .B Default:
3422         unix realname = no
3423
3424 .B Example:
3425         unix realname = yes
3426
3427 .SS user (S)
3428 See
3429 .B username.
3430 .SS username (S)
3431 A synonym for this parameter is 'user'.
3432
3433 Multiple users may be specified in a comma-delimited list, in which case the
3434 supplied password will be tested against each username in turn (left to right).
3435
3436 The username= line is needed only when the PC is unable to supply its own
3437 username. This is the case for the coreplus protocol or where your
3438 users have different WfWg usernames to UNIX usernames. In both these
3439 cases you may also be better using the \e\eserver\eshare%user syntax
3440 instead. 
3441
3442 The username= line is not a great solution in many cases as it means Samba
3443 will try to validate the supplied password against each of the
3444 usernames in the username= line in turn. This is slow and a bad idea for
3445 lots of users in case of duplicate passwords. You may get timeouts or
3446 security breaches using this parameter unwisely.
3447
3448 Samba relies on the underlying UNIX security. This parameter does not
3449 restrict who can login, it just offers hints to the Samba server as to
3450 what usernames might correspond to the supplied password. Users can
3451 login as whoever they please and they will be able to do no more
3452 damage than if they started a telnet session. The daemon runs as the
3453 user that they log in as, so they cannot do anything that user cannot
3454 do.
3455
3456 To restrict a service to a particular set of users you can use the
3457 "valid users=" line.
3458
3459 If any of the usernames begin with a @ then the name will be looked up
3460 in the groups file and will expand to a list of all users in the group
3461 of that name. Note that searching though a groups file can take quite
3462 some time, and some clients may time out during the search.
3463
3464 See the section below on username/password validation for more information
3465 on how this parameter determines access to the services.
3466
3467 .B Default:
3468         The guest account if a guest service, else the name of the service.
3469
3470 .B Examples:
3471         username = fred
3472         username = fred, mary, jack, jane, @users, @pcgroup
3473
3474 .SS username level (G)
3475
3476 This option helps Samba to try and 'guess' at the real UNIX username,
3477 as many DOS clients send an all-uppercase username. By default Samba
3478 tries all lowercase, followed by the username with the first letter
3479 capitalized, and fails if the username is not found on the UNIX machine.
3480
3481 If this parameter is set to non-zero the behaviour changes. This 
3482 parameter is a number that specifies the number of uppercase combinations 
3483 to try whilst trying to determine the UNIX user name. The higher the number
3484 the more combinations will be tried, but the slower the discovery
3485 of usernames will be. Use this parameter when you have strange
3486 usernames on your UNIX machine, such as 'AstrangeUser'.
3487
3488 .B Default:
3489     username level = 0
3490
3491 .B Example:
3492     username level = 5
3493
3494 .SS username map (G)
3495
3496 This option allows you to to specify a file containing a mapping of
3497 usernames from the clients to the server. This can be used for several
3498 purposes. The most common is to map usernames that users use on DOS or
3499 Windows machines to those that the UNIX box uses. The other is to map
3500 multiple users to a single username so that they can more easily share
3501 files.
3502
3503 The map file is parsed line by line. Each line should contain a single
3504 UNIX username on the left then a '=' followed by a list of usernames
3505 on the right. The list of usernames on the right may contain names of
3506 the form @group in which case they will match any UNIX username in
3507 that group. The special client name '*' is a wildcard and matches any
3508 name.
3509
3510 The file is processed on each line by taking the supplied username and
3511 comparing it with each username on the right hand side of the '='
3512 signs. If the supplied name matches any of the names on the right
3513 hand side then it is replaced with the name on the left. Processing
3514 then continues with the next line.
3515
3516 If any line begins with a '#' or a ';' then it is ignored
3517
3518 For example to map from the name "admin" or "administrator" to the UNIX
3519 name "root" you would use
3520
3521         root = admin administrator
3522
3523 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
3524 would use
3525
3526         sys = @system
3527
3528 You can have as many mappings as you like in a username map file.
3529
3530 You can map Windows usernames that have spaces in them by using double
3531 quotes around the name. For example:
3532
3533         tridge = "Andrew Tridgell"
3534
3535 would map the windows username "Andrew Tridgell" to the unix username
3536 tridge.
3537
3538 Note that the remapping is applied to all occurrences of
3539 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
3540 remapped to "mary" then you will actually be connecting to
3541 "\e\eserver\emary" and will need to supply a password suitable for
3542 "mary" not "fred". The only exception to this is the username passed
3543 to the "password server" (if you have one). The password server will
3544 receive whatever username the client supplies without modification.
3545
3546 Also note that no reverse mapping is done. The main effect this has is
3547 with printing. Users who have been mapped may have trouble deleting
3548 print jobs as PrintManager under WfWg will think they don't own the
3549 print job.
3550
3551 .B Default
3552         no username map
3553
3554 .B Example
3555         username map = /usr/local/samba/lib/users.map
3556
3557 .SS valid chars (S)
3558
3559 The option allows you to specify additional characters that should be
3560 considered valid by the server in filenames. This is particularly
3561 useful for national character sets, such as adding u-umlaut or a-ring.
3562
3563 The option takes a list of characters in either integer or character
3564 form with spaces between them. If you give two characters with a colon
3565 between them then it will be taken as an lowercase:uppercase pair.
3566
3567 If you have an editor capable of entering the characters into the
3568 config file then it is probably easiest to use this method. Otherwise
3569 you can specify the characters in octal, decimal or hexadecimal form
3570 using the usual C notation.
3571
3572 For example to add the single character 'Z' to the charset (which is a
3573 pointless thing to do as it's already there) you could do one of the
3574 following
3575
3576 valid chars = Z
3577 valid chars = z:Z
3578 valid chars = 0132:0172
3579
3580 The last two examples above actually add two characters, and alter
3581 the uppercase and lowercase mappings appropriately.
3582
3583 Note that you MUST specify this parameter after the "client code page"
3584 parameter if you have both set. If "client code page" is set after
3585 the "valid chars" parameter the "valid chars" settings will be
3586 overwritten.
3587
3588 See also the "client code page" parameter.
3589
3590 .B Default
3591 .br
3592         Samba defaults to using a reasonable set of valid characters
3593 .br
3594         for english systems
3595
3596 .B Example
3597         valid chars = 0345:0305 0366:0326 0344:0304
3598
3599 The above example allows filenames to have the swedish characters in
3600 them. 
3601
3602 NOTE: It is actually quite difficult to correctly produce a "valid
3603 chars" line for a particular system. To automate the process
3604 tino@augsburg.net has written a package called "validchars" which will
3605 automatically produce a complete "valid chars" line for a given client
3606 system. Look in the examples subdirectory for this package.
3607
3608 .SS valid users (S)
3609 This is a list of users that should be allowed to login to this
3610 service. A name starting with @ is interpreted as a UNIX group.
3611
3612 If this is empty (the default) then any user can login. If a username
3613 is in both this list and the "invalid users" list then access is
3614 denied for that user.
3615
3616 The current servicename is substituted for %S. This is useful in the
3617 [homes] section.
3618
3619 See also "invalid users"
3620
3621 .B Default
3622         No valid users list. (anyone can login)
3623
3624 .B Example
3625         valid users = greg, @pcusers
3626
3627
3628 .SS veto files(S)
3629 This is a list of files and directories that are neither visible nor
3630 accessible.  Each entry in the list must be separated by a "/", which
3631 allows spaces to be included in the entry.  '*' and '?' can be used to
3632 specify multiple files or directories as in DOS wildcards.
3633
3634 Each entry must be a unix path, not a DOS path and must not include the 
3635 unix directory separator "/".
3636
3637 Note that the case sensitivity option is applicable in vetoing files.
3638
3639 One feature of the veto files parameter that it is important to be
3640 aware of, is that if a directory contains nothing but files that
3641 match the veto files parameter (which means that Windows/DOS clients
3642 cannot ever see them) is deleted, the veto files within that directory
3643 *are automatically deleted* along with it, if the user has UNIX permissions
3644 to do so.
3645  
3646 Setting this parameter will affect the performance of Samba, as
3647 it will be forced to check all files and directories for a match
3648 as they are scanned.
3649
3650 See also "hide files" and "case sensitive"
3651
3652 .B Default
3653         No files or directories are vetoed.
3654
3655 .B Examples
3656     Example 1.
3657     Veto any files containing the word Security, 
3658     any ending in .tmp, and any directory containing the
3659     word root.
3660
3661         veto files = /*Security*/*.tmp/*root*/
3662
3663     Example 2.
3664     Veto the Apple specific files that a NetAtalk server
3665     creates.
3666
3667     veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
3668
3669 .SS volume (S)
3670 This allows you to override the volume label returned for a
3671 share. Useful for CDROMs with installation programs that insist on a
3672 particular volume label.
3673
3674 The default is the name of the share
3675
3676 .SS wide links (S)
3677 This parameter controls whether or not links in the UNIX file system may be
3678 followed by the server. Links that point to areas within the directory tree
3679 exported by the server are always allowed; this parameter controls access 
3680 only to areas that are outside the directory tree being exported.
3681
3682 .B Default:
3683         wide links = yes
3684
3685 .B Example:
3686         wide links = no
3687
3688 .SS wins proxy (G)
3689
3690 This is a boolean that controls if nmbd will respond to broadcast name
3691 queries on behalf of other hosts. You may need to set this to no for
3692 some older clients.
3693
3694 .B Default:
3695         wins proxy = no
3696 .SS wins server (G)
3697
3698 This specifies the DNS name (or IP address) of the WINS server that Samba 
3699 should register with. If you have a WINS server on your network then you
3700 should set this to the WINS servers name.
3701
3702 You should point this at your WINS server if you have a multi-subnetted
3703 network.
3704 .B Default:
3705         wins server = 
3706
3707 .SS wins support (G)
3708
3709 This boolean controls if Samba will act as a WINS server. You should
3710 not set this to true unless you have a multi-subnetted network and
3711 you wish a particular nmbd to be your WINS server. Note that you
3712 should *NEVER* set this to true on more than one machine in your
3713 network.
3714
3715 .B Default:
3716         wins support = no
3717 .SS workgroup (G)
3718
3719 This controls what workgroup your server will appear to be in when
3720 queried by clients. 
3721
3722 .B Default:
3723         set in the Makefile
3724
3725 .B Example:
3726         workgroup = MYGROUP
3727
3728 .SS writable (S)
3729 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
3730
3731 If this parameter is 'no', then users of a service may not create or modify
3732 files in the service's directory.
3733
3734 Note that a printable service ('printable = yes') will ALWAYS allow 
3735 writing to the directory (user privileges permitting), but only via
3736 spooling operations.
3737
3738 .B Default:
3739         writable = no
3740
3741 .B Examples:
3742         read only = no
3743         writable = yes
3744         write ok = yes
3745 .SS write list (S)
3746 This is a list of users that are given read-write access to a
3747 service. If the connecting user is in this list then they will be
3748 given write access, no matter what the "read only" option is set
3749 to. The list can include group names using the @group syntax.
3750
3751 Note that if a user is in both the read list and the write list then
3752 they will be given write access.
3753
3754 See also the "read list" option
3755
3756 .B Default:
3757      write list =
3758
3759 .B Example:
3760      write list = admin, root, @staff
3761
3762 .SS write ok (S)
3763 See
3764 .B writable
3765 and
3766 .B read only.
3767 .SS write raw (G)
3768 This parameter controls whether or not the server will support raw writes when
3769 transferring data from clients.
3770
3771 .B Default:
3772         write raw = yes
3773
3774 .B Example:
3775         write raw = no
3776 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
3777 There are a number of ways in which a user can connect to a
3778 service. The server follows the following steps in determining if it
3779 will allow a connection to a specified service. If all the steps fail
3780 then the connection request is rejected. If one of the steps pass then
3781 the following steps are not checked.
3782
3783 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
3784
3785 Step 1: If the client has passed a username/password pair and that
3786 username/password pair is validated by the UNIX system's password
3787 programs then the connection is made as that username. Note that this
3788 includes the \e\eserver\eservice%username method of passing a username.
3789
3790 Step 2: If the client has previously registered a username with the
3791 system and now supplies a correct password for that username then the
3792 connection is allowed.
3793
3794 Step 3: The client's netbios name and any previously used user names
3795 are checked against the supplied password, if they match then the
3796 connection is allowed as the corresponding user.
3797
3798 Step 4: If the client has previously validated a username/password
3799 pair with the server and the client has passed the validation token
3800 then that username is used. This step is skipped if "revalidate = yes" 
3801 for this service.
3802
3803 Step 5: If a "user = " field is given in the smb.conf file for the
3804 service and the client has supplied a password, and that password
3805 matches (according to the UNIX system's password checking) with one of
3806 the usernames from the user= field then the connection is made as the
3807 username in the "user=" line. If one of the username in the user= list
3808 begins with a @ then that name expands to a list of names in the group
3809 of the same name.
3810
3811 Step 6: If the service is a guest service then a connection is made as
3812 the username given in the "guest account =" for the service,
3813 irrespective of the supplied password.
3814 .SH WARNINGS
3815 Although the configuration file permits service names to contain spaces, 
3816 your client software may not. Spaces will be ignored in comparisons anyway,
3817 so it shouldn't be a problem - but be aware of the possibility.
3818
3819 On a similar note, many clients - especially DOS clients - limit service
3820 names to eight characters. Smbd has no such limitation, but attempts
3821 to connect from such clients will fail if they truncate the service names.
3822 For this reason you should probably keep your service names down to eight 
3823 characters in length.
3824
3825 Use of the [homes] and [printers] special sections make life for an 
3826 administrator easy, but the various combinations of default attributes can be
3827 tricky. Take extreme care when designing these sections. In particular,
3828 ensure that the permissions on spool directories are correct.
3829 .SH VERSION
3830 This man page is (mostly) correct for version 1.9.18 of the Samba suite, plus some
3831 of the recent patches to it. These notes will necessarily lag behind 
3832 development of the software, so it is possible that your version of 
3833 the server has extensions or parameter semantics that differ from or are not 
3834 covered by this man page. Please notify these to the address below for 
3835 rectification.
3836
3837 Prior to version 1.5.21 of the Samba suite, the configuration file was
3838 radically different (more primitive). If you are using a version earlier than
3839 1.8.05, it is STRONGLY recommended that you upgrade.
3840 .SH OPTIONS
3841 Not applicable.
3842 .SH FILES
3843 Not applicable.
3844 .SH ENVIRONMENT VARIABLES
3845 Not applicable.
3846 .SH SEE ALSO
3847 .BR smbd (8),
3848 .BR smbclient (1),
3849 .BR nmbd (8),
3850 .BR testparm (1), 
3851 .BR testprns (1),
3852 .BR lpq (1),
3853 .BR hosts_access (5)
3854 .SH DIAGNOSTICS
3855 [This section under construction]
3856
3857 Most diagnostics issued by the server are logged in a specified log file. The
3858 log file name is specified at compile time, but may be overridden on the
3859 smbd command line (see
3860 .BR smbd (8)).
3861
3862 The number and nature of diagnostics available depends on the debug level used
3863 by the server. If you have problems, set the debug level to 3 and peruse the
3864 log files.
3865
3866 Most messages are reasonably self-explanatory. Unfortunately, at time of
3867 creation of this man page the source code is still too fluid to warrant
3868 describing each and every diagnostic. At this stage your best bet is still
3869 to grep the source code and inspect the conditions that gave rise to the 
3870 diagnostics you are seeing.
3871 .SH BUGS
3872 None known.
3873
3874 Please send bug reports, comments and so on to:
3875
3876 .RS 3
3877 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3878
3879 .RS 3
3880 or to the mailing list:
3881 .RE
3882
3883 .B samba@listproc.anu.edu.au
3884
3885 .RE
3886 You may also like to subscribe to the announcement channel:
3887
3888 .RS 3
3889 .B samba-announce@listproc.anu.edu.au
3890 .RE
3891
3892 To subscribe to these lists send a message to
3893 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
3894 Name" or "subscribe samba-announce Your Name".
3895
3896 Errors or suggestions for improvements to the Samba man pages should be 
3897 mailed to:
3898
3899 .RS 3
3900 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3901 .RE
3902