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