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