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