preparing for release of 1.9.18
[Samba.git] / docs / manpages / smb.conf.5
blobed06d6abaa51af7e6e86357580ac539c8953507f
1 .TH SMB.CONF 5 "08 Jan 1998" "smb.conf 1.9.18"
2 .SH NAME
3 smb.conf \- configuration file for smbd
4 .SH SYNOPSIS
5 .B smb.conf
6 .SH DESCRIPTION
7 The
8 .B smb.conf
9 file is a configuration file for the Samba suite.
11 .B smb.conf
12 contains runtime configuration information for the
13 .B smbd
14 program. The
15 .B smbd
16 program provides LanManager-like services to clients
17 using the SMB protocol.
18 .SH FILE FORMAT
19 The file consists of sections and parameters. A section begins with the 
20 name of the section in square brackets and continues until the next
21 section begins. Sections contain parameters of the form 'name = value'.
23 The file is line-based - that is, each newline-terminated line represents
24 either a comment, a section name or a parameter.
26 Section and parameter names are not case sensitive.
28 Only the first equals sign in a parameter is significant. Whitespace before 
29 or after the first equals sign is discarded. Leading, trailing and internal
30 whitespace in section and parameter names is irrelevant. Leading and
31 trailing whitespace in a parameter value is discarded. Internal whitespace
32 within a parameter value is retained verbatim.
34 Any line beginning with a semicolon is ignored, as are lines containing 
35 only whitespace.
37 Any line ending in a \e is "continued" on the next line in the
38 customary UNIX fashion.
40 The values following the equals sign in parameters are all either a string
41 (no quotes needed) or a boolean, which may be given as yes/no, 0/1 or
42 true/false. Case is not significant in boolean values, but is preserved
43 in string values. Some items such as create modes are numeric.
44 .SH SERVICE DESCRIPTIONS
45 Each section in the configuration file describes a service. The section name
46 is the service name and the parameters within the section define the service's
47 attributes.
49 There are three special sections, [global], [homes] and [printers], which are
50 described under 'special sections'. The following notes apply to ordinary 
51 service descriptions.
53 A service consists of a directory to which access is being given plus a 
54 description of the access rights which are granted to the user of the 
55 service. Some housekeeping options are also specifiable.
57 Services are either filespace services (used by the client as an extension of
58 their native file systems) or printable services (used by the client to access
59 print services on the host running the server).
61 Services may be guest services, in which case no password is required to
62 access them. A specified guest account is used to define access privileges
63 in this case.
65 Services other than guest services will require a password to access
66 them. The client provides the username. As many clients only provide
67 passwords and not usernames, you may specify a list of usernames to
68 check against the password using the "user=" option in the service
69 definition. 
71 Note that the access rights granted by the server are masked by the access
72 rights granted to the specified or guest user by the host system. The 
73 server does not grant more access than the host system grants.
75 The following sample section defines a file space service. The user has write
76 access to the path /home/bar. The service is accessed via the service name 
77 "foo":
79         [foo]
80                 path = /home/bar
81                 writable = true
83 The following sample section defines a printable service. The service is 
84 readonly, but printable. That is, the only write access permitted is via 
85 calls to open, write to and close a spool file. The 'guest ok' parameter 
86 means access will be permitted as the default guest user (specified elsewhere):
88         [aprinter]
89                 path = /usr/spool/public
90                 read only = true
91                 printable = true
92                 public = true
93 .SH SPECIAL SECTIONS
95 .SS The [global] section
96 .RS 3
97 Parameters in this section apply to the server as a whole, or are defaults
98 for services which do not specifically define certain items. See the notes
99 under 'Parameters' for more information.
102 .SS The [homes] section
103 .RS 3
104 If a section called 'homes' is included in the configuration file, services
105 connecting clients to their home directories can be created on the fly by the
106 server.
108 When the connection request is made, the existing services are scanned. If a
109 match is found, it is used. If no match is found, the requested service name is
110 treated as a user name and looked up in the local passwords file. If the
111 name exists and the correct password has been given, a service is created
112 by cloning the [homes] section.
114 Some modifications are then made to the newly created section:
116 .RS 3
117 The service name is changed from 'homes' to the located username
119 If no path was given, the path is set to the user's home directory.
122 If you decide to use a path= line in your [homes] section then you may
123 find it useful to use the %S macro. For example path=/data/pchome/%S
124 would be useful if you have different home directories for your PCs
125 than for UNIX access.
127 This is a fast and simple way to give a large number of clients access to
128 their home directories with a minimum of fuss.
130 A similar process occurs if the requested service name is "homes", except that
131 the service name is not changed to that of the requesting user. This method
132 of using the [homes] section works well if different users share a client PC.
134 The [homes] section can specify all the parameters a normal service section
135 can specify, though some make more sense than others. The following is a 
136 typical and suitable [homes] section:
138         [homes]
139                 writable = yes
141 An important point:
143 .RS 3
144 If guest access is specified in the [homes] section, all home directories will
145 be accessible to all clients
146 .B without a password.
147 In the very unlikely event
148 that this is actually desirable, it would be wise to also specify read only
149 access.
153 Note that the browseable flag for auto home directories will be
154 inherited from the global browseable flag, not the [homes] browseable
155 flag. This is useful as it means setting browseable=no in the [homes]
156 section will hide the [homes] service but make any auto home
157 directories visible.
159 .SS The [printers] section
160 .RS 3
161 This section works like [homes], but for printers.
163 If a [printers] section occurs in the configuration file, users are able 
164 to connect to any printer specified in the local host's printcap file.
166 When a connection request is made, the existing services are scanned. If a
167 match is found, it is used. If no match is found, but a [homes] section
168 exists, it is used as described above. Otherwise, the requested service name is
169 treated as a printer name and the appropriate printcap file is scanned to
170 see if the requested service name is a valid printer name. If a match is
171 found, a new service is created by cloning the [printers] section.
173 A few modifications are then made to the newly created section:
175 .RS 3
176 The service name is set to the located printer name
178 If no printer name was given, the printer name is set to the located printer
179 name
181 If the service does not permit guest access and no username was given, the 
182 username is set to the located printer name.
185 Note that the [printers] service MUST be printable - if you specify otherwise,
186 the server will refuse to load the configuration file.
188 Typically the path specified would be that of a world-writable spool directory
189 with the sticky bit set on it. A typical [printers] entry would look like this:
191         [printers]
192                 path = /usr/spool/public
193                 writable = no
194                 public = yes
195                 printable = yes 
197 All aliases given for a printer in the printcap file are legitimate printer
198 names as far as the server is concerned. If your printing subsystem doesn't
199 work like that, you will have to set up a pseudo-printcap. This is a file
200 consisting of one or more lines like this:
202         alias|alias|alias|alias...
204 Each alias should be an acceptable printer name for your printing 
205 subsystem. In the [global] section, specify the new file as your printcap.
206 The server will then only recognise names found in your pseudo-printcap,
207 which of course can contain whatever aliases you like. The same technique
208 could be used simply to limit access to a subset of your local printers.
210 An alias, by the way, is defined as any component of the first entry of a 
211 printcap record. Records are separated by newlines, components (if there are 
212 more than one) are separated by vertical bar symbols ("|").
214 NOTE: On SYSV systems which use lpstat to determine what printers are
215 defined on the system you may be able to use "printcap name = lpstat" 
216 to automatically obtain a list of printers. See the "printcap name"
217 option for more detils.
220 .SH PARAMETERS
221 Parameters define the specific attributes of services.
223 Some parameters are specific to the [global] section (eg., security).
224 Some parameters are usable in all sections (eg., create mode). All others are
225 permissible only in normal sections. For the purposes of the following
226 descriptions the [homes] and [printers] sections will be considered normal.
227 The letter 'G' in parentheses indicates that a parameter is specific to the
228 [global] section. The letter 'S' indicates that a parameter can be
229 specified in a service specific section. Note that all S parameters
230 can also be specified in the [global] section - in which case they
231 will define the default behaviour for all services.
233 Parameters are arranged here in alphabetical order - this may not create
234 best bedfellows, but at least you can find them! Where there are synonyms,
235 the preferred synonym is described, others refer to the preferred synonym.
237 .SS VARIABLE SUBSTITUTIONS
239 Many of the strings that are settable in the config file can take
240 substitutions. For example the option "path = /tmp/%u" would be
241 interpreted as "path = /tmp/john" if the user connected with the
242 username john.
244 These substitutions are mostly noted in the descriptions below, but
245 there are some general substitutions which apply whenever they might be
246 relevant. These are:
248 %S = the name of the current service, if any
250 %P = the root directory of the current service, if any
252 %u = user name of the current service, if any
254 %g = primary group name of %u
256 %U = session user name (the user name that the client wanted, not
257 necessarily the same as the one they got)
259 %G = primary group name of %U
261 %H = the home directory of the user given by %u
263 %v = the Samba version
265 %h = the hostname that Samba is running on
267 %m = the netbios name of the client machine (very useful)
269 %L = the netbios name of the server. This allows you to change your
270 config based on what the client calls you. Your server can have a "dual
271 personality".
273 %M = the internet name of the client machine
275 %N = the name of your NIS home directory server.  This is obtained from
276 your NIS auto.map entry.  If you have not compiled Samba with -DAUTOMOUNT
277 then this value will be the same as %L.
279 %R = the selected protocol level after protocol negotiation. As of 
280 Samba 1.9.18 it can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
282 %d = The process id of the current server process
284 %a = the architecture of the remote machine. Only some are recognised,
285 and those may not be 100% reliable. It currently recognises Samba,
286 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
287 gets it wrong then sending me a level 3 log should allow me to fix it.
289 %I = The IP address of the client machine
291 %T = the current date and time
293 There are some quite creative things that can be done with these
294 substitutions and other smb.conf options.
296 .SS NAME MANGLING
298 Samba supports "name mangling" so that DOS and Windows clients can use
299 files that don't conform to the 8.3 format. It can also be set to adjust
300 the case of 8.3 format filenames.
302 There are several options that control the way mangling is performed,
303 and they are grouped here rather than listed separately. For the
304 defaults look at the output of the testparm program.
306 All of these options can be set separately for each service (or
307 globally, of course).
309 The options are:
311 "mangle case = yes/no" controls if names that have characters that
312 aren't of the "default" case are mangled. For example, if this is yes
313 then a name like "Mail" would be mangled. Default no.
315 "case sensitive = yes/no" controls whether filenames are case
316 sensitive. If they aren't then Samba must do a filename search and
317 match on passed names. Default no.
319 "default case = upper/lower" controls what the default case is for new
320 filenames. Default lower.
322 "preserve case = yes/no" controls if new files are created with the
323 case that the client passes, or if they are forced to be the "default"
324 case. Default no.
326 "short preserve case = yes/no" controls if new files which conform to 8.3
327 syntax, that is all in upper case and of suitable length, are created
328 upper case, or if they are forced to be the "default" case. This option can
329 be use with "preserve case = yes" to permit long filenames to retain their
330 case, while short names are lowered. Default no.
332 .SS COMPLETE LIST OF GLOBAL PARAMETERS
334 Here is a list of all global parameters. See the section of each
335 parameter for details.  Note that some are synonyms.
337 announce as
339 announce version
341 auto services
343 bind interfaces only
345 browse list
347 character set
349 client code page
351 config file
353 deadtime
355 debuglevel
357 default
359 default service
361 dfree command
363 dns proxy
365 domain controller
367 domain logons
369 domain master
371 encrypt passwords
373 getwd cache
375 hide files
377 hide dot files
379 homedir map
381 hosts equiv
383 include
385 interfaces
387 keepalive
389 lm announce
391 lm interval
393 lock dir
395 load printers
397 local master
399 lock directory
401 log file
403 log level
405 logon drive
407 logon home
409 logon path
411 logon script
413 lpq cache time
415 mangled stack
417 max log size
419 max mux
421 max packet
423 max ttl
425 max xmit
427 max wins ttl
429 message command
431 min wins ttl
433 netbios aliases
435 netbios name
437 nis homedir
439 null passwords
441 os level
443 packet size
445 passwd chat
447 passwd program
449 password level
451 password server
453 preferred master
455 preload
457 printcap name
459 printer driver file
461 protocol
463 read bmpx
465 read prediction
467 read raw
469 read size
471 remote announce
473 remote browse sync
475 root
477 root dir
479 root directory
481 security
483 server string
485 shared file entries
487 shared mem size
489 smb passwd file
491 smbrun
493 socket address
495 socket options
497 status
499 strip dot
501 syslog
503 syslog only
505 time offset
507 time server
509 unix realname
511 username level
513 username map
515 use rhosts
517 valid chars
519 veto files
521 workgroup
523 write raw
525 .SS COMPLETE LIST OF SERVICE PARAMETERS
527 Here is a list of all service parameters. See the section of each
528 parameter for details. Note that some are synonyms.
530 admin users
532 allow hosts
534 alternate permissions
536 available
538 browseable
540 case sensitive
542 case sig names
544 copy
546 create mask
548 create mode
550 comment
552 default case
554 delete readonly
556 delete veto files
558 deny hosts
560 directory
562 directory mask
564 directory mode
566 dont descend
568 dos filetimes
570 exec
572 fake oplocks
574 follow symlinks
576 force create mode
578 force directory mode
580 force group
582 force user
584 guest account
586 guest ok
588 guest only
590 hide dot files
592 hosts allow
594 hosts deny
596 invalid users
598 locking
600 lppause command
602 lpq command
604 lpresume command
606 lprm command
608 magic output
610 magic script
612 mangle case
614 mangled names
616 mangling char
618 map archive
620 map hidden
622 map system
624 max connections
626 min print space
628 only guest
630 only user
632 oplocks
634 path
636 postexec
638 postscript
640 preserve case
642 print command
644 printer driver
646 printer driver location
648 printing
650 print ok
652 printable
654 printer
656 printer name
658 public
660 read only
662 read list
664 revalidate
666 root postexec
668 root preexec
670 set directory
672 share modes
674 short preserve case
676 strict locking
678 sync always
680 user
682 username
684 users
686 valid users
688 veto oplock files
690 volume
692 wide links
694 writable
696 write ok
698 writeable
700 write list
702 .SS EXPLANATION OF EACH PARAMETER
703 .RS 3
705 .SS admin users (S)
707 This is a list of users who will be granted administrative privileges
708 on the share. This means that they will do all file operations as the
709 super-user (root).
711 You should use this option very carefully, as any user in this list
712 will be able to do anything they like on the share, irrespective of
713 file permissions.
715 .B Default:
716         no admin users
718 .B Example:
719         admin users = jason
721 .SS announce as (G)
723 This specifies what type of server nmbd will announce itself as in
724 browse lists. By default this is set to Windows NT. The valid options
725 are "NT", "Win95" or "WfW" meaining Windows NT, Windows 95 and
726 Windows for Workgroups respectively. Do not change this parameter
727 unless you have a specific need to stop Samba appearing as an NT
728 server as this may prevent Samba servers from participating as
729 browser servers correctly.
731 .B Default:
732     announce as = NT
734 .B Example
735     announce as = Win95
737 .SS announce version (G)
739 This specifies the major and minor version numbers that nmbd
740 will use when announcing itself as a server. The default is 4.2.
741 Do not change this parameter unless you have a specific need to
742 set a Samba server to be a downlevel server.
744 .B Default:
745    announce version = 4.2
747 .B Example:
748    announce version = 2.0
750 .SS auto services (G)
751 This is a list of services that you want to be automatically added to
752 the browse lists. This is most useful for homes and printers services
753 that would otherwise not be visible.
755 Note that if you just want all printers in your printcap file loaded
756 then the "load printers" option is easier.
758 .B Default:
759         no auto services
761 .B Example:
762         auto services = fred lp colorlp
764 .SS allow hosts (S)
765 A synonym for this parameter is 'hosts allow'.
767 This parameter is a comma delimited set of hosts which are permitted to access
768 a service. 
770 If specified in the [global] section then it will apply to all
771 services, regardless of whether the individual service has a different
772 setting. 
774 You can specify the hosts by name or IP number. For example, you could
775 restrict access to only the hosts on a Class C subnet with something like
776 "allow hosts = 150.203.5.". The full syntax of the list is described in
777 the man page
778 .BR hosts_access (5).
780 You can also specify hosts by network/netmask pairs and by netgroup
781 names if your system supports netgroups. The EXCEPT keyword can also
782 be used to limit a wildcard list. The following examples may provide
783 some help:
785 Example 1: allow all IPs in 150.203.*.* except one
787         hosts allow = 150.203. EXCEPT 150.203.6.66
789 Example 2: allow hosts that match the given network/netmask
791         hosts allow = 150.203.15.0/255.255.255.0
793 Example 3: allow a couple of hosts
795         hosts allow = lapland, arvidsjaur
797 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
798 deny access from one particular host
800         hosts allow = @foonet, localhost
801         hosts deny = pirate
803 Note that access still requires suitable user-level passwords.
806 .BR testparm (1)
807 for a way of testing your host access to see if it
808 does what you expect.
810 .B Default:
811         none (i.e., all hosts permitted access)
813 .B Example:
814         allow hosts = 150.203.5. myhost.mynet.edu.au
816 .SS alternate permissions (S)
818 This option affects the way the "read only" DOS attribute is produced
819 for UNIX files. If this is false then the read only bit is set for
820 files on writeable shares which the user cannot write to.
822 If this is true then it is set for files whos user write bit is not set.
824 The latter behaviour is useful for when users copy files from each
825 others directories, and use a file manager that preserves
826 permissions. Without this option they may get annoyed as all copied
827 files will have the "read only" bit set.
829 .B Default:
830         alternate permissions = no
832 .B Example:
833         alternate permissions = yes
835 .SS available (S)
836 This parameter lets you 'turn off' a service. If 'available = no', then
837 ALL attempts to connect to the service will fail. Such failures are logged.
839 .B Default:
840         available = yes
842 .B Example:
843         available = no
845 .SS bind interfaces only (G)
846 This global parameter (new for 1.9.18) allows the Samba admin to limit
847 what interfaces on a machine will serve smb requests. If affects file service
848 (smbd) and name service (nmbd) in slightly different ways.
850 For name service it causes nmbd to bind to ports 137 and 138 on
851 the interfaces listed in the 'interfaces' parameter. nmbd also binds
852 to the 'all addresses' interface (0.0.0.0) on ports 137 and 138
853 for the purposes of reading broadcast messages. If this option is
854 not set then nmbd will service name requests on all of these
855 sockets. If "bind interfaces only" is set then nmbd will check
856 the source address of any packets coming in on the broadcast
857 sockets and discard any that don't match the broadcast addresses
858 of the interfaces in the 'interfaces' parameter list. As unicast
859 packets are received on the other sockets it allows nmbd to
860 refuse to serve names to machines that send packets that arrive
861 through any interfaces not listed in the 'interfaces' list.
862 IP Source address spoofing does defeat this simple check, however
863 so it must not be used seriously as a security feature for nmbd.
865 For file service it causes smbd to bind only to the interface
866 list given in the 'interfaces' parameter. This restricts the
867 networks that smbd will serve to packets coming in those interfaces.
868 Note that you should not use this parameter for machines that
869 are serving ppp or other intermittant or non-broadcast network
870 interfaces as it will not cope with non-permanent interfaces.
872 .B Default:
873        bind interfaces only = False
875 .B Example:
876        bind interfaces only = True
878 .SS browseable (S)
879 This controls whether this share is seen in the list of available
880 shares in a net view and in the browse list.
882 .B Default:
883         browseable = Yes
885 .B Example: 
886         browseable = No
887 .SS browse list(G)
888 This controls whether the smbd will serve a browse list to a client
889 doing a NetServerEnum call. Normally set to true. You should never
890 need to change this.
892 .B Default:
893         browse list = Yes
895 .SS case sensitive (G)
896 See the discussion on NAME MANGLING.
898 .SS case sig names (G)
899 See "case sensitive"
901 .SS character set (G)
902 This allows a smbd to map incoming characters from a DOS 850 Code page
903 to either a Western European (ISO8859-1) or Easter European (ISO8859-2)
904 code page. Normally not set, meaning no filename translation is done.
906 .B Default
908         character set =
910 .B Example
912         character set = iso8859-1
914 .SS client code page (G)
915 Currently (Samba 1.9.17 and above) this may be set to one of two
916 values, 850 or 437. It specifies the base DOS code page that the
917 clients accessing Samba are using. To determine this, open a DOS
918 command prompt and type the command "chcp". This will output the
919 code page. The default for USA MS-DOS, Windows 95, and Windows NT
920 releases is code page 437. The default for western european 
921 releases of the above operating systems is code page 850.
923 This parameter co-operates with the "valid chars" parameter in
924 determining what characters are valid in filenames and how
925 capitalization is done. It has been added as a convenience for
926 clients whose code page is either 437 or 850 so a convoluted
927 "valid chars" string does not have to be determined. If you
928 set both this parameter and the "valid chars" parameter the 
929 "client code page" parameter MUST be set before the "valid chars"
930 in the smb.conf file. The "valid chars" string will then augment
931 the character settings in the "client code page" parameter.
933 If "client code page" is set to a value other than 850 or 437
934 it will default to 850.
936 See also : "valid chars".
938 .B Default
940         client code page = 850
942 .B Example
944         client code page = 437
946 .SS comment (S)
947 This is a text field that is seen next to a share when a client does a
948 net view to list what shares are available.
950 If you want to set the string that is displayed next to the machine
951 name then see the server string command.
953 .B Default:
954         No comment string
956 .B Example:
957         comment = Fred's Files
959 .SS config file (G)
961 This allows you to override the config file to use, instead of the
962 default (usually smb.conf). There is a chicken and egg problem here as
963 this option is set in the config file! 
965 For this reason, if the name of the config file has changed when the
966 parameters are loaded then it will reload them from the new config
967 file.
969 This option takes the usual substitutions, which can be very useful.
971 If the config file doesn't exist then it won't be loaded (allowing
972 you to special case the config files of just a few clients).
974 .B Example:
975         config file = /usr/local/samba/lib/smb.conf.%m
977 .SS copy (S)
978 This parameter allows you to 'clone' service entries. The specified
979 service is simply duplicated under the current service's name. Any 
980 parameters specified in the current section will override those in the
981 section being copied.
983 This feature lets you set up a 'template' service and create similar 
984 services easily. Note that the service being copied must occur earlier 
985 in the configuration file than the service doing the copying.
987 .B Default:
988         none
990 .B Example:
991         copy = otherservice
992 .SS create mask (S)
993 A synonym for this parameter is 'create mode'.
995 When a file is created, the neccessary permissions are calculated
996 according to the mapping from DOS modes to UNIX permissions, and
997 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
998 This parameter may be thought of as a bit-wise MASK for the UNIX
999 modes of a file. Any bit *not* set here will be removed from the
1000 modes set on a file when it is created.
1002 The default value of this parameter removes the 'group' and 'other' 
1003 write and execute bits from the UNIX modes.
1005 Following this Samba will bit-wise 'OR' the UNIX mode created from
1006 this parameter with the value of the "force create mode" parameter 
1007 which is set to 000 by default.
1009 For Samba 1.9.17 and above this parameter no longer affects directory
1010 modes. See the parameter 'directory mode' for details.
1012 See also the "force create mode" parameter for forcing particular
1013 mode bits to be set on created files.
1014 See also the "directory mode" parameter for masking mode bits on created
1015 directories.
1017 .B Default:
1018         create mask = 0744
1020 .B Example:
1021         create mask = 0775
1022 .SS create mode (S)
1024 .B create mask.
1026 .SS dead time (G)
1027 The value of the parameter (a decimal integer) represents the number of
1028 minutes of inactivity before a connection is considered dead, and it
1029 is disconnected. The deadtime only takes effect if the number of open files
1030 is zero.
1032 This is useful to stop a server's resources being exhausted by a large
1033 number of inactive connections.
1035 Most clients have an auto-reconnect feature when a connection is broken so
1036 in most cases this parameter should be transparent to users.
1038 Using this parameter with a timeout of a few minutes is recommended
1039 for most systems.
1041 A deadtime of zero indicates that no auto-disconnection should be performed.
1043 .B Default:
1044         dead time = 0
1046 .B Example:
1047         dead time = 15
1048 .SS debug level (G)
1049 The value of the parameter (an integer) allows the debug level
1050 (logging level) to be specified in the
1051 .B smb.conf
1052 file. This is to give
1053 greater flexibility in the configuration of the system.
1055 The default will be the debug level specified on the command line.
1057 .B Example:
1058         debug level = 3
1059 .SS default (G)
1061 .B default service.
1062 .SS default case (S)
1064 See the section on "NAME MANGLING" Also note the addition of "short
1065 preserve case"
1067 .SS default service (G)
1068 A synonym for this parameter is 'default'.
1070 This parameter specifies the name of a service which will be connected to
1071 if the service actually requested cannot be found. Note that the square
1072 brackets are NOT given in the parameter value (see example below).
1074 There is no default value for this parameter. If this parameter is not given,
1075 attempting to connect to a nonexistent service results in an error.
1077 Typically the default service would be a public, read-only service.
1079 Also note that as of 1.9.14 the apparent service name will be changed to
1080 equal that of the requested service, this is very useful as it allows
1081 you to use macros like %S to make a wildcard service.
1083 Note also that any _ characters in the name of the service used in the
1084 default service will get mapped to a /. This allows for interesting
1085 things.
1088 .B Example:
1089         default service = pub
1090         
1091         [pub]
1092              path = /%S
1093           
1095 .SS delete readonly (S)
1096 This parameter allows readonly files to be deleted.  This is not normal DOS
1097 semantics, but is allowed by UNIX.
1099 This option may be useful for running applications such as rcs, where UNIX
1100 file ownership prevents changing file permissions, and DOS semantics prevent
1101 deletion of a read only file.
1103 .B Default:
1104         delete readonly = No
1106 .B Example:
1107         delete readonly = Yes
1108 .SS deny hosts (S)
1109 A synonym for this parameter is 'hosts deny'.
1111 The opposite of 'allow hosts' - hosts listed here are NOT permitted
1112 access to services unless the specific services have their own lists to
1113 override this one. Where the lists conflict, the 'allow' list takes precedence.
1115 .B Default:
1116         none (i.e., no hosts specifically excluded)
1118 .B Example:
1119         deny hosts = 150.203.4. badhost.mynet.edu.au
1121 .SS delete veto files (S)
1123 This option is used when Samba is attempting to delete a directory
1124 that contains one or more vetoed directories (see the 'veto files' option).
1125 If this option is set to False (the default) then if a vetoed directory
1126 contains any non-vetoed files or directories then the directory delete 
1127 will fail. This is usually what you want. 
1129 If this option is set to True, then Samba will attempt
1130 to recursively delete any files and directories within the vetoed
1131 directory. This can be useful for integration with file serving
1132 systems such as Netatalk, which create meta-files within directories
1133 you might normally veto DOS/Windows users from seeing (eg. .AppleDouble)
1135 Setting 'delete veto files = True' allows these directories to be 
1136 transparently deleted when the parent directory is deleted (so long
1137 as the user has permissions to do so).
1139 .B Default:
1140     delete veto files = False
1142 .B Example:
1143     delete veto files = True
1146 .B veto files
1148 .SS dfree command (G)
1149 The dfree command setting should only be used on systems where a
1150 problem occurs with the internal disk space calculations. This has
1151 been known to happen with Ultrix, but may occur with other operating
1152 systems. The symptom that was seen was an error of "Abort Retry
1153 Ignore" at the end of each directory listing.
1155 This setting allows the replacement of the internal routines to
1156 calculate the total disk space and amount available with an external
1157 routine. The example below gives a possible script that might fulfill
1158 this function. 
1160 The external program will be passed a single parameter indicating a
1161 directory in the filesystem being queried. This will typically consist
1162 of the string "./". The script should return two integers in ascii. The
1163 first should be the total disk space in blocks, and the second should
1164 be the number of available blocks. An optional third return value
1165 can give the block size in bytes. The default blocksize is 1024 bytes.
1167 Note: Your script should NOT be setuid or setgid and should be owned by
1168 (and writable only by) root!
1170 .B Default:
1171         By default internal routines for determining the disk capacity
1172 and remaining space will be used.
1174 .B Example:
1175         dfree command = /usr/local/samba/bin/dfree
1177         Where the script dfree (which must be made executable) could be
1180         #!/bin/sh
1181         df $1 | tail -1 | awk '{print $2" "$4}'
1184         or perhaps (on Sys V)
1187         #!/bin/sh
1188         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1191         Note that you may have to replace the command names with full
1192 path names on some systems.
1193 .SS directory (S)
1195 .B path.
1197 .SS directory mask (S)
1198 A synonym for this parameter is 'directory mode'.
1200 This parameter is the octal modes which are used when converting DOS modes 
1201 to UNIX modes when creating UNIX directories.
1203 When a directory is created, the neccessary permissions are calculated
1204 according to the mapping from DOS modes to UNIX permissions, and
1205 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1206 This parameter may be thought of as a bit-wise MASK for the UNIX
1207 modes of a directory. Any bit *not* set here will be removed from the
1208 modes set on a directory when it is created.
1210 The default value of this parameter removes the 'group' and 'other'
1211 write bits from the UNIX mode, allowing only the user who owns the
1212 directory to modify it.
1214 Following this Samba will bit-wise 'OR' the UNIX mode created from
1215 this parameter with the value of the "force directory mode" parameter. 
1216 This parameter is set to 000 by default (ie. no extra mode bits are added).
1218 See the "force directory mode" parameter to cause particular mode
1219 bits to always be set on created directories.
1221 See also the "create mode" parameter for masking mode bits on created
1222 files.
1224 .B Default:
1225         directory mask = 0755
1227 .B Example:
1228         directory mask = 0775
1230 .SS directory mode (S)
1232 .B directory mask.
1234 .SS dns proxy (G)
1236 Specifies that nmbd should (as a WINS server), on finding that a NetBIOS
1237 name has not been registered, treat the NetBIOS name word-for-word as
1238 a DNS name.
1240 Note that the maximum length for a NetBIOS name is 15
1241 characters, so the DNS name (or DNS alias) can likewise only be 15
1242 characters, maximum.
1244 Note also that nmbd will block completely until the DNS name is resolved.
1245 This will result in temporary loss of browsing and WINS services.
1246 Enable this option only if you are certain that DNS resolution is fast,
1247 or you can live with the consequences of periodic pauses in nmbd service.
1249 .B Default:
1250          dns proxy = yes
1252 .SS domain controller (G)
1254 Specifies the DNS name or IP address of the machine to refer domain 
1255 logons from Win95 machines to. You should never need to set this parameter.
1257 .B Default:
1258          domain controller = no
1260 .SS domain logons (G)
1262 If set to true, the Samba server will serve Windows 95 domain logons
1263 for the workgroup it is in. For more details on setting up this feature
1264 see the file DOMAINS.txt in the Samba source documentation directory.
1266 .B Default:
1267          domain logons = no
1269 .SS domain master (G)
1271 Enable WAN-wide browse list collation.  Local master browsers on 
1272 broadcast-isolated subnets will give samba their local browse lists, and 
1273 ask for a complete copy of the browse list for the whole wide area network.
1274 Browser clients will then contact their local master browser, and will
1275 receive the domain-wide browse list, instead of just the list for their
1276 broadcast-isolated subnet.
1278 .B Default:
1279         domain master = no
1281 .SS dont descend (S)
1282 There are certain directories on some systems (eg., the /proc tree under
1283 Linux) that are either not of interest to clients or are infinitely deep
1284 (recursive). This parameter allows you to specify a comma-delimited list
1285 of directories that the server should always show as empty.
1287 Note that Samba can be very fussy about the exact format of the "dont
1288 descend" entries. For example you may need "./proc" instead of just
1289 "/proc". Experimentation is the best policy :-)
1291 .B Default:
1292         none (i.e., all directories are OK to descend)
1294 .B Example:
1295         dont descend = /proc,/dev
1297 .SS dos filetimes (S)
1298 Under DOS and Windows, if a user can write to a file they can change
1299 the timestamp on it. Under POSIX semantics, only the owner of the file
1300 or root may change the timestamp. By default, Samba runs with POSIX
1301 semantics and refuses to change the timestamp on a file if the user
1302 smbd is acting on behalf of is not the file owner. Setting this option
1303 to True allows DOS semantics and smbd will change the file timstamp as 
1304 DOS requires. This is a correct implementation of a previous compile-time
1305 options (UTIME_WORKAROUND) which was broken and is now removed.
1307 .B Default:
1308         dos filetimes = False
1310 .B Example:
1311         dos filetimes = True
1313 .SS encrypt passwords (G)
1315 This boolean controls whether encrypted passwords will be negotiated
1316 with the client. Note that this option has no effect if you haven't
1317 compiled in the necessary des libraries and encryption code. It
1318 defaults to no.
1320 .SS exec (S)
1322 This is an alias for preexec
1324 .SS fake oplocks (S)
1326 Oplocks are the way that SMB clients get permission from a server to
1327 locally cache file operations. If a server grants an oplock
1328 (opportunistic lock) then the client is free to assume that it is the
1329 only one accessing the file and it will aggressively cache file
1330 data. With some oplock types the client may even cache file open/close
1331 operations. This can give enormous performance benefits.
1333 When you set "fake oplocks = yes" Samba will always grant oplock
1334 requests no matter how many clients are using the file. 
1336 By enabling this option on all read-only shares or shares that you know
1337 will only be accessed from one client at a time you will see a big
1338 performance improvement on many operations. If you enable this option
1339 on shares where multiple clients may be accessing the files read-write
1340 at the same time you can get data corruption. Use this option
1341 carefully! 
1343 It is generally much better to use the real oplock support except for
1344 physically read-only media such as CDROMs.
1346 This option is disabled by default.
1348 .SS follow symlinks (S)
1350 This parameter allows the Samba administrator to stop smbd from
1351 following symbolic links in a particular share. Setting this
1352 parameter to "No" prevents any file or directory that is a 
1353 symbolic link from being followed (the user will get an error).
1354 This option is very useful to stop users from adding a symbolic
1355 link to /etc/pasword in their home directory for instance.
1356 However it will slow filename lookups down slightly.
1358 This option is enabled (ie. smbd will follow symbolic links)
1359 by default.
1361 .SS force create mode (S)
1362 This parameter specifies a set of UNIX mode bit permissions that
1363 will *always* be set on a file created by Samba. This is done
1364 by bitwise 'OR'ing these bits onto the mode bits of a file that
1365 is being created. The default for this parameter is (in octel)
1366 000. The modes in this parameter are bitwise 'OR'ed onto the
1367 file mode after the mask set in the "create mask" parameter
1368 is applied.
1370 See also the parameter "create mask" for details on masking mode
1371 bits on created files.
1373 .B Default:
1374        force create mode = 000
1376 .B Example:
1377        force create mode = 0755
1379 would force all created files to have read and execute permissions
1380 set for 'group' and 'other' as well as the read/write/execute bits 
1381 set for the 'user'.
1383 .SS force directory mode (S)
1384 This parameter specifies a set of UNIX mode bit permissions that
1385 will *always* be set on a directory created by Samba. This is done
1386 by bitwise 'OR'ing these bits onto the mode bits of a directory that
1387 is being created. The default for this parameter is (in octel)
1388 0000 which will not add any extra permission bits to a created
1389 directory. This operation is done after the mode mask in the parameter 
1390 "directory mask" is applied.
1392 See also the parameter "directory mask" for details on masking mode
1393 bits on created directories.
1395 .B Default:
1396        force directory mode = 000
1398 .B Example:
1399        force directory mode = 0755
1401 would force all created directories to have read and execute permissions
1402 set for 'group' and 'other' as well as the read/write/execute bits 
1403 set for the 'user'.
1405 .SS force group (S)
1406 This specifies a group name that all connections to this service
1407 should be made as. This may be useful for sharing files.
1409 .B Default:
1410        no forced group
1412 .B Example:
1413        force group = agroup
1415 .SS force user (S)
1416 This specifies a user name that all connections to this service
1417 should be made as. This may be useful for sharing files. You should
1418 also use it carefully as using it incorrectly can cause security
1419 problems.
1421 This user name only gets used once a connection is established. Thus
1422 clients still need to connect as a valid user and supply a valid
1423 password. Once connected, all file operations will be performed as the
1424 "forced user", not matter what username the client connected as.
1426 .B Default:
1427        no forced user
1429 .B Example:
1430        force user = auser
1432 .SS getwd cache (G)
1433 This is a tuning option. When this is enabled a cacheing algorithm will
1434 be used to reduce the time taken for getwd() calls. This can have a
1435 significant impact on performance, especially when widelinks is False.
1437 .B Default:
1438         getwd cache = No
1440 .B Example:
1441         getwd cache = Yes
1443 .SS group (S)
1444 This is an alias for "force group" and is only kept for compatibility
1445 with old versions of Samba. It may be removed in future versions.
1447 .SS guest account (S)
1448 This is a username which will be used for access to services which are
1449 specified as 'guest ok' (see below). Whatever privileges this user has
1450 will be available to any client connecting to the guest
1451 service. Typically this user will exist in the password file, but will
1452 not have a valid login. If a username is specified in a given service,
1453 the specified username overrides this one.
1455 One some systems the account "nobody" may not be able to print. Use
1456 another account in this case. You should test this by trying to log in
1457 as your guest user (perhaps by using the "su \-" command) and trying to
1458 print using
1459 .BR lpr .
1461 Note that as of version 1.9 of Samba this option may be set
1462 differently for each service.
1464 .B Default:
1465         specified at compile time
1467 .B Example:
1468         guest account = nobody
1469 .SS guest ok (S)
1471 .B public.
1472 .SS guest only (S)
1473 If this parameter is 'yes' for a service, then only guest connections to the
1474 service are permitted. This parameter will have no affect if "guest ok" or
1475 "public" is not set for the service.
1477 See the section below on user/password validation for more information about
1478 this option.
1480 .B Default:
1481         guest only = no
1483 .B Example:
1484         guest only = yes
1485 .SS hide dot files (S)
1486 This is a boolean parameter that controls whether files starting with
1487 a dot appear as hidden files.
1489 .B Default:
1490         hide dot files = yes
1492 .B Example:
1493         hide dot files = no
1496 .SS hide files(S)
1497 This is a list of files or directories that are not visible but are
1498 accessible.  The DOS 'hidden' attribute is applied to any files or
1499 directories that match.
1501 Each entry in the list must be separated by a "/", which allows spaces
1502 to be included in the entry.  '*' and '?' can be used to specify multiple 
1503 files or directories as in DOS wildcards.
1505 Each entry must be a unix path, not a DOS path and must not include the 
1506 unix directory separator "/".
1508 Note that the case sensitivity option is applicable in hiding files.
1510 Setting this parameter will affect the performance of Samba, as
1511 it will be forced to check all files and directories for a match
1512 as they are scanned.
1514 See also "hide dot files", "veto files" and "case sensitive"
1516 .B Default
1517         No files or directories are hidden by this option (dot files are
1518     hidden by default because of the "hide dot files" option).
1520 .B Example
1521         hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
1523 The above example is based on files that the Macintosh client (DAVE)
1524 creates for internal use, and also still hides all files beginning with
1525 a dot.
1527 .SS homedir map (G)
1528 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
1529 from which the server for the user's home directory should be extracted.
1530 At present, only the Sun auto.home map format is understood. The form of
1531 the map is:
1533 username        server:/some/file/system
1535 and the program will extract the servername from before the first ':'.
1536 There should probably be a better parsing system that copes with different
1537 map formats and also Amd (another automounter) maps.
1539 NB: The -DNETGROUP option is required in the Makefile for option to work
1540 and on some architectures the line -lrpcsvc needs to be added to the
1541 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
1543 See also "nis homedir"
1545 .B Default:
1546         homedir map = auto.home
1548 .B Example:
1549         homedir map = amd.homedir
1550 .SS hosts allow (S)
1552 .B allow hosts.
1553 .SS hosts deny (S)
1555 .B deny hosts.
1557 .SS hosts equiv (G)
1558 If this global parameter is a non-null string, it specifies the name of
1559 a file to read for the names of hosts and users who will be allowed access
1560 without specifying a password.
1562 This is not be confused with 
1563 .B allow hosts
1564 which is about hosts access to services and is more useful for guest services.
1565 .B hosts equiv
1566 may be useful for NT clients which will not supply passwords to samba.
1568 NOTE: The use of hosts.equiv can be a major security hole. This is
1569 because you are trusting the PC to supply the correct username. It is
1570 very easy to get a PC to supply a false username. I recommend that the
1571 hosts.equiv option be only used if you really know what you are doing,
1572 or perhaps on a home network where you trust your wife and kids :-)
1574 .B Default
1575         No host equivalences
1577 .B Example
1578         hosts equiv = /etc/hosts.equiv
1580 .SS include (G)
1582 This allows you to include one config file inside another.  The file is
1583 included literally, as though typed in place.
1585 It takes the standard substitutions, except %u, %P and %S
1587 .SS interfaces (G)
1589 This option allows you to setup multiple network interfaces, so that
1590 Samba can properly handle browsing on all interfaces.
1592 The option takes a list of ip/netmask pairs. The netmask may either be
1593 a bitmask, or a bitlength. 
1595 For example, the following line:
1597 interfaces = 192.168.2.10/24 192.168.3.10/24
1599 would configure two network interfaces with IP addresses 192.168.2.10
1600 and 192.168.3.10. The netmasks of both interfaces would be set to
1601 255.255.255.0. 
1603 You could produce an equivalent result by using:
1605 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1607 if you prefer that format.
1609 If this option is not set then Samba will attempt to find a primary
1610 interface, but won't attempt to configure more than one interface.
1612 .SS invalid users (S)
1613 This is a list of users that should not be allowed to login to this
1614 service. This is really a "paranoid" check to absolutely ensure an
1615 improper setting does not breach your security.
1617 A name starting with @ is interpreted as a UNIX group.
1619 The current servicename is substituted for %S. This is useful in the
1620 [homes] section.
1622 See also "valid users"
1624 .B Default
1625         No invalid users
1627 .B Example
1628         invalid users = root fred admin @wheel
1630 .SS keep alive (G)
1631 The value of the parameter (an integer) represents the number of seconds 
1632 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1633 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1634 client is still present and responding.
1636 Keepalives should, in general, not be needed if the socket being used
1637 has the SO_KEEPALIVE attribute set on it (see "socket
1638 options"). Basically you should only use this option if you strike
1639 difficulties.
1641 .B Default:
1642         keep alive = 0
1644 .B Example:
1645         keep alive = 60
1647 .SS lm announce (G)
1649 This parameter determines if Samba will produce Lanman announce
1650 broadcasts that are needed by OS/2 clients in order for them to
1651 see the Samba server in their browse list. This parameter can
1652 have three values, true, false, or auto. The default is auto.
1653 If set to False Samba will never produce these broadcasts. If
1654 set to true Samba will produce Lanman announce broadcasts at
1655 a frequency set by the parameter 'lm interval'. If set to auto
1656 Samba will not send Lanman announce broadcasts by default but
1657 will listen for them. If it hears such a broadcast on the wire
1658 it will then start sending them at a frequency set by the parameter 
1659 'lm interval'.
1661 See also "lm interval".
1663 .B Default:
1664        lm announce = auto
1666 .B Example:
1667        lm announce = true
1669 .SS lm interval (G)
1671 If Samba is set to produce Lanman announce broadcasts needed
1672 by OS/2 clients (see the "lm announce" parameter) this parameter
1673 defines the frequency in seconds with which they will be made.
1674 If this is set to zero then no Lanman announcements will be
1675 made despite the setting of the "lm announce" parameter.
1677 See also "lm announce".
1679 .B Default:
1680         lm interval = 60
1682 .B Example:
1683         lm interval = 120
1685 .SS load printers (G)
1686 A boolean variable that controls whether all printers in the printcap
1687 will be loaded for browsing by default. 
1689 .B Default:
1690         load printers = yes
1692 .B Example:
1693         load printers = no
1695 .SS local master (G)
1696 This option allows the nmbd to become a local master browser on a
1697 subnet. If set to False then nmbd will not attempt to become a local
1698 master browser on a subnet and will also lose in all browsing elections. 
1699 By default this value is set to true. Setting this value to true doesn't 
1700 mean that Samba will become the local master browser on a subnet, just 
1701 that the nmbd will participate in elections for local master browser.
1703 .B Default:
1704         local master = yes
1706 .SS lock directory (G)
1707 This option specifies the directory where lock files will be placed.
1708 The lock files are used to implement the "max connections" option.
1710 .B Default:
1711         lock directory = /tmp/samba
1713 .B Example: 
1714         lock directory = /usr/local/samba/var/locks
1716 .SS locking (S)
1717 This controls whether or not locking will be performed by the server in 
1718 response to lock requests from the client.
1720 If "locking = no", all lock and unlock requests will appear to succeed and 
1721 all lock queries will indicate that the queried lock is clear.
1723 If "locking = yes", real locking will be performed by the server.
1725 This option may be particularly useful for read-only filesystems which
1726 do not need locking (such as cdrom drives).
1728 Be careful about disabling locking either globally or in a specific
1729 service, as lack of locking may result in data corruption.
1731 .B Default:
1732         locking = yes
1734 .B Example:
1735         locking = no
1737 .SS log file (G)
1739 This options allows you to override the name of the Samba log file
1740 (also known as the debug file).
1742 This option takes the standard substitutions, allowing you to have
1743 separate log files for each user or machine.
1745 .B Example:
1746         log file = /usr/local/samba/var/log.%m
1748 .SS log level (G)
1749 see "debug level"
1751 .SS logon drive (G)
1753 This parameter specifies the local path to which the home directory
1754 will be connected (see "logon home") and is only used by NT Workstations.
1756 .B Example:
1757         logon drive = h:
1759 .SS logon home (G)
1761 This parameter specifies the home directory location when a Win95 or
1762 NT Workstation logs into a Samba PDC.  It allows you to do "NET USE
1763 H: /HOME" from a command prompt, for example.
1766 This option takes the standard substitutions, allowing you to have
1767 separate logon scripts for each user or machine.
1769 .B Example:
1770         logon home = "\\\\remote_smb_server\\%U"
1772 .B Default:
1773         logon home = "\\\\%N\\%U"
1775 .SS logon path (G)
1777 This parameter specifies the home directory where roaming profiles 
1778 (USER.DAT / USER.MAN files for Windows 95) are stored.
1780 This option takes the standard substitutions, allowing you to have
1781 separate logon scripts for each user or machine.  It also specifies
1782 the directory from which the "desktop", "start menu", "nethood" and
1783 "programs" folders, and their contents, are loaded and displayed
1784 on your Windows 95 client.
1786 The share and the path must be readable by the user for the preferences
1787 and directories to be loaded onto the Windows 95 client.  The share
1788 must be writeable when the logs in for the first time, in order that
1789 the Windows 95 client can create the user.dat and other directories.
1791 Thereafter, the directories and any of contents can, if required,
1792 be made read-only.  It is not adviseable that the USER.DAT file be made
1793 read-only - rename it to USER.MAN to achieve the desired effect
1794 (a MANdatory profile).
1796 Windows clients can sometimes maintain a connection to the [homes]
1797 share, even though there is no user logged in.  Therefore, it is
1798 vital that the logon path does not include a reference to the
1799 homes share (i.e \\\\%N\\HOMES\profile_path will cause problems).
1802 This option takes the standard substitutions, allowing you to have
1803 separate logon scripts for each user or machine.
1805 .B Default:
1806         logon path = \\\\%N\\%U\\profile
1808 .B Example:
1809         logon path = \\\\PROFILESERVER\\HOME_DIR\\%U\\PROFILE
1811 .SS logon script (G)
1813 This parameter specifies the batch file (.bat) or NT command file (.cmd)
1814 to be downloaded and run on a machine when a user successfully logs in.
1815 The file must contain the DOS style cr/lf line endings.  Using a DOS-style
1816 editor to create the file is recommended.
1818 The script must be a relative path to the [netlogon] service.  If the
1819 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
1820 logon script = STARTUP.BAT, then file that will be downloaded is:
1822 .B /usr/local/samba/netlogon/STARTUP.BAT
1824 The contents of the batch file is entirely your choice.  A suggested
1825 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
1826 machine to synchronise clocks with the same time server.  Another use
1827 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
1828 or NET USE Q: \\\\SERVER\\ISO9001_QA.
1830 Note that it is particularly important not to allow write access to
1831 the [netlogon] share, or to grant users write permission on the
1832 batch files in a secure environment, as this would allow the batch
1833 files to be arbitrarily modified.
1836 This option takes the standard substitutions, allowing you to have
1837 separate logon scripts for each user or machine.
1839 .B Example:
1840         logon script = scripts/%U.bat
1842 .SS lppause command (S)
1843 This parameter specifies the command to be executed on the server host in
1844 order to stop printing or spooling a specific print job.
1846 This command should be a program or script which takes a printer name and
1847 job number to pause the print job. Currently I don't know of any print
1848 spooler system that can do this with a simple option, except for the PPR
1849 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1850 of implementing this is by using job priorities, where jobs having a too
1851 low priority won't be sent to the printer. See also the
1852 .B lppause
1853 command.
1855 If a %p is given then the printername is put in its place. A %j is
1856 replaced with the job number (an integer).
1857 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1858 command, the job will show up with the correct status, i.e. if the job
1859 priority is lower than the set fence priority it will have the PAUSED
1860 status, whereas if the priority is equal or higher it will have the
1861 SPOOLED or PRINTING status.
1863 Note that it is good practice to include the absolute path in the lppause
1864 command as the PATH may not be available to the server.
1866 .B Default:
1867         Currently no default value is given to this string
1869 .B Example for HPUX:
1870         lppause command = /usr/bin/lpalt %p-%j -p0
1872 .SS lpq cache time (G)
1874 This controls how long lpq info will be cached for to prevent the lpq
1875 command being called too often. A separate cache is kept for each
1876 variation of the lpq command used by the system, so if you use
1877 different lpq commands for different users then they won't share cache
1878 information.
1880 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1881 of the lpq command in use.
1883 The default is 10 seconds, meaning that the cached results of a
1884 previous identical lpq command will be used if the cached data is less
1885 than 10 seconds old. A large value may be advisable if your lpq
1886 command is very slow.
1888 A value of 0 will disable cacheing completely.
1890 .B Default:
1891         lpq cache time = 10
1893 .B Example:
1894         lpq cache time = 30
1896 .SS lpq command (S)
1897 This parameter specifies the command to be executed on the server host in
1898 order to obtain "lpq"-style printer status information. 
1900 This command should be a program or script which takes a printer name
1901 as its only parameter and outputs printer status information. 
1903 Currently six styles of printer status information are supported; BSD,
1904 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1905 control which type is expected using the "printing =" option.
1907 Some clients (notably Windows for Workgroups) may not correctly send the
1908 connection number for the printer they are requesting status information
1909 about. To get around this, the server reports on the first printer service
1910 connected to by the client. This only happens if the connection number sent
1911 is invalid.
1913 If a %p is given then the printername is put in its place. Otherwise
1914 it is placed at the end of the command.
1916 Note that it is good practice to include the absolute path in the lpq
1917 command as the PATH may not be available to the server.
1919 .B Default:
1920         depends on the setting of "printing ="
1922 .B Example:
1923         lpq command = /usr/bin/lpq %p
1925 .SS lpresume command (S)
1926 This parameter specifies the command to be executed on the server host in
1927 order to restart or continue printing or spooling a specific print job.
1929 This command should be a program or script which takes a printer name and
1930 job number to resume the print job. See also the lppause command.
1932 If a %p is given then the printername is put in its place. A %j is
1933 replaced with the job number (an integer).
1935 Note that it is good practice to include the absolute path in the lpresume
1936 command as the PATH may not be available to the server.
1938 .B Default:
1939         Currently no default value is given to this string
1941 .B Example for HPUX:
1942         lpresume command = /usr/bin/lpalt %p-%j -p2
1944 .SS lprm command (S)
1945 This parameter specifies the command to be executed on the server host in
1946 order to delete a print job.
1948 This command should be a program or script which takes a printer name
1949 and job number, and deletes the print job.
1951 Currently seven styles of printer control are supported; BSD, SYSV, AIX
1952 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
1953 which type is expected using the "printing =" option.
1955 If a %p is given then the printername is put in its place. A %j is
1956 replaced with the job number (an integer).
1958 Note that it is good practice to include the absolute path in the lprm
1959 command as the PATH may not be available to the server.
1961 .B Default:
1962         depends on the setting of "printing ="
1964 .B Example 1:
1965         lprm command = /usr/bin/lprm -P%p %j
1967 .B Example 2:
1968         lprm command = /usr/bin/cancel %p-%j
1970 .SS magic output (S)
1971 This parameter specifies the name of a file which will contain output
1972 created by a magic script (see
1973 .I magic script
1974 below).
1976 Warning: If two clients use the same magic script in the same directory the
1977 output file content is undefined.
1978 .B Default:
1979         magic output = <magic script name>.out
1981 .B Example:
1982         magic output = myfile.txt
1983 .SS magic script (S)
1984 This parameter specifies the name of a file which, if opened, will be
1985 executed by the server when the file is closed. This allows a UNIX script
1986 to be sent to the Samba host and executed on behalf of the connected user.
1988 Scripts executed in this way will be deleted upon completion, permissions
1989 permitting.
1991 If the script generates output, output will be sent to the file specified by
1993 .I magic output
1994 parameter (see above).
1996 Note that some shells are unable to interpret scripts containing
1997 carriage-return-linefeed instead of linefeed as the end-of-line
1998 marker. Magic scripts must be executable "as is" on the host, which
1999 for some hosts and some shells will require filtering at the DOS end.
2001 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
2003 .B Default:
2004         None. Magic scripts disabled.
2006 .B Example:
2007         magic script = user.csh
2009 .SS mangle case (S)
2011 See the section on "NAME MANGLING"
2013 .SS mangled map (S)
2014 This is for those who want to directly map UNIX file names which are
2015 not representable on DOS.  The mangling of names is not always what is
2016 needed.  In particular you may have documents with file extensions
2017 that differ between DOS and UNIX. For example, under UNIX it is common
2018 to use .html for HTML files, whereas under DOS .htm is more commonly
2019 used.
2021 So to map 'html' to 'htm' you put:
2023   mangled map = (*.html *.htm)
2025 One very useful case is to remove the annoying ;1 off the ends of
2026 filenames on some CDROMS (only visible under some UNIXes). To do this
2027 use a map of (*;1 *)
2029 .B default:
2030         no mangled map
2032 .B Example:
2033         mangled map = (*;1 *)
2035 .SS mangled names (S)
2036 This controls whether non-DOS names under UNIX should be mapped to
2037 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2038 should simply be ignored.
2040 See the section on "NAME MANGLING" for details on how to control the
2041 mangling process.
2043 If mangling is used then the mangling algorithm is as follows:
2045 - the first (up to) five alphanumeric characters before the rightmost dot of
2046 the filename are preserved, forced to upper case, and appear as the first (up
2047 to) five characters of the mangled name.
2049 - a tilde ("~") is appended to the first part of the mangled name, followed
2050 by a two-character unique sequence, based on the original root name 
2051 (i.e., the original filename minus its final extension). The final
2052 extension is included in the hash calculation only if it contains any upper
2053 case characters or is longer than three characters.
2055 Note that the character to use may be specified using the "mangling
2056 char" option, if you don't like ~.
2058 - the first three alphanumeric characters of the final extension are preserved,
2059 forced to upper case and appear as the extension of the mangled name. The 
2060 final extension is defined as that part of the original filename after the
2061 rightmost dot. If there are no dots in the filename, the mangled name will
2062 have no extension (except in the case of hidden files - see below).
2064 - files whose UNIX name begins with a dot will be presented as DOS hidden
2065 files. The mangled name will be created as for other filenames, but with the
2066 leading dot removed and "___" as its extension regardless of actual original
2067 extension (that's three underscores).
2070 The two-digit hash value consists of upper case alphanumeric characters.
2072 This algorithm can cause name collisions only if files in a directory share
2073 the same first five alphanumeric characters. The probability of such a clash 
2074 is 1/1300.
2076 The name mangling (if enabled) allows a file to be copied between UNIX
2077 directories from DOS while retaining the long UNIX filename. UNIX files can
2078 be renamed to a new extension from DOS and will retain the same basename. 
2079 Mangled names do not change between sessions.
2081 .B Default:
2082         mangled names = yes
2084 .B Example:
2085         mangled names = no
2086 .SS mangling char (S)
2087 This controls what character is used as the "magic" character in name
2088 mangling. The default is a ~ but this may interfere with some
2089 software. Use this option to set it to whatever you prefer.
2091 .B Default:
2092         mangling char = ~
2094 .B Example:
2095         mangling char = ^
2097 .SS mangled stack (G)
2098 This parameter controls the number of mangled names that should be cached in
2099 the Samba server.
2101 This stack is a list of recently mangled base names (extensions are only
2102 maintained if they are longer than 3 characters or contains upper case
2103 characters).
2105 The larger this value, the more likely it is that mangled names can be
2106 successfully converted to correct long UNIX names. However, large stack
2107 sizes will slow most directory access. Smaller stacks save memory in the
2108 server (each stack element costs 256 bytes).
2110 It is not possible to absolutely guarantee correct long file names, so
2111 be prepared for some surprises!
2113 .B Default:
2114         mangled stack = 50
2116 .B Example:
2117         mangled stack = 100
2119 .SS map archive (S)
2120 This controls whether the DOS archive attribute should be mapped to the
2121 UNIX owner execute bit.  The DOS archive bit is set when a file has been modified
2122 since its last backup.  One motivation for this option it to keep Samba/your
2123 PC from making any file it touches from becoming executable under UNIX.
2124 This can be quite annoying for shared source code, documents,  etc...
2126 Note that this requires the 'create mask' to be set such that owner
2127 execute bit is not masked out (ie. it must include 100). See the 
2128 parameter "create mask" for details.
2130 .B Default:
2131       map archive = yes
2133 .B Example:
2134       map archive = no
2136 .SS map hidden (S)
2137 This controls whether DOS style hidden files should be mapped to the
2138 UNIX world execute bit.
2140 Note that this requires the 'create mask' to be set such that the world
2141 execute bit is not masked out (ie. it must include 001). 
2142 See the parameter "create mask" for details.
2144 .B Default:
2145         map hidden = no
2147 .B Example:
2148         map hidden = yes
2149 .SS map system (S)
2150 This controls whether DOS style system files should be mapped to the
2151 UNIX group execute bit.
2153 Note that this requires the 'create mask' to be set such that the group
2154 execute bit is not masked out (ie. it must include 010). See the parameter 
2155 "create mask" for details.
2157 .B Default:
2158         map system = no
2160 .B Example:
2161         map system = yes
2162 .SS max connections (S)
2163 This option allows the number of simultaneous connections to a
2164 service to be limited. If "max connections" is greater than 0 then
2165 connections will be refused if this number of connections to the
2166 service are already open. A value of zero mean an unlimited number of
2167 connections may be made.
2169 Record lock files are used to implement this feature. The lock files
2170 will be stored in the directory specified by the "lock directory" option.
2172 .B Default:
2173         max connections = 0
2175 .B Example:
2176         max connections = 10
2178 .SS max disk size (G)
2179 This option allows you to put an upper limit on the apparent size of
2180 disks. If you set this option to 100 then all shares will appear to be
2181 not larger than 100 MB in size.
2183 Note that this option does not limit the amount of data you can put on
2184 the disk. In the above case you could still store much more than 100
2185 MB on the disk, but if a client ever asks for the amount of free disk
2186 space or the total disk size then the result will be bounded by the
2187 amount specified in "max disk size".
2189 This option is primarily useful to work around bugs in some pieces of
2190 software that can't handle very large disks, particularly disks over
2191 1GB in size.
2193 A "max disk size" of 0 means no limit.
2195 .B Default:
2196         max disk size = 0
2198 .B Example:
2199         max disk size = 1000
2201 .SS max log size (G)
2203 This option (an integer in kilobytes) specifies the max size the log
2204 file should grow to. Samba periodically checks the size and if it is
2205 exceeded it will rename the file, adding a .old extension.
2207 A size of 0 means no limit.
2209 .B Default:
2210         max log size = 5000
2212 .B Example:
2213         max log size = 1000
2215 .SS max mux (G)
2217 This option controls the maximum number of outstanding simultaneous SMB 
2218 operations that samba tells the client it will allow. You should never need 
2219 to set this parameter.
2221 .B Default:
2222         max mux = 50
2224 .SS max packet (G)
2226 A synonym for this parameter is 'packet size'.
2228 .SS max ttl (G)
2230 This option tells nmbd what the default 'time to live' of NetBIOS
2231 names should be (in seconds) when nmbd is requesting a name using
2232 either a broadcast or from a WINS server. You should never need to 
2233 change this parameter.
2235 .B Default:
2236         max ttl = 14400
2238 .SS max wins ttl (G)
2240 This option tells nmbd when acting as a WINS server (wins support = true)
2241 what the maximum 'time to live' of NetBIOS names that nmbd will grant will
2242 be (in seconds). You should never need to change this parameter.     
2243 The default is 3 days (259200 seconds).
2245 .B Default:
2246         max wins ttl = 259200
2248 .SS max xmit (G)
2250 This option controls the maximum packet size that will be negotiated
2251 by Samba. The default is 65535, which is the maximum. In some cases
2252 you may find you get better performance with a smaller value. A value
2253 below 2048 is likely to cause problems.
2255 .B Default:
2256         max xmit = 65535
2258 .B Example:
2259         max xmit = 8192
2261 .SS message command (G)
2263 This specifies what command to run when the server receives a WinPopup
2264 style message.
2266 This would normally be a command that would deliver the message
2267 somehow. How this is to be done is up to your imagination.
2269 What I use is:
2271    message command = csh -c 'xedit %s;rm %s' &
2273 This delivers the message using xedit, then removes it
2274 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2275 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
2276 immediately then your PCs may freeze when sending messages (they
2277 should recover after 30secs, hopefully).
2279 All messages are delivered as the global guest user. The command takes
2280 the standard substitutions, although %u won't work (%U may be better
2281 in this case).
2283 Apart from the standard substitutions, some additional ones apply. In
2284 particular:
2286 %s = the filename containing the message
2288 %t = the destination that the message was sent to (probably the server
2289 name)
2291 %f = who the message is from
2293 You could make this command send mail, or whatever else takes your
2294 fancy. Please let me know of any really interesting ideas you have.
2296 Here's a way of sending the messages as mail to root:
2298 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
2300 If you don't have a message command then the message won't be
2301 delivered and Samba will tell the sender there was an
2302 error. Unfortunately WfWg totally ignores the error code and carries
2303 on regardless, saying that the message was delivered.
2305 If you want to silently delete it then try "message command = rm %s".
2307 For the really adventurous, try something like this:
2309 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
2310                   -M %m; rm %s' &
2312 this would execute the command as a script on the server, then give
2313 them the result in a WinPopup message. Note that this could cause a
2314 loop if you send a message from the server using smbclient! You better
2315 wrap the above in a script that checks for this :-)
2317 .B Default:
2318         no message command
2320 .B Example:
2321         message command = csh -c 'xedit %s;rm %s' &
2323 .SS min print space (S)
2325 This sets the minimum amount of free disk space that must be available
2326 before a user will be able to spool a print job. It is specified in
2327 kilobytes. The default is 0, which means no limit.
2329 .B Default:
2330         min print space = 0
2332 .B Example:
2333         min print space = 2000
2335 .SS min wins ttl (G)
2337 This option tells nmbd when acting as a WINS server (wins support = true)
2338 what the minimum 'time to live' of NetBIOS names that nmbd will grant will
2339 be (in seconds). You should never need to change this parameter.
2340 The default is 6 hours (21600 seconds).
2342 .B Default:
2343         min wins ttl = 21600
2346 .SS netbios aliases (G)
2348 This is a list of names that nmbd will advertise as additional
2349 names by which the Samba server is known. This allows one machine
2350 to appear in browse lists under multiple names. If a machine is
2351 acting as a browse server or logon server none of these names
2352 will be advertised as either browse server or logon servers, only
2353 the primary name of the machine will be advertised with these
2354 capabilities.
2356 See also 'netbios name'.
2358 .B Example:
2359    netbios aliases = TEST TEST1 TEST2
2361 .SS netbios name (G)
2363 This sets the NetBIOS name by which a Samba server is known. By
2364 default it is the same as the first component of the host's DNS name.
2365 If a machine is a browse server or logon server this name (or the
2366 first component of the hosts DNS name) will be the name that these
2367 services are advertised under.
2369 See also 'netbios aliases'.
2371 .B Example:
2372    netbios name = MYNAME
2374 .SS nis homedir (G)
2375 Get the home share server from a NIS (or YP) map. For unix systems that
2376 use an automounter, the user's home directory will often be mounted on
2377 a workstation on demand from a remote server. When the Samba logon server
2378 is not the actual home directory server, two network hops are required
2379 to access the home directory and this can be very slow especially with 
2380 writing via Samba to an NFS mounted directory. This option allows samba
2381 to return the home share as being on a different server to the logon
2382 server and as long as a samba daemon is running on the home directory 
2383 server, it will be mounted on the Samba client directly from the directory
2384 server. When Samba is returning the home share to the client, it will
2385 consult the NIS (or YP) map specified in "homedir map" and return the
2386 server listed there.
2388 .B Default:
2389         nis homedir = false
2391 .B Example:
2392         nis homedir = true
2394 .SS null passwords (G)
2395 Allow or disallow access to accounts that have null passwords. 
2397 .B Default:
2398         null passwords = no
2400 .B Example:
2401         null passwords = yes
2403 .SS only guest (S)
2404 A synonym for this command is 'guest only'.
2406 .SS only user (S)
2407 This is a boolean option that controls whether connections with
2408 usernames not in the user= list will be allowed. By default this
2409 option is disabled so a client can supply a username to be used by
2410 the server.
2412 Note that this also means Samba won't try to deduce usernames from the
2413 service name. This can be annoying for the [homes] section. To get
2414 around this you could use "user = %S" which means your "user" list
2415 will be just the service name, which for home directories is the name
2416 of the user.
2418 .B Default: 
2419         only user = False
2421 .B Example: 
2422         only user = True
2424 .SS oplocks (S)
2425 This boolean option tells smbd whether to issue oplocks (opportunistic
2426 locks) to file open requests on this share. The oplock code was introduced in
2427 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
2428 of access to files on Samba servers. It allows the clients to agressively
2429 cache files locally and you may want to disable this option for unreliable
2430 network environments (it is turned on by default in Windows NT Servers).
2431 For more information see the file Speed.txt in the Samba docs/ directory.
2433 Oplocks may be selectively turned off on certain files on a per share basis.
2434 See the 'veto oplock files' parameter.
2436 .B Default:
2437     oplocks = True
2439 .B Example:
2440     oplocks = False
2443 .SS os level (G)
2444 This integer value controls what level Samba advertises itself as for
2445 browse elections. See BROWSING.txt for details.
2447 .SS packet size (G)
2448 The maximum transmit packet size during a raw read. This option is no
2449 longer implemented as of version 1.7.00, and is kept only so old
2450 configuration files do not become invalid.
2452 .SS passwd chat (G)
2453 This string controls the "chat" conversation that takes places
2454 between smbd and the local password changing program to change the
2455 users password. The string describes a sequence of response-receive
2456 pairs that smbd uses to determine what to send to the passwd program
2457 and what to expect back. If the expected output is not received then
2458 the password is not changed.
2460 This chat sequence is often quite site specific, depending on what
2461 local methods are used for password control (such as NIS+ etc).
2463 The string can contain the macros %o and %n which are substituted for
2464 the old and new passwords respectively. It can also contain the
2465 standard macros \en \er \et and \es to give line-feed, carriage-return,
2466 tab and space.
2468 The string can also contain a * which matches any sequence of
2469 characters.
2471 Double quotes can be used to collect strings with spaces in them into
2472 a single string.
2474 If the send string in any part of the chat sequence is a fullstop "."
2475 then no string is sent. Similarly, is the expect string is a fullstop
2476 then no string is expected.
2478 .B Example:
2479         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
2480                        "*Reenter NEW password*" %n\en "*Password changed*"
2483 .B Default:
2484        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
2486 .SS passwd program (G)
2487 The name of a program that can be used to set user passwords.
2489 This is only necessary if you have enabled remote password changing at
2490 compile time. Any occurrences of %u will be replaced with the user
2491 name.
2493 Also note that many passwd programs insist in "reasonable" passwords,
2494 such as a minimum length, or the inclusion of mixed case chars and
2495 digits. This can pose a problem as some clients (such as Windows for
2496 Workgroups) uppercase the password before sending it. 
2498 .B Default:
2499         passwd program = /bin/passwd
2501 .B Example:
2502         passwd program = /sbin/passwd %u
2504 .SS password level (G)
2505 Some client/server combinations have difficulty with mixed-case passwords.
2506 One offending client is Windows for Workgroups, which for some reason forces
2507 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
2508 when using COREPLUS!
2510 This parameter defines the maximum number of characters that may be upper case
2511 in passwords.
2513 For example, say the password given was "FRED". If
2514 .B password level
2515 is set to 1 (one), the following combinations would be tried if "FRED" failed:
2516 "Fred", "fred", "fRed", "frEd", "freD". If
2517 .B password level was set to 2 (two), the following combinations would also be
2518 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
2520 The higher value this parameter is set to the more likely it is that a mixed
2521 case password will be matched against a single case password. However, you
2522 should be aware that use of this parameter reduces security and increases the
2523 time taken to process a new connection.
2525 A value of zero will cause only two attempts to be made - the password as is
2526 and the password in all-lower case.
2528 If you find the connections are taking too long with this option then
2529 you probably have a slow crypt() routine. Samba now comes with a fast
2530 "ufc crypt" that you can select in the Makefile. You should also make
2531 sure the PASSWORD_LENGTH option is correct for your system in local.h
2532 and includes.h. On most systems only the first 8 chars of a password
2533 are significant so PASSWORD_LENGTH should be 8, but on some longer
2534 passwords are significant. The includes.h file tries to select the
2535 right length for your system.
2537 .B Default:
2538         password level = 0
2540 .B Example:
2541         password level = 4
2543 .SS password server (G)
2545 By specifying the name of another SMB server (such as a WinNT box)
2546 with this option, and using "security = server" you can get Samba to
2547 do all its username/password validation via a remote server.
2549 This options sets the name of the password server to use. It must be a
2550 netbios name, so if the machine's netbios name is different from its
2551 internet name then you may have to add its netbios name to
2552 /etc/hosts.
2554 The password server much be a machine capable of using the "LM1.2X002"
2555 or the "LM NT 0.12" protocol, and it must be in user level security
2556 mode. 
2558 NOTE: Using a password server means your UNIX box (running Samba) is
2559 only as secure as your password server. DO NOT CHOOSE A PASSWORD
2560 SERVER THAT YOU DON'T COMPLETELY TRUST.
2562 Never point a Samba server at itself for password serving. This will
2563 cause a loop and could lock up your Samba server!
2565 The name of the password server takes the standard substitutions, but
2566 probably the only useful one is %m, which means the Samba server will
2567 use the incoming client as the password server. If you use this then
2568 you better trust your clients, and you better restrict them with hosts
2569 allow!
2571 If you list several hosts in the "password server" option then smbd
2572 will try each in turn till it finds one that responds. This is useful
2573 in case your primary server goes down.
2575 If you are using a WindowsNT server as your password server then you
2576 will have to ensure that your users are able to login from the Samba 
2577 server, as the network logon will appear to come from there rather
2578 than from the users workstation.
2580 .SS path (S)
2581 A synonym for this parameter is 'directory'.
2583 This parameter specifies a directory to which the user of the service is to
2584 be given access. In the case of printable services, this is where print data 
2585 will spool prior to being submitted to the host for printing.
2587 For a printable service offering guest access, the service should be readonly
2588 and the path should be world-writable and have the sticky bit set. This is not
2589 mandatory of course, but you probably won't get the results you expect if you
2590 do otherwise.
2592 Any occurrences of %u in the path will be replaced with the username
2593 that the client is connecting as. Any occurrences of %m will be
2594 replaced by the name of the machine they are connecting from. These
2595 replacements are very useful for setting up pseudo home directories
2596 for users.
2598 Note that this path will be based on 'root dir' if one was specified.
2599 .B Default:
2600         none
2602 .B Example:
2603         path = /home/fred+ 
2605 .SS postexec (S)
2607 This option specifies a command to be run whenever the service is
2608 disconnected. It takes the usual substitutions. The command may be run
2609 as the root on some systems.
2611 An interesting example may be do unmount server resources:
2613 postexec = /etc/umount /cdrom
2615 See also preexec
2617 .B Default:
2618       none (no command executed)
2620 .B Example:
2621       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
2623 .SS postscript (S)
2624 This parameter forces a printer to interpret the print files as
2625 postscript. This is done by adding a %! to the start of print output. 
2627 This is most useful when you have lots of PCs that persist in putting
2628 a control-D at the start of print jobs, which then confuses your
2629 printer.
2631 .B Default: 
2632         postscript = False
2634 .B Example: 
2635         postscript = True
2637 .SS preexec (S)
2639 This option specifies a command to be run whenever the service is
2640 connected to. It takes the usual substitutions.
2642 An interesting example is to send the users a welcome message every
2643 time they log in. Maybe a message of the day? Here is an example:
2645 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
2646        /usr/local/samba/bin/smbclient -M %m -I %I' &
2648 Of course, this could get annoying after a while :-)
2650 See also postexec
2652 .B Default:
2653         none (no command executed)
2655 .B Example:
2656         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
2658 .SS preferred master (G)
2659 This boolean parameter controls if Samba is a preferred master browser
2660 for its workgroup.
2661 If this is set to true, on startup, samba will force an election, 
2662 and it will have a slight advantage in winning the election.  
2663 It is recommended that this parameter is used in conjunction 
2664 with domain master = yes, so that samba can guarantee becoming 
2665 a domain master.  
2667 Use this option with caution, because if there are several hosts
2668 (whether samba servers, Windows 95 or NT) that are preferred master
2669 browsers on the same subnet, they will each periodically and continuously
2670 attempt to become the local master browser.  This will result in
2671 unnecessary broadcast traffic and reduced browsing capabilities.
2674 .B os level = nn
2676 .B Default:
2677         preferred master = no
2679 .SS preload
2680 This is an alias for "auto services"
2682 .SS preserve case (S)
2684 This controls if new filenames are created with the case that the
2685 client passes, or if they are forced to be the "default" case.
2687 .B Default:
2688        preserve case = no
2690 See the section on "NAME MANGLING" for a fuller discussion.
2692 .SS print command (S)
2693 After a print job has finished spooling to a service, this command will be
2694 used via a system() call to process the spool file. Typically the command 
2695 specified will submit the spool file to the host's printing subsystem, but
2696 there is no requirement that this be the case. The server will not remove the
2697 spool file, so whatever command you specify should remove the spool file when
2698 it has been processed, otherwise you will need to manually remove old spool
2699 files.
2701 The print command is simply a text string. It will be used verbatim,
2702 with two exceptions: All occurrences of "%s" will be replaced by the
2703 appropriate spool file name, and all occurrences of "%p" will be
2704 replaced by the appropriate printer name. The spool file name is
2705 generated automatically by the server, the printer name is discussed
2706 below.
2708 The full path name will be used for the filename if %s is not preceded
2709 by a /. If you don't like this (it can stuff up some lpq output) then
2710 use %f instead. Any occurrences of %f get replaced by the spool
2711 filename without the full path at the front.
2713 The print command MUST contain at least one occurrence of "%s" or %f -
2714 the "%p" is optional. At the time a job is submitted, if no printer
2715 name is supplied the "%p" will be silently removed from the printer
2716 command.
2718 If specified in the [global] section, the print command given will be used
2719 for any printable service that does not have its own print command specified.
2721 If there is neither a specified print command for a printable service nor a 
2722 global print command, spool files will be created but not processed and (most
2723 importantly) not removed.
2725 Note that printing may fail on some UNIXes from the "nobody"
2726 account. If this happens then create an alternative guest account that
2727 can print and set the "guest account" in the [global] section.
2729 You can form quite complex print commands by realising that they are
2730 just passed to a shell. For example the following will log a print
2731 job, print the file, then remove it. Note that ; is the usual
2732 separator for command in shell scripts.
2734 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
2736 You may have to vary this command considerably depending on how you
2737 normally print files on your system.
2739 .B Default:
2740         print command = lpr -r -P %p %s
2742 .B Example:
2743         print command = /usr/local/samba/bin/myprintscript %p %s
2744 .SS print ok (S)
2746 .B printable.
2747 .SS printable (S)
2748 A synonym for this parameter is 'print ok'.
2750 If this parameter is 'yes', then clients may open, write to and submit spool 
2751 files on the directory specified for the service.
2753 Note that a printable service will ALWAYS allow writing to the service path
2754 (user privileges permitting) via the spooling of print data. The 'read only'
2755 parameter controls only non-printing access to the resource.
2757 .B Default:
2758         printable = no
2760 .B Example:
2761         printable = yes
2763 .SS printcap name (G)
2764 This parameter may be used to override the compiled-in default printcap
2765 name used by the server (usually /etc/printcap). See the discussion of the
2766 [printers] section above for reasons why you might want to do this.
2768 On SystemV systems that use lpstat to list available printers you
2769 can use "printcap name = lpstat" to automatically obtain lists of
2770 available printers. This is the default for systems that define 
2771 SYSV at compile time in Samba (this includes most SystemV based
2772 systems). If "printcap name" is set to lpstat on these systems then
2773 Samba will launch "lpstat -v" and attempt to parse the output to
2774 obtain a printer list.
2776 A minimal printcap file would look something like this:
2778 print1|My Printer 1
2780 print2|My Printer 2
2782 print3|My Printer 3
2784 print4|My Printer 4
2786 print5|My Printer 5
2788 where the | separates aliases of a printer. The fact that the second
2789 alias has a space in it gives a hint to Samba that it's a comment.
2791 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2792 will assume the file is in AIX "qconfig" format if the string
2793 "/qconfig" appears in the printcap filename.
2795 .B Default:
2796         printcap name = /etc/printcap
2798 .B Example:
2799         printcap name = /etc/myprintcap
2801 .SS printer (S)
2802 A synonym for this parameter is 'printer name'.
2804 This parameter specifies the name of the printer to which print jobs spooled
2805 through a printable service will be sent.
2807 If specified in the [global] section, the printer name given will be used
2808 for any printable service that does not have its own printer name specified.
2810 .B Default:
2811         none (but may be 'lp' on many systems)
2813 .B Example:
2814         printer name = laserwriter
2816 .SS printer driver (S)
2817 This option allows you to control the string that clients receive when
2818 they ask the server for the printer driver associated with a
2819 printer. If you are using Windows95 or WindowsNT then you can use this
2820 to automate the setup of printers on your system.
2822 You need to set this parameter to the exact string (case sensitive)
2823 that describes the appropriate printer driver for your system. 
2824 If you don't know the exact string to use then you should first try
2825 with no "printer driver" option set and the client will give you a
2826 list of printer drivers. The appropriate strings are shown in a
2827 scrollbox after you have chosen the printer manufacturer.
2829 .B Example:
2830         printer driver = HP LaserJet 4L
2832 .SS printer name (S)
2834 .B printer.
2836 .SS printer driver file (G)
2837 This parameter tells Samba where the printer driver definition file,
2838 used when serving drivers to Windows 95 clients, is to be found. If
2839 this is not set, the default is :
2841 SAMBA_INSTALL_DIRECTORY/lib/printers.def
2843 This file is created from Windows 95 'msprint.def' files found on the
2844 Windows 95 client system. For more details on setting up serving of
2845 printer drivers to Windows 95 clients, see the documentation file
2846 docs/PRINTER_DRIVER.txt.
2848 .B Default:
2849     None (set in compile).
2851 .B Example:
2852     printer driver file = /usr/local/samba/printers/drivers.def
2854 Related parameters.
2855 .B printer driver location
2857 .SS printer driver location (S)
2858 This parameter tells clients of a particular printer share where
2859 to find the printer driver files for the automatic installation
2860 of drivers for Windows 95 machines. If Samba is set up to serve
2861 printer drivers to Windows 95 machines, this should be set to
2863 \e\eMACHINE\ePRINTER$
2865 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$ 
2866 is a share you set up for serving printer driver files. For more 
2867 details on setting this up see the documentation file 
2868 docs/PRINTER_DRIVER.txt.
2870 .B Default:
2871     None
2873 .B Example:
2874     printer driver location = \e\eMACHINE\ePRINTER$
2876 Related paramerers.
2877 .B printer driver file
2880 .SS printing (S)
2881 This parameters controls how printer status information is interpreted
2882 on your system, and also affects the default values for the "print
2883 command", "lpq command" and "lprm command".
2885 Currently six printing styles are supported. They are "printing =
2886 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2887 "printing = qnx" and "printing = plp".
2889 To see what the defaults are for the other print commands when using
2890 these three options use the "testparm" program.
2892 As of version 1.9.18 of Samba this option can be set on a per printer basis
2894 .SS protocol (G)
2895 The value of the parameter (a string) is the highest protocol level that will
2896 be supported by the server. 
2898 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
2899 merits of each are discussed in the README file.
2901 Normally this option should not be set as the automatic negotiation
2902 phase in the SMB protocol takes care of choosing the appropriate protocol.
2904 .B Default:
2905         protocol = NT1
2907 .B Example:
2908         protocol = LANMAN1
2909 .SS public (S)
2910 A synonym for this parameter is 'guest ok'.
2912 If this parameter is 'yes' for a service, then no password is required
2913 to connect to the service. Privileges will be those of the guest
2914 account.
2916 See the section below on user/password validation for more information about
2917 this option.
2919 .B Default:
2920         public = no
2922 .B Example:
2923         public = yes
2924 .SS read list (S)
2925 This is a list of users that are given read-only access to a
2926 service. If the connecting user is in this list then they will
2927 not be given write access, no matter what the "read only" option
2928 is set to. The list can include group names using the @group syntax.
2930 See also the "write list" option
2932 .B Default:
2933      read list =
2935 .B Example:
2936      read list = mary, @students
2938 .SS read only (S)
2940 .B writable
2942 .B write ok.
2943 Note that this is an inverted synonym for writable and write ok.
2944 .SS read prediction (G)
2945 This options enables or disables the read prediction code used to
2946 speed up reads from the server. When enabled the server will try to
2947 pre-read data from the last accessed file that was opened read-only
2948 while waiting for packets.
2950 .SS Default:
2951         read prediction = False
2953 .SS Example:
2954         read prediction = True
2955 .SS read raw (G)
2956 This parameter controls whether or not the server will support raw reads when
2957 transferring data to clients.
2959 If enabled, raw reads allow reads of 65535 bytes in one packet. This
2960 typically provides a major performance benefit.
2962 However, some clients either negotiate the allowable block size incorrectly
2963 or are incapable of supporting larger block sizes, and for these clients you
2964 may need to disable raw reads.
2966 In general this parameter should be viewed as a system tuning tool and left
2967 severely alone. See also
2968 .B write raw.
2970 .B Default:
2971         read raw = yes
2973 .B Example:
2974         read raw = no
2975 .SS read size (G)
2977 The option "read size" affects the overlap of disk reads/writes with
2978 network reads/writes. If the amount of data being transferred in
2979 several of the SMB commands (currently SMBwrite, SMBwriteX and
2980 SMBreadbraw) is larger than this value then the server begins writing
2981 the data before it has received the whole packet from the network, or
2982 in the case of SMBreadbraw, it begins writing to the network before
2983 all the data has been read from disk.
2985 This overlapping works best when the speeds of disk and network access
2986 are similar, having very little effect when the speed of one is much
2987 greater than the other.
2989 The default value is 2048, but very little experimentation has been
2990 done yet to determine the optimal value, and it is likely that the best
2991 value will vary greatly between systems anyway. A value over 65536 is
2992 pointless and will cause you to allocate memory unnecessarily.
2994 .B Default:
2995         read size = 2048
2997 .B Example:
2998         read size = 8192
3000 .SS remote announce (G)
3002 This option allows you to setup nmbd to periodically announce itself
3003 to arbitrary IP addresses with an arbitrary workgroup name. 
3005 This is useful if you want your Samba server to appear in a remote
3006 workgroup for which the normal browse propagation rules don't
3007 work. The remote workgroup can be anywhere that you can send IP
3008 packets to.
3010 For example:
3012        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
3014 the above line would cause nmbd to announce itself to the two given IP
3015 addresses using the given workgroup names. If you leave out the
3016 workgroup name then the one given in the "workgroup" option is used
3017 instead. 
3019 The IP addresses you choose would normally be the broadcast addresses
3020 of the remote networks, but can also be the IP addresses of known
3021 browse masters if your network config is that stable.
3023 This option replaces similar functionality from the nmbd lmhosts file.
3025 .SS remote browse sync (G)
3027 This option allows you to setup nmbd to periodically request synchronisation
3028 of browse lists with the master browser of a samba server that is on a remote
3029 segment. This option will allow you to gain browse lists for multiple
3030 workgroups across routed networks. This is done in a manner that does not work
3031 with any non-samba servers.
3033 This is useful if you want your Samba server and all local clients
3034 to appear in a remote workgroup for which the normal browse propagation
3035 rules don't work. The remote workgroup can be anywhere that you can send IP
3036 packets to.
3038 For example:
3040        remote browse sync = 192.168.2.255 192.168.4.255
3042 the above line would cause nmbd to request the master browser on the
3043 specified subnets or addresses to synchronise their browse lists with
3044 the local server.
3046 The IP addresses you choose would normally be the broadcast addresses
3047 of the remote networks, but can also be the IP addresses of known
3048 browse masters if your network config is that stable. If a machine IP
3049 address is given Samba makes NO attempt to validate that the remote
3050 machine is available, is listening, nor that it is in fact the browse
3051 master on it's segment.
3054 .SS revalidate (S)
3056 This options controls whether Samba will allow a previously validated
3057 username/password pair to be used to attach to a share. Thus if you
3058 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
3059 automatically allow the client to request connection to the second
3060 share as the same username as the first without a password.
3062 If "revalidate" is True then the client will be denied automatic
3063 access as the same username.
3065 .B Default:
3066         revalidate = False
3068 .B Example:
3069         revalidate = True
3071 .SS root (G)
3073 .B root directory.
3074 .SS root dir (G)
3076 .B root directory.
3077 .SS root directory (G)
3078 Synonyms for this parameter are 'root dir' and 'root'.
3080 The server will chroot() to this directory on startup. This is not 
3081 strictly necessary for secure operation. Even without it the server
3082 will deny access to files not in one of the service entries. It may 
3083 also check for, and deny access to, soft links to other parts of the 
3084 filesystem, or attempts to use .. in file names to access other 
3085 directories (depending on the setting of the "wide links" parameter).
3087 Adding a "root dir" entry other than "/" adds an extra level of security, 
3088 but at a price. It absolutely ensures that no access is given to files not
3089 in the sub-tree specified in the "root dir" option, *including* some files 
3090 needed for complete operation of the server. To maintain full operability
3091 of the server you will need to mirror some system files into the "root dir"
3092 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
3093 and any binaries or configuration files needed for printing (if required). 
3094 The set of files that must be mirrored is operating system dependent.
3096 .B Default:
3097         root directory = /
3099 .B Example:
3100         root directory = /homes/smb
3101 .SS root postexec (S)
3103 This is the same as postexec except that the command is run as
3104 root. This is useful for unmounting filesystems (such as cdroms) after
3105 a connection is closed.
3107 .SS root preexec (S)
3109 This is the same as preexec except that the command is run as
3110 root. This is useful for mounting filesystems (such as cdroms) before
3111 a connection is finalised.
3113 .SS security (G)
3114 This option affects how clients respond to Samba.
3116 The option sets the "security mode bit" in replies to protocol negotiations
3117 to turn share level security on or off. Clients decide based on this bit 
3118 whether (and how) to transfer user and password information to the server.
3120 The default is "security=SHARE", mainly because that was the only
3121 option at one stage.
3123 The alternatives are "security = user" or "security = server". 
3125 If your PCs use usernames that are the same as their usernames on the
3126 UNIX machine then you will want to use "security = user". If you
3127 mostly use usernames that don't exist on the UNIX box then use
3128 "security = share".
3130 There is a bug in WfWg that may affect your decision. When in user
3131 level security a WfWg client will totally ignore the password you type
3132 in the "connect drive" dialog box. This makes it very difficult (if
3133 not impossible) to connect to a Samba service as anyone except the
3134 user that you are logged into WfWg as.
3136 If you use "security = server" then Samba will try to validate the
3137 username/password by passing it to another SMB server, such as an NT
3138 box. If this fails it will revert to "security = USER".
3140 See the "password server" option for more details.
3142 .B Default:
3143         security = SHARE
3145 .B Example:
3146         security = USER
3147 .SS server string (G)
3148 This controls what string will show up in the printer comment box in
3149 print manager and next to the IPC connection in "net view". It can be
3150 any string that you wish to show to your users.
3152 It also sets what will appear in browse lists next to the machine name.
3154 A %v will be replaced with the Samba version number.
3156 A %h will be replaced with the hostname.
3158 .B Default:
3159         server string = Samba %v
3161 .B Example:
3162         server string = University of GNUs Samba Server
3164 .SS set directory (S)
3165 If 'set directory = no', then users of the service may not use the setdir
3166 command to change directory.
3168 The setdir command is only implemented in the Digital Pathworks client. See the
3169 Pathworks documentation for details.
3171 .B Default:
3172         set directory = no
3174 .B Example:
3175         set directory = yes
3177 .SS shared file entries (G)
3178 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3179 It specifies the number of hash bucket entries used for share file locking.
3180 You should never change this parameter unless you have studied the source 
3181 and know what you are doing.
3183 .B Default
3184         shared file entries = 113
3186 .SS shared mem size (G)
3187 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3188 It specifies the size of the shared memory (in bytes) to use between smbd 
3189 processes. You should never change this parameter unless you have studied 
3190 the source and know what you are doing.
3192 .B Default
3193         shared mem size = 102400
3195 .SS smb passwd file (G)
3196 This option sets the path to the encrypted smbpasswd file. This is a *VERY
3197 DANGEROUS OPTION* if the smb.conf is user writable. By default the path
3198 to the smbpasswd file is compiled into Samba.
3200 .SS smbrun (G)
3201 This sets the full path to the smbrun binary. This defaults to the
3202 value in the Makefile.
3204 You must get this path right for many services to work correctly.
3206 .B Default:
3207 taken from Makefile
3209 .B Example:
3210         smbrun = /usr/local/samba/bin/smbrun
3212 .SS share modes (S)
3214 This enables or disables the honouring of the "share modes" during a
3215 file open. These modes are used by clients to gain exclusive read or
3216 write access to a file. 
3218 These open modes are not directly supported by UNIX, so they are
3219 simulated using lock files in the "lock directory". The "lock
3220 directory" specified in smb.conf must be readable by all users.
3222 The share modes that are enabled by this option are DENY_DOS,
3223 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
3225 Enabling this option gives full share compatibility but may cost a bit
3226 of processing time on the UNIX server. They are enabled by default.
3228 .B Default:
3229         share modes = yes
3231 .B Example:
3232         share modes = no
3234 .SS short preserve case (S)
3236 This controls if new short filenames are created with the case that
3237 the client passes, or if they are forced to be the "default" case.
3239 .B Default:
3240        short preserve case = no
3242 See the section on "NAME MANGLING" for a fuller discussion.
3244 .SS socket address (G)
3246 This option allows you to control what address Samba will listen for
3247 connections on. This is used to support multiple virtual interfaces on
3248 the one server, each with a different configuration.
3250 By default samba will accept connections on any address.
3252 .B Example:
3253         socket address = 192.168.2.20
3255 .SS socket options (G)
3256 This option (which can also be invoked with the -O command line
3257 option) allows you to set socket options to be used when talking with
3258 the client.
3260 Socket options are controls on the networking layer of the operating
3261 systems which allow the connection to be tuned.
3263 This option will typically be used to tune your Samba server for
3264 optimal performance for your local network. There is no way that Samba
3265 can know what the optimal parameters are for your net, so you must
3266 experiment and choose them yourself. I strongly suggest you read the
3267 appropriate documentation for your operating system first (perhaps
3268 "man setsockopt" will help).
3270 You may find that on some systems Samba will say "Unknown socket
3271 option" when you supply an option. This means you either mis-typed it
3272 or you need to add an include file to includes.h for your OS. If the
3273 latter is the case please send the patch to me
3274 (samba-bugs@samba.anu.edu.au).
3276 Any of the supported socket options may be combined in any way you
3277 like, as long as your OS allows it.
3279 This is the list of socket options currently settable using this
3280 option:
3282   SO_KEEPALIVE
3284   SO_REUSEADDR
3286   SO_BROADCAST
3288   TCP_NODELAY
3290   IPTOS_LOWDELAY
3292   IPTOS_THROUGHPUT
3294   SO_SNDBUF *
3296   SO_RCVBUF *
3298   SO_SNDLOWAT *
3300   SO_RCVLOWAT *
3302 Those marked with a * take an integer argument. The others can
3303 optionally take a 1 or 0 argument to enable or disable the option, by
3304 default they will be enabled if you don't specify 1 or 0.
3306 To specify an argument use the syntax SOME_OPTION=VALUE for example
3307 SO_SNDBUF=8192. Note that you must not have any spaces before or after
3308 the = sign.
3310 If you are on a local network then a sensible option might be
3312 socket options = IPTOS_LOWDELAY
3314 If you have an almost unloaded local network and you don't mind a lot
3315 of extra CPU usage in the server then you could try
3317 socket options = IPTOS_LOWDELAY TCP_NODELAY
3319 If you are on a wide area network then perhaps try setting
3320 IPTOS_THROUGHPUT. 
3322 Note that several of the options may cause your Samba server to fail
3323 completely. Use these options with caution!
3325 .B Default:
3326         no socket options
3328 .B Example:
3329         socket options = IPTOS_LOWDELAY 
3334 .SS status (G)
3335 This enables or disables logging of connections to a status file that
3336 .B smbstatus
3337 can read.
3339 With this disabled
3340 .B smbstatus
3341 won't be able to tell you what
3342 connections are active.
3344 .B Default:
3345         status = yes
3347 .B Example:
3348         status = no
3350 .SS strict locking (S)
3351 This is a boolean that controls the handling of file locking in the
3352 server. When this is set to yes the server will check every read and
3353 write access for file locks, and deny access if locks exist. This can
3354 be slow on some systems.
3356 When strict locking is "no" the server does file lock checks only when
3357 the client explicitly asks for them. 
3359 Well behaved clients always ask for lock checks when it is important,
3360 so in the vast majority of cases "strict locking = no" is preferable.
3362 .B Default:
3363         strict locking = no
3365 .B Example:
3366         strict locking = yes
3368 .SS strip dot (G)
3369 This is a boolean that controls whether to strip trailing dots off
3370 UNIX filenames. This helps with some CDROMs that have filenames ending in a
3371 single dot.
3373 .B Default:
3374         strip dot = no
3376 .B Example:
3377     strip dot = yes
3379 .SS syslog (G)
3380 This parameter maps how Samba debug messages are logged onto the
3381 system syslog logging levels. Samba debug level zero maps onto
3382 syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug
3383 level two maps to LOG_NOTICE, debug level three maps onto LOG_INFO.
3384 The paramter sets the threshold for doing the mapping, all Samba
3385 debug messages above this threashold are mapped to syslog LOG_DEBUG
3386 messages.
3388 .B Default:
3390         syslog = 1
3392 .SS syslog only (G)
3393 If this parameter is set then Samba debug messages are logged into
3394 the system syslog only, and not to the debug log files.
3396 .B Default:
3397         syslog only = no
3399 .SS sync always (S)
3401 This is a boolean parameter that controls whether writes will always
3402 be written to stable storage before the write call returns. If this is
3403 false then the server will be guided by the client's request in each
3404 write call (clients can set a bit indicating that a particular write
3405 should be synchronous). If this is true then every write will be
3406 followed by a fsync() call to ensure the data is written to disk.
3408 .B Default:
3409         sync always = no
3411 .B Example:
3412         sync always = yes
3414 .SS time offset (G)
3415 This parameter is a setting in minutes to add to the normal GMT to
3416 local time conversion. This is useful if you are serving a lot of PCs
3417 that have incorrect daylight saving time handling.
3419 .B Default:
3420         time offset = 0
3422 .B Example:
3423         time offset = 60
3425 .SS time server (G)
3426 This parameter determines if nmbd advertises itself as a time server
3427 to Windows clients. The default is False.
3429 .B Default:
3430         time server = False
3432 .B Example:
3433         time server = True
3435 .SS unix realname (G)
3436 This boolean parameter when set causes samba to supply the real name field
3437 from the unix password file to the client. This is useful for setting up
3438 mail clients and WWW browsers on systems used by more than one person.
3440 .B Default:
3441         unix realname = no
3443 .B Example:
3444         unix realname = yes
3446 .SS user (S)
3448 .B username.
3449 .SS username (S)
3450 A synonym for this parameter is 'user'.
3452 Multiple users may be specified in a comma-delimited list, in which case the
3453 supplied password will be tested against each username in turn (left to right).
3455 The username= line is needed only when the PC is unable to supply its own
3456 username. This is the case for the coreplus protocol or where your
3457 users have different WfWg usernames to UNIX usernames. In both these
3458 cases you may also be better using the \e\eserver\eshare%user syntax
3459 instead. 
3461 The username= line is not a great solution in many cases as it means Samba
3462 will try to validate the supplied password against each of the
3463 usernames in the username= line in turn. This is slow and a bad idea for
3464 lots of users in case of duplicate passwords. You may get timeouts or
3465 security breaches using this parameter unwisely.
3467 Samba relies on the underlying UNIX security. This parameter does not
3468 restrict who can login, it just offers hints to the Samba server as to
3469 what usernames might correspond to the supplied password. Users can
3470 login as whoever they please and they will be able to do no more
3471 damage than if they started a telnet session. The daemon runs as the
3472 user that they log in as, so they cannot do anything that user cannot
3475 To restrict a service to a particular set of users you can use the
3476 "valid users=" line.
3478 If any of the usernames begin with a @ then the name will be looked up
3479 in the groups file and will expand to a list of all users in the group
3480 of that name. Note that searching though a groups file can take quite
3481 some time, and some clients may time out during the search.
3483 See the section below on username/password validation for more information
3484 on how this parameter determines access to the services.
3486 .B Default:
3487         The guest account if a guest service, else the name of the service.
3489 .B Examples:
3490         username = fred
3491         username = fred, mary, jack, jane, @users, @pcgroup
3493 .SS username level (G)
3495 This option helps Samba to try and 'guess' at the real UNIX username,
3496 as many DOS clients send an all-uppercase username. By default Samba
3497 tries all lowercase, followed by the username with the first letter
3498 capitalized, and fails if the username is not found on the UNIX machine.
3500 If this parameter is set to non-zero the behaviour changes. This 
3501 parameter is a number that specifies the number of uppercase combinations 
3502 to try whilst trying to determine the UNIX user name. The higher the number
3503 the more combinations will be tried, but the slower the discovery
3504 of usernames will be. Use this parameter when you have strange
3505 usernames on your UNIX machine, such as 'AstrangeUser'.
3507 .B Default:
3508     username level = 0
3510 .B Example:
3511     username level = 5
3513 .SS username map (G)
3515 This option allows you to to specify a file containing a mapping of
3516 usernames from the clients to the server. This can be used for several
3517 purposes. The most common is to map usernames that users use on DOS or
3518 Windows machines to those that the UNIX box uses. The other is to map
3519 multiple users to a single username so that they can more easily share
3520 files.
3522 The map file is parsed line by line. Each line should contain a single
3523 UNIX username on the left then a '=' followed by a list of usernames
3524 on the right. The list of usernames on the right may contain names of
3525 the form @group in which case they will match any UNIX username in
3526 that group. The special client name '*' is a wildcard and matches any
3527 name.
3529 The file is processed on each line by taking the supplied username and
3530 comparing it with each username on the right hand side of the '='
3531 signs. If the supplied name matches any of the names on the right
3532 hand side then it is replaced with the name on the left. Processing
3533 then continues with the next line.
3535 If any line begins with a '#' or a ';' then it is ignored
3537 If any line begins with an ! then the processing will stop after that
3538 line if a mapping was done by the line. Otherwise mapping continues
3539 with every line being processed. Using ! is most useful when you have
3540 a wildcard mapping line later in the file.
3542 For example to map from the name "admin" or "administrator" to the UNIX
3543 name "root" you would use
3545         root = admin administrator
3547 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
3548 would use
3550         sys = @system
3552 You can have as many mappings as you like in a username map file.
3554 You can map Windows usernames that have spaces in them by using double
3555 quotes around the name. For example:
3557         tridge = "Andrew Tridgell"
3559 would map the windows username "Andrew Tridgell" to the unix username
3560 tridge.
3562 The following example would map mary and fred to the unix user sys,
3563 and map the rest to guest. Note the use of the ! to tell Samba to stop
3564 processing if it gets a match on that line.
3566         !sys = mary fred
3567         guest = *
3570 Note that the remapping is applied to all occurrences of
3571 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
3572 remapped to "mary" then you will actually be connecting to
3573 "\e\eserver\emary" and will need to supply a password suitable for
3574 "mary" not "fred". The only exception to this is the username passed
3575 to the "password server" (if you have one). The password server will
3576 receive whatever username the client supplies without modification.
3578 Also note that no reverse mapping is done. The main effect this has is
3579 with printing. Users who have been mapped may have trouble deleting
3580 print jobs as PrintManager under WfWg will think they don't own the
3581 print job.
3583 .B Default
3584         no username map
3586 .B Example
3587         username map = /usr/local/samba/lib/users.map
3589 .SS valid chars (S)
3591 The option allows you to specify additional characters that should be
3592 considered valid by the server in filenames. This is particularly
3593 useful for national character sets, such as adding u-umlaut or a-ring.
3595 The option takes a list of characters in either integer or character
3596 form with spaces between them. If you give two characters with a colon
3597 between them then it will be taken as an lowercase:uppercase pair.
3599 If you have an editor capable of entering the characters into the
3600 config file then it is probably easiest to use this method. Otherwise
3601 you can specify the characters in octal, decimal or hexadecimal form
3602 using the usual C notation.
3604 For example to add the single character 'Z' to the charset (which is a
3605 pointless thing to do as it's already there) you could do one of the
3606 following
3608 valid chars = Z
3609 valid chars = z:Z
3610 valid chars = 0132:0172
3612 The last two examples above actually add two characters, and alter
3613 the uppercase and lowercase mappings appropriately.
3615 Note that you MUST specify this parameter after the "client code page"
3616 parameter if you have both set. If "client code page" is set after
3617 the "valid chars" parameter the "valid chars" settings will be
3618 overwritten.
3620 See also the "client code page" parameter.
3622 .B Default
3624         Samba defaults to using a reasonable set of valid characters
3626         for english systems
3628 .B Example
3629         valid chars = 0345:0305 0366:0326 0344:0304
3631 The above example allows filenames to have the swedish characters in
3632 them. 
3634 NOTE: It is actually quite difficult to correctly produce a "valid
3635 chars" line for a particular system. To automate the process
3636 tino@augsburg.net has written a package called "validchars" which will
3637 automatically produce a complete "valid chars" line for a given client
3638 system. Look in the examples subdirectory for this package.
3640 .SS valid users (S)
3641 This is a list of users that should be allowed to login to this
3642 service. A name starting with @ is interpreted as a UNIX group.
3644 If this is empty (the default) then any user can login. If a username
3645 is in both this list and the "invalid users" list then access is
3646 denied for that user.
3648 The current servicename is substituted for %S. This is useful in the
3649 [homes] section.
3651 See also "invalid users"
3653 .B Default
3654         No valid users list. (anyone can login)
3656 .B Example
3657         valid users = greg, @pcusers
3660 .SS veto files(S)
3661 This is a list of files and directories that are neither visible nor
3662 accessible.  Each entry in the list must be separated by a "/", which
3663 allows spaces to be included in the entry.  '*' and '?' can be used to
3664 specify multiple files or directories as in DOS wildcards.
3666 Each entry must be a unix path, not a DOS path and must not include the 
3667 unix directory separator "/".
3669 Note that the case sensitivity option is applicable in vetoing files.
3671 One feature of the veto files parameter that it is important to be
3672 aware of, is that if a directory contains nothing but files that
3673 match the veto files parameter (which means that Windows/DOS clients
3674 cannot ever see them) is deleted, the veto files within that directory
3675 *are automatically deleted* along with it, if the user has UNIX permissions
3676 to do so.
3678 Setting this parameter will affect the performance of Samba, as
3679 it will be forced to check all files and directories for a match
3680 as they are scanned.
3682 See also "hide files" and "case sensitive"
3684 .B Default
3685         No files or directories are vetoed.
3687 .B Examples
3688     Example 1.
3689     Veto any files containing the word Security, 
3690     any ending in .tmp, and any directory containing the
3691     word root.
3693         veto files = /*Security*/*.tmp/*root*/
3695     Example 2.
3696     Veto the Apple specific files that a NetAtalk server
3697     creates.
3699     veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
3701 .SS veto oplock files (S)
3702 This parameter is only valid when the 'oplocks' parameter is turned on
3703 for a share. It allows the Samba administrator to selectively turn off
3704 the granting of oplocks on selected files that match a wildcarded list,
3705 similar to the wildcarded list used in the 'veto files' parameter.
3707 .B Default
3708     No files are vetoed for oplock grants.
3710 .B Examples
3711 You might want to do this on files that you know will be heavily
3712 contended for by clients. A good example of this is in the NetBench
3713 SMB benchmark program, which causes heavy client contention for files
3714 ending in .SEM. To cause Samba not to grant oplocks on these files
3715 you would use the line (either in the [global] section or in the section
3716 for the particular NetBench share :
3718      veto oplock files = /*.SEM/
3720 .SS volume (S)
3721 This allows you to override the volume label returned for a
3722 share. Useful for CDROMs with installation programs that insist on a
3723 particular volume label.
3725 The default is the name of the share
3727 .SS wide links (S)
3728 This parameter controls whether or not links in the UNIX file system may be
3729 followed by the server. Links that point to areas within the directory tree
3730 exported by the server are always allowed; this parameter controls access 
3731 only to areas that are outside the directory tree being exported.
3733 .B Default:
3734         wide links = yes
3736 .B Example:
3737         wide links = no
3739 .SS wins proxy (G)
3741 This is a boolean that controls if nmbd will respond to broadcast name
3742 queries on behalf of other hosts. You may need to set this to no for
3743 some older clients.
3745 .B Default:
3746         wins proxy = no
3747 .SS wins server (G)
3749 This specifies the DNS name (or IP address) of the WINS server that Samba 
3750 should register with. If you have a WINS server on your network then you
3751 should set this to the WINS servers name.
3753 You should point this at your WINS server if you have a multi-subnetted
3754 network.
3755 .B Default:
3756         wins server = 
3758 .SS wins support (G)
3760 This boolean controls if Samba will act as a WINS server. You should
3761 not set this to true unless you have a multi-subnetted network and
3762 you wish a particular nmbd to be your WINS server. Note that you
3763 should *NEVER* set this to true on more than one machine in your
3764 network.
3766 .B Default:
3767         wins support = no
3769 .SS workgroup (G)
3771 This controls what workgroup your server will appear to be in when
3772 queried by clients. 
3774 .B Default:
3775         set in the Makefile
3777 .B Example:
3778         workgroup = MYGROUP
3780 .SS writable (S)
3781 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
3783 If this parameter is 'no', then users of a service may not create or modify
3784 files in the service's directory.
3786 Note that a printable service ('printable = yes') will ALWAYS allow 
3787 writing to the directory (user privileges permitting), but only via
3788 spooling operations.
3790 .B Default:
3791         writable = no
3793 .B Examples:
3794         read only = no
3795         writable = yes
3796         write ok = yes
3797 .SS write list (S)
3798 This is a list of users that are given read-write access to a
3799 service. If the connecting user is in this list then they will be
3800 given write access, no matter what the "read only" option is set
3801 to. The list can include group names using the @group syntax.
3803 Note that if a user is in both the read list and the write list then
3804 they will be given write access.
3806 See also the "read list" option
3808 .B Default:
3809      write list =
3811 .B Example:
3812      write list = admin, root, @staff
3814 .SS write ok (S)
3816 .B writable
3818 .B read only.
3819 .SS write raw (G)
3820 This parameter controls whether or not the server will support raw writes when
3821 transferring data from clients.
3823 .B Default:
3824         write raw = yes
3826 .B Example:
3827         write raw = no
3828 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
3829 There are a number of ways in which a user can connect to a
3830 service. The server follows the following steps in determining if it
3831 will allow a connection to a specified service. If all the steps fail
3832 then the connection request is rejected. If one of the steps pass then
3833 the following steps are not checked.
3835 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
3837 Step 1: If the client has passed a username/password pair and that
3838 username/password pair is validated by the UNIX system's password
3839 programs then the connection is made as that username. Note that this
3840 includes the \e\eserver\eservice%username method of passing a username.
3842 Step 2: If the client has previously registered a username with the
3843 system and now supplies a correct password for that username then the
3844 connection is allowed.
3846 Step 3: The client's netbios name and any previously used user names
3847 are checked against the supplied password, if they match then the
3848 connection is allowed as the corresponding user.
3850 Step 4: If the client has previously validated a username/password
3851 pair with the server and the client has passed the validation token
3852 then that username is used. This step is skipped if "revalidate = yes" 
3853 for this service.
3855 Step 5: If a "user = " field is given in the smb.conf file for the
3856 service and the client has supplied a password, and that password
3857 matches (according to the UNIX system's password checking) with one of
3858 the usernames from the user= field then the connection is made as the
3859 username in the "user=" line. If one of the username in the user= list
3860 begins with a @ then that name expands to a list of names in the group
3861 of the same name.
3863 Step 6: If the service is a guest service then a connection is made as
3864 the username given in the "guest account =" for the service,
3865 irrespective of the supplied password.
3866 .SH WARNINGS
3867 Although the configuration file permits service names to contain spaces, 
3868 your client software may not. Spaces will be ignored in comparisons anyway,
3869 so it shouldn't be a problem - but be aware of the possibility.
3871 On a similar note, many clients - especially DOS clients - limit service
3872 names to eight characters. Smbd has no such limitation, but attempts
3873 to connect from such clients will fail if they truncate the service names.
3874 For this reason you should probably keep your service names down to eight 
3875 characters in length.
3877 Use of the [homes] and [printers] special sections make life for an 
3878 administrator easy, but the various combinations of default attributes can be
3879 tricky. Take extreme care when designing these sections. In particular,
3880 ensure that the permissions on spool directories are correct.
3881 .SH VERSION
3882 This man page is (mostly) correct for version 1.9.18 of the Samba suite, plus some
3883 of the recent patches to it. These notes will necessarily lag behind 
3884 development of the software, so it is possible that your version of 
3885 the server has extensions or parameter semantics that differ from or are not 
3886 covered by this man page. Please notify these to the address below for 
3887 rectification.
3889 Prior to version 1.5.21 of the Samba suite, the configuration file was
3890 radically different (more primitive). If you are using a version earlier than
3891 1.8.05, it is STRONGLY recommended that you upgrade.
3892 .SH OPTIONS
3893 Not applicable.
3894 .SH FILES
3895 Not applicable.
3896 .SH ENVIRONMENT VARIABLES
3897 Not applicable.
3898 .SH SEE ALSO
3899 .BR smbd (8),
3900 .BR smbclient (1),
3901 .BR nmbd (8),
3902 .BR testparm (1), 
3903 .BR testprns (1),
3904 .BR lpq (1),
3905 .BR hosts_access (5)
3906 .SH DIAGNOSTICS
3907 [This section under construction]
3909 Most diagnostics issued by the server are logged in a specified log file. The
3910 log file name is specified at compile time, but may be overridden on the
3911 smbd command line (see
3912 .BR smbd (8)).
3914 The number and nature of diagnostics available depends on the debug level used
3915 by the server. If you have problems, set the debug level to 3 and peruse the
3916 log files.
3918 Most messages are reasonably self-explanatory. Unfortunately, at time of
3919 creation of this man page the source code is still too fluid to warrant
3920 describing each and every diagnostic. At this stage your best bet is still
3921 to grep the source code and inspect the conditions that gave rise to the 
3922 diagnostics you are seeing.
3923 .SH BUGS
3924 None known.
3926 Please send bug reports, comments and so on to:
3928 .RS 3
3929 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3931 .RS 3
3932 or to the mailing list:
3935 .B samba@listproc.anu.edu.au
3938 You may also like to subscribe to the announcement channel:
3940 .RS 3
3941 .B samba-announce@listproc.anu.edu.au
3944 To subscribe to these lists send a message to
3945 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
3946 Name" or "subscribe samba-announce Your Name".
3948 Errors or suggestions for improvements to the Samba man pages should be 
3949 mailed to:
3951 .RS 3
3952 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)