preparing for release of 1.9.18alpha6
[Samba/gbeck.git] / docs / manpages / smb.conf.5
blob39864d69932d891e59d75ba9b43685493fcd48eb
1 .TH SMB.CONF 5 "28 Oct 1997" "smb.conf 1.9.18alpha6"
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 .SH PARAMETERS
215 Parameters define the specific attributes of services.
217 Some parameters are specific to the [global] section (eg., security).
218 Some parameters are usable in all sections (eg., create mode). All others are
219 permissible only in normal sections. For the purposes of the following
220 descriptions the [homes] and [printers] sections will be considered normal.
221 The letter 'G' in parentheses indicates that a parameter is specific to the
222 [global] section. The letter 'S' indicates that a parameter can be
223 specified in a service specific section. Note that all S parameters
224 can also be specified in the [global] section - in which case they
225 will define the default behaviour for all services.
227 Parameters are arranged here in alphabetical order - this may not create
228 best bedfellows, but at least you can find them! Where there are synonyms,
229 the preferred synonym is described, others refer to the preferred synonym.
231 .SS VARIABLE SUBSTITUTIONS
233 Many of the strings that are settable in the config file can take
234 substitutions. For example the option "path = /tmp/%u" would be
235 interpreted as "path = /tmp/john" if the user connected with the
236 username john.
238 These substitutions are mostly noted in the descriptions below, but
239 there are some general substitutions which apply whenever they might be
240 relevant. These are:
242 %S = the name of the current service, if any
244 %P = the root directory of the current service, if any
246 %u = user name of the current service, if any
248 %g = primary group name of %u
250 %U = session user name (the user name that the client wanted, not
251 necessarily the same as the one they got)
253 %G = primary group name of %U
255 %H = the home directory of the user given by %u
257 %v = the Samba version
259 %h = the hostname that Samba is running on
261 %m = the netbios name of the client machine (very useful)
263 %L = the netbios name of the server. This allows you to change your
264 config based on what the client calls you. Your server can have a "dual
265 personality".
267 %M = the internet name of the client machine
269 %N = the name of your NIS home directory server.  This is obtained from
270 your NIS auto.map entry.  If you have not compiled Samba with -DAUTOMOUNT
271 then this value will be the same as %L.
273 %d = The process id of the current server process
275 %a = the architecture of the remote machine. Only some are recognised,
276 and those may not be 100% reliable. It currently recognises Samba,
277 WfWg, WinNT and Win95. Anything else will be known as "UNKNOWN". If it
278 gets it wrong then sending me a level 3 log should allow me to fix it.
280 %I = The IP address of the client machine
282 %T = the current date and time
284 There are some quite creative things that can be done with these
285 substitutions and other smb.conf options.
287 .SS NAME MANGLING
289 Samba supports "name mangling" so that DOS and Windows clients can use
290 files that don't conform to the 8.3 format. It can also be set to adjust
291 the case of 8.3 format filenames.
293 There are several options that control the way mangling is performed,
294 and they are grouped here rather than listed separately. For the
295 defaults look at the output of the testparm program.
297 All of these options can be set separately for each service (or
298 globally, of course).
300 The options are:
302 "mangle case = yes/no" controls if names that have characters that
303 aren't of the "default" case are mangled. For example, if this is yes
304 then a name like "Mail" would be mangled. Default no.
306 "case sensitive = yes/no" controls whether filenames are case
307 sensitive. If they aren't then Samba must do a filename search and
308 match on passed names. Default no.
310 "default case = upper/lower" controls what the default case is for new
311 filenames. Default lower.
313 "preserve case = yes/no" controls if new files are created with the
314 case that the client passes, or if they are forced to be the "default"
315 case. Default no.
317 "short preserve case = yes/no" controls if new files which conform to 8.3
318 syntax, that is all in upper case and of suitable length, are created
319 upper case, or if they are forced to be the "default" case. This option can
320 be use with "preserve case = yes" to permit long filenames to retain their
321 case, while short names are lowered. Default no.
323 .SS COMPLETE LIST OF GLOBAL PARAMETERS
325 Here is a list of all global parameters. See the section of each
326 parameter for details.  Note that some are synonyms.
328 announce as
330 announce version
332 auto services
334 bind interfaces only
336 browse list
338 character set
340 client code page
342 config file
344 deadtime
346 debuglevel
348 default
350 default service
352 dfree command
354 dns proxy
356 domain controller
358 domain sid
360 domain group
362 domain logons
364 domain master
366 encrypt passwords
368 getwd cache
370 hide files
372 hide dot files
374 homedir map
376 hosts equiv
378 include
380 interfaces
382 keepalive
384 lock dir
386 load printers
388 local master
390 lock directory
392 log file
394 log level
396 logon drive
398 logon home
400 logon path
402 logon script
404 lpq cache time
406 mangled stack
408 max log size
410 max mux
412 max packet
414 max ttl
416 max xmit
418 message command
420 netbios aliases
422 netbios name
424 nis homedir
426 null passwords
428 os level
430 packet size
432 passwd chat
434 passwd program
436 password level
438 password server
440 preferred master
442 preload
444 printing
446 printcap name
448 protocol
450 read bmpx
452 read prediction
454 read raw
456 read size
458 remote announce
460 root
462 root dir
464 root directory
466 security
468 server string
470 shared file entries
472 shared mem size
474 smb passwd file
476 smbrun
478 socket address
480 socket options
482 status
484 strip dot
486 syslog
488 syslog only
490 time offset
492 time server
494 unix realname
496 username level
498 username map
500 use rhosts
502 valid chars
504 veto files
506 workgroup
508 write raw
510 .SS COMPLETE LIST OF SERVICE PARAMETERS
512 Here is a list of all service parameters. See the section of each
513 parameter for details. Note that some are synonyms.
515 admin users
517 allow hosts
519 alternate permissions
521 available
523 browseable
525 case sensitive
527 case sig names
529 copy
531 create mask
533 create mode
535 comment
537 default case
539 delete readonly
541 delete veto files
543 deny hosts
545 directory
547 directory mask
549 directory mode
551 dont descend
553 dos filetimes
555 exec
557 fake oplocks
559 follow symlinks
561 force create mode
563 force directory mode
565 force group
567 force user
569 guest account
571 guest ok
573 guest only
575 hide dot files
577 hosts allow
579 hosts deny
581 invalid users
583 locking
585 lppause command
587 lpq command
589 lpresume command
591 lprm command
593 magic output
595 magic script
597 mangle case
599 mangled names
601 mangling char
603 map archive
605 map hidden
607 map system
609 max connections
611 min print space
613 only guest
615 only user
617 oplocks
619 path
621 postexec
623 postscript
625 preserve case
627 print command
629 printer driver
631 print ok
633 printable
635 printer
637 printer name
639 public
641 read only
643 read list
645 revalidate
647 root postexec
649 root preexec
651 set directory
653 share modes
655 short preserve case
657 strict locking
659 sync always
661 user
663 username
665 users
667 valid users
669 volume
671 wide links
673 writable
675 write ok
677 writeable
679 write list
681 .SS EXPLANATION OF EACH PARAMETER
682 .RS 3
684 .SS admin users (S)
686 This is a list of users who will be granted administrative privileges
687 on the share. This means that they will do all file operations as the
688 super-user (root).
690 You should use this option very carefully, as any user in this list
691 will be able to do anything they like on the share, irrespective of
692 file permissions.
694 .B Default:
695         no admin users
697 .B Example:
698         admin users = jason
700 .SS announce as (G)
702 This specifies what type of server nmbd will announce itself as in
703 browse lists. By default this is set to Windows NT. The valid options
704 are "NT", "Win95" or "WfW" meaining Windows NT, Windows 95 and
705 Windows for Workgroups respectively. Do not change this parameter
706 unless you have a specific need to stop Samba appearing as an NT
707 server as this may prevent Samba servers from participating as
708 browser servers correctly.
710 .B Default:
711     announce as = NT
713 .B Example
714     announce as = Win95
716 .SS announce version (G)
718 This specifies the major and minor version numbers that nmbd
719 will use when announcing itself as a server. The default is 4.2.
720 Do not change this parameter unless you have a specific need to
721 set a Samba server to be a downlevel server.
723 .B Default:
724    announce version = 4.2
726 .B Example:
727    announce version = 2.0
729 .SS auto services (G)
730 This is a list of services that you want to be automatically added to
731 the browse lists. This is most useful for homes and printers services
732 that would otherwise not be visible.
734 Note that if you just want all printers in your printcap file loaded
735 then the "load printers" option is easier.
737 .B Default:
738         no auto services
740 .B Example:
741         auto services = fred lp colorlp
743 .SS allow hosts (S)
744 A synonym for this parameter is 'hosts allow'.
746 This parameter is a comma delimited set of hosts which are permitted to access
747 a service. 
749 If specified in the [global] section then it will apply to all
750 services, regardless of whether the individual service has a different
751 setting. 
753 You can specify the hosts by name or IP number. For example, you could
754 restrict access to only the hosts on a Class C subnet with something like
755 "allow hosts = 150.203.5.". The full syntax of the list is described in
756 the man page
757 .BR hosts_access (5).
759 You can also specify hosts by network/netmask pairs and by netgroup
760 names if your system supports netgroups. The EXCEPT keyword can also
761 be used to limit a wildcard list. The following examples may provide
762 some help:
764 Example 1: allow all IPs in 150.203.*.* except one
766         hosts allow = 150.203. EXCEPT 150.203.6.66
768 Example 2: allow hosts that match the given network/netmask
770         hosts allow = 150.203.15.0/255.255.255.0
772 Example 3: allow a couple of hosts
774         hosts allow = lapland, arvidsjaur
776 Example 4: allow only hosts in netgroup "foonet" or localhost, but 
777 deny access from one particular host
779         hosts allow = @foonet, localhost
780         hosts deny = pirate
782 Note that access still requires suitable user-level passwords.
785 .BR testparm (1)
786 for a way of testing your host access to see if it
787 does what you expect.
789 .B Default:
790         none (i.e., all hosts permitted access)
792 .B Example:
793         allow hosts = 150.203.5. myhost.mynet.edu.au
795 .SS alternate permissions (S)
797 This option affects the way the "read only" DOS attribute is produced
798 for UNIX files. If this is false then the read only bit is set for
799 files on writeable shares which the user cannot write to.
801 If this is true then it is set for files whos user write bit is not set.
803 The latter behaviour is useful for when users copy files from each
804 others directories, and use a file manager that preserves
805 permissions. Without this option they may get annoyed as all copied
806 files will have the "read only" bit set.
808 .B Default:
809         alternate permissions = no
811 .B Example:
812         alternate permissions = yes
814 .SS available (S)
815 This parameter lets you 'turn off' a service. If 'available = no', then
816 ALL attempts to connect to the service will fail. Such failures are logged.
818 .B Default:
819         available = yes
821 .B Example:
822         available = no
824 .SS bind interfaces only (G)
825 This global parameter (new for 1.9.18) allows the Samba admin to limit
826 what interfaces on a machine will serve smb requests. If affects file service
827 (smbd) and name service (nmbd) in slightly different ways.
829 For name service it causes nmbd to bind to ports 137 and 138 on
830 the interfaces listed in the 'interfaces' parameter. nmbd also binds
831 to the 'all addresses' interface (0.0.0.0) on ports 137 and 138
832 for the purposes of reading broadcast messages. If this option is
833 not set then nmbd will service name requests on all of these
834 sockets. If "bind interfaces only" is set then nmbd will check
835 the source address of any packets coming in on the broadcast
836 sockets and discard any that don't match the broadcast addresses
837 of the interfaces in the 'interfaces' parameter list. As unicast
838 packets are received on the other sockets it allows nmbd to
839 refuse to serve names to machines that send packets that arrive
840 through any interfaces not listed in the 'interfaces' list.
841 IP Source address spoofing does defeat this simple check, however
842 so it must not be used seriously as a security feature for nmbd.
844 For file service it causes smbd to bind only to the interface
845 list given in the 'interfaces' parameter. This restricts the
846 networks that smbd will serve to packets coming in those interfaces.
847 Note that you should not use this parameter for machines that
848 are serving ppp or other intermittant or non-broadcast network
849 interfaces as it will not cope with non-permanent interfaces.
851 .B Default:
852        bind interfaces only = False
854 .B Example:
855        bind interfaces only = True
857 .SS browseable (S)
858 This controls whether this share is seen in the list of available
859 shares in a net view and in the browse list.
861 .B Default:
862         browseable = Yes
864 .B Example: 
865         browseable = No
866 .SS browse list(G)
867 This controls whether the smbd will serve a browse list to a client
868 doing a NetServerEnum call. Normally set to true. You should never
869 need to change this.
871 .B Default:
872         browse list = Yes
874 .SS case sensitive (G)
875 See the discussion on NAME MANGLING.
877 .SS case sig names (G)
878 See "case sensitive"
880 .SS character set (G)
881 This allows a smbd to map incoming characters from a DOS 850 Code page
882 to either a Western European (ISO8859-1) or Easter European (ISO8859-2)
883 code page. Normally not set, meaning no filename translation is done.
885 .B Default
887         character set =
889 .B Example
891         character set = iso8859-1
893 .SS client code page (G)
894 Currently (Samba 1.9.17 and above) this may be set to one of two
895 values, 850 or 437. It specifies the base DOS code page that the
896 clients accessing Samba are using. To determine this, open a DOS
897 command prompt and type the command "chcp". This will output the
898 code page. The default for USA MS-DOS, Windows 95, and Windows NT
899 releases is code page 437. The default for western european 
900 releases of the above operating systems is code page 850.
902 This parameter co-operates with the "valid chars" parameter in
903 determining what characters are valid in filenames and how
904 capitalization is done. It has been added as a convenience for
905 clients whose code page is either 437 or 850 so a convoluted
906 "valid chars" string does not have to be determined. If you
907 set both this parameter and the "valid chars" parameter the 
908 "client code page" parameter MUST be set before the "valid chars"
909 in the smb.conf file. The "valid chars" string will then augment
910 the character settings in the "client code page" parameter.
912 If "client code page" is set to a value other than 850 or 437
913 it will default to 850.
915 See also : "valid chars".
917 .B Default
919         client code page = 850
921 .B Example
923         client code page = 437
925 .SS comment (S)
926 This is a text field that is seen next to a share when a client does a
927 net view to list what shares are available.
929 If you want to set the string that is displayed next to the machine
930 name then see the server string command.
932 .B Default:
933         No comment string
935 .B Example:
936         comment = Fred's Files
938 .SS config file (G)
940 This allows you to override the config file to use, instead of the
941 default (usually smb.conf). There is a chicken and egg problem here as
942 this option is set in the config file! 
944 For this reason, if the name of the config file has changed when the
945 parameters are loaded then it will reload them from the new config
946 file.
948 This option takes the usual substitutions, which can be very useful.
950 If the config file doesn't exist then it won't be loaded (allowing
951 you to special case the config files of just a few clients).
953 .B Example:
954         config file = /usr/local/samba/lib/smb.conf.%m
956 .SS copy (S)
957 This parameter allows you to 'clone' service entries. The specified
958 service is simply duplicated under the current service's name. Any 
959 parameters specified in the current section will override those in the
960 section being copied.
962 This feature lets you set up a 'template' service and create similar 
963 services easily. Note that the service being copied must occur earlier 
964 in the configuration file than the service doing the copying.
966 .B Default:
967         none
969 .B Example:
970         copy = otherservice
971 .SS create mask (S)
972 A synonym for this parameter is 'create mode'.
974 When a file is created, the neccessary permissions are calculated
975 according to the mapping from DOS modes to UNIX permissions, and
976 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
977 This parameter may be thought of as a bit-wise MASK for the UNIX
978 modes of a file. Any bit *not* set here will be removed from the
979 modes set on a file when it is created.
981 The default value of this parameter removes the 'group' and 'other' 
982 write and execute bits from the UNIX modes.
984 Following this Samba will bit-wise 'OR' the UNIX mode created from
985 this parameter with the value of the "force create mode" parameter 
986 which is set to 000 by default.
988 For Samba 1.9.17 and above this parameter no longer affects directory
989 modes. See the parameter 'directory mode' for details.
991 See also the "force create mode" parameter for forcing particular
992 mode bits to be set on created files.
993 See also the "directory mode" parameter for masking mode bits on created
994 directories.
996 .B Default:
997         create mask = 0744
999 .B Example:
1000         create mask = 0775
1001 .SS create mode (S)
1003 .B create mask.
1005 .SS dead time (G)
1006 The value of the parameter (a decimal integer) represents the number of
1007 minutes of inactivity before a connection is considered dead, and it
1008 is disconnected. The deadtime only takes effect if the number of open files
1009 is zero.
1011 This is useful to stop a server's resources being exhausted by a large
1012 number of inactive connections.
1014 Most clients have an auto-reconnect feature when a connection is broken so
1015 in most cases this parameter should be transparent to users.
1017 Using this parameter with a timeout of a few minutes is recommended
1018 for most systems.
1020 A deadtime of zero indicates that no auto-disconnection should be performed.
1022 .B Default:
1023         dead time = 0
1025 .B Example:
1026         dead time = 15
1027 .SS debug level (G)
1028 The value of the parameter (an integer) allows the debug level
1029 (logging level) to be specified in the
1030 .B smb.conf
1031 file. This is to give
1032 greater flexibility in the configuration of the system.
1034 The default will be the debug level specified on the command line.
1036 .B Example:
1037         debug level = 3
1038 .SS default (G)
1040 .B default service.
1041 .SS default case (S)
1043 See the section on "NAME MANGLING" Also note the addition of "short
1044 preserve case"
1046 .SS default service (G)
1047 A synonym for this parameter is 'default'.
1049 This parameter specifies the name of a service which will be connected to
1050 if the service actually requested cannot be found. Note that the square
1051 brackets are NOT given in the parameter value (see example below).
1053 There is no default value for this parameter. If this parameter is not given,
1054 attempting to connect to a nonexistent service results in an error.
1056 Typically the default service would be a public, read-only service.
1058 Also note that as of 1.9.14 the apparent service name will be changed to
1059 equal that of the requested service, this is very useful as it allows
1060 you to use macros like %S to make a wildcard service.
1062 Note also that any _ characters in the name of the service used in the
1063 default service will get mapped to a /. This allows for interesting
1064 things.
1067 .B Example:
1068         default service = pub
1069         
1070         [pub]
1071              path = /%S
1072           
1074 .SS delete readonly (S)
1075 This parameter allows readonly files to be deleted.  This is not normal DOS
1076 semantics, but is allowed by UNIX.
1078 This option may be useful for running applications such as rcs, where UNIX
1079 file ownership prevents changing file permissions, and DOS semantics prevent
1080 deletion of a read only file.
1082 .B Default:
1083         delete readonly = No
1085 .B Example:
1086         delete readonly = Yes
1087 .SS deny hosts (S)
1088 A synonym for this parameter is 'hosts deny'.
1090 The opposite of 'allow hosts' - hosts listed here are NOT permitted
1091 access to services unless the specific services have their own lists to
1092 override this one. Where the lists conflict, the 'allow' list takes precedence.
1094 .B Default:
1095         none (i.e., no hosts specifically excluded)
1097 .B Example:
1098         deny hosts = 150.203.4. badhost.mynet.edu.au
1100 .SS delete veto files (S)
1102 This option is used when Samba is attempting to delete a directory
1103 that contains one or more vetoed directories (see the 'veto files' option).
1104 If this option is set to False (the default) then if a vetoed directory
1105 contains any non-vetoed files or directories then the directory delete 
1106 will fail. This is usually what you want. 
1108 If this option is set to True, then Samba will attempt
1109 to recursively delete any files and directories within the vetoed
1110 directory. This can be useful for integration with file serving
1111 systems such as Netatalk, which create meta-files within directories
1112 you might normally veto DOS/Windows users from seeing (eg. .AppleDouble)
1114 Setting 'delete veto files = True' allows these directories to be 
1115 transparently deleted when the parent directory is deleted (so long
1116 as the user has permissions to do so).
1118 .B Default:
1119     delete veto files = False
1121 .B Example:
1122     delete veto files = True
1125 .B veto files
1127 .SS dfree command (G)
1128 The dfree command setting should only be used on systems where a
1129 problem occurs with the internal disk space calculations. This has
1130 been known to happen with Ultrix, but may occur with other operating
1131 systems. The symptom that was seen was an error of "Abort Retry
1132 Ignore" at the end of each directory listing.
1134 This setting allows the replacement of the internal routines to
1135 calculate the total disk space and amount available with an external
1136 routine. The example below gives a possible script that might fulfill
1137 this function. 
1139 The external program will be passed a single parameter indicating a
1140 directory in the filesystem being queried. This will typically consist
1141 of the string "./". The script should return two integers in ascii. The
1142 first should be the total disk space in blocks, and the second should
1143 be the number of available blocks. An optional third return value
1144 can give the block size in bytes. The default blocksize is 1024 bytes.
1146 Note: Your script should NOT be setuid or setgid and should be owned by
1147 (and writable only by) root!
1149 .B Default:
1150         By default internal routines for determining the disk capacity
1151 and remaining space will be used.
1153 .B Example:
1154         dfree command = /usr/local/samba/bin/dfree
1156         Where the script dfree (which must be made executable) could be
1159         #!/bin/sh
1160         df $1 | tail -1 | awk '{print $2" "$4}'
1163         or perhaps (on Sys V)
1166         #!/bin/sh
1167         /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1170         Note that you may have to replace the command names with full
1171 path names on some systems.
1172 .SS directory (S)
1174 .B path.
1176 .SS directory mask (S)
1177 A synonym for this parameter is 'directory mode'.
1179 This parameter is the octal modes which are used when converting DOS modes 
1180 to UNIX modes when creating UNIX directories.
1182 When a directory is created, the neccessary permissions are calculated
1183 according to the mapping from DOS modes to UNIX permissions, and
1184 the resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1185 This parameter may be thought of as a bit-wise MASK for the UNIX
1186 modes of a directory. Any bit *not* set here will be removed from the
1187 modes set on a directory when it is created.
1189 The default value of this parameter removes the 'group' and 'other'
1190 write bits from the UNIX mode, allowing only the user who owns the
1191 directory to modify it.
1193 Following this Samba will bit-wise 'OR' the UNIX mode created from
1194 this parameter with the value of the "force directory mode" parameter. 
1195 This parameter is set to 000 by default (ie. no extra mode bits are added).
1197 See the "force directory mode" parameter to cause particular mode
1198 bits to always be set on created directories.
1200 See also the "create mode" parameter for masking mode bits on created
1201 files.
1203 .B Default:
1204         directory mask = 0755
1206 .B Example:
1207         directory mask = 0775
1209 .SS directory mode (S)
1211 .B directory mask.
1213 .SS dns proxy (G)
1215 Specifies that nmbd should (as a WINS server), on finding that a NetBIOS
1216 name has not been registered, treat the NetBIOS name word-for-word as
1217 a DNS name.
1219 Note that the maximum length for a NetBIOS name is 15
1220 characters, so the DNS name (or DNS alias) can likewise only be 15
1221 characters, maximum.
1223 Note also that nmbd will block completely until the DNS name is resolved.
1224 This will result in temporary loss of browsing and WINS services.
1225 Enable this option only if you are certain that DNS resolution is fast,
1226 or you can live with the consequences of periodic pauses in nmbd service.
1228 .B Default:
1229          dns proxy = yes
1231 .SS domain controller (G)
1233 Specifies the DNS name or IP address of the machine to refer domain 
1234 logons from Win95 machines to. You should never need to set this parameter.
1236 .B Default:
1237          domain controller = no
1239 .SS domain groups (G)
1241 Specifies the NT Domain groups that the user belongs to, and the attributes
1242 associated with that group.  This parameter is a white-space separated list
1243 of group ids (in decimal), followed by an option attribute (in decimal) which
1244 defaults to a value of 7 if not specified.  A group id and the user attributes
1245 associated with it are separated by "/".
1248 It is known that attributes are ignored by NT 4.0 Workstation, but not by
1249 NT 3.51 Workstation.  Furthermore, no information on the exact meaning of
1250 NT Domain groups is presently known.  
1252 .B Default:
1253          domain groups = 776/7
1255 .B Example:
1256          domain groups = 776 1024/7 777
1258 .SS domain sid (G)
1260 Specifies the SID when using Samba as a Logon Server for NT Workstations.
1261 The format of SIDs supported by samba at present is S-1-N-nnn-nnn-nnn-nnn-nnn.
1262 The number N indicates the number of sub-authorities (nnn).
1264 .B Default:
1265          domain sid = none
1267 .B Example:
1268          domain sid = S-1-5-21-123-456-789-123
1270 .SS domain logons (G)
1272 If set to true, the Samba server will serve Windows 95 domain logons
1273 for the workgroup it is in. For more details on setting up this feature
1274 see the file DOMAINS.txt in the Samba source documentation directory.
1276 .B Default:
1277          domain logons = no
1279 .SS domain master (G)
1281 Enable WAN-wide browse list collation.  Local master browsers on 
1282 broadcast-isolated subnets will give samba their local browse lists, and 
1283 ask for a complete copy of the browse list for the whole wide area network.
1284 Browser clients will then contact their local master browser, and will
1285 receive the domain-wide browse list, instead of just the list for their
1286 broadcast-isolated subnet.
1288 .B Default:
1289         domain master = no
1291 .SS dont descend (S)
1292 There are certain directories on some systems (eg., the /proc tree under
1293 Linux) that are either not of interest to clients or are infinitely deep
1294 (recursive). This parameter allows you to specify a comma-delimited list
1295 of directories that the server should always show as empty.
1297 Note that Samba can be very fussy about the exact format of the "dont
1298 descend" entries. For example you may need "./proc" instead of just
1299 "/proc". Experimentation is the best policy :-)
1301 .B Default:
1302         none (i.e., all directories are OK to descend)
1304 .B Example:
1305         dont descend = /proc,/dev
1307 .SS dos filetimes (S)
1308 Under DOS and Windows, if a user can write to a file they can change
1309 the timestamp on it. Under POSIX semantics, only the owner of the file
1310 or root may change the timestamp. By default, Samba runs with POSIX
1311 semantics and refuses to change the timestamp on a file if the user
1312 smbd is acting on behalf of is not the file owner. Setting this option
1313 to True allows DOS semantics and smbd will change the file timstamp as 
1314 DOS requires. This is a correct implementation of a previous compile-time
1315 options (UTIME_WORKAROUND) which was broken and is now removed.
1317 .B Default:
1318         dos filetimes = False
1320 .B Example:
1321         dos filetimes = True
1323 .SS encrypt passwords (G)
1325 This boolean controls whether encrypted passwords will be negotiated
1326 with the client. Note that this option has no effect if you haven't
1327 compiled in the necessary des libraries and encryption code. It
1328 defaults to no.
1330 .SS exec (S)
1332 This is an alias for preexec
1334 .SS fake oplocks (S)
1336 Oplocks are the way that SMB clients get permission from a server to
1337 locally cache file operations. If a server grants an oplock
1338 (opportunistic lock) then the client is free to assume that it is the
1339 only one accessing the file and it will aggressively cache file
1340 data. With some oplock types the client may even cache file open/close
1341 operations. This can give enormous performance benefits.
1343 When you set "fake oplocks = yes" Samba will always grant oplock
1344 requests no matter how many clients are using the file. 
1346 By enabling this option on all read-only shares or shares that you know
1347 will only be accessed from one client at a time you will see a big
1348 performance improvement on many operations. If you enable this option
1349 on shares where multiple clients may be accessing the files read-write
1350 at the same time you can get data corruption. Use this option
1351 carefully! 
1353 It is generally much better to use the real oplock support except for
1354 physically read-only media such as CDROMs.
1356 This option is disabled by default.
1358 .SS follow symlinks (S)
1360 This parameter allows the Samba administrator to stop smbd from
1361 following symbolic links in a particular share. Setting this
1362 parameter to "No" prevents any file or directory that is a 
1363 symbolic link from being followed (the user will get an error).
1364 This option is very useful to stop users from adding a symbolic
1365 link to /etc/pasword in their home directory for instance.
1366 However it will slow filename lookups down slightly.
1368 This option is enabled (ie. smbd will follow symbolic links)
1369 by default.
1371 .SS force create mode (S)
1372 This parameter specifies a set of UNIX mode bit permissions that
1373 will *always* be set on a file created by Samba. This is done
1374 by bitwise 'OR'ing these bits onto the mode bits of a file that
1375 is being created. The default for this parameter is (in octel)
1376 000. The modes in this parameter are bitwise 'OR'ed onto the
1377 file mode after the mask set in the "create mask" parameter
1378 is applied.
1380 See also the parameter "create mask" for details on masking mode
1381 bits on created files.
1383 .B Default:
1384        force create mode = 000
1386 .B Example:
1387        force create mode = 0755
1389 would force all created files to have read and execute permissions
1390 set for 'group' and 'other' as well as the read/write/execute bits 
1391 set for the 'user'.
1393 .SS force directory mode (S)
1394 This parameter specifies a set of UNIX mode bit permissions that
1395 will *always* be set on a directory created by Samba. This is done
1396 by bitwise 'OR'ing these bits onto the mode bits of a directory that
1397 is being created. The default for this parameter is (in octel)
1398 0000 which will not add any extra permission bits to a created
1399 directory. This operation is done after the mode mask in the parameter 
1400 "directory mask" is applied.
1402 See also the parameter "directory mask" for details on masking mode
1403 bits on created directories.
1405 .B Default:
1406        force directory mode = 000
1408 .B Example:
1409        force directory mode = 0755
1411 would force all created directories to have read and execute permissions
1412 set for 'group' and 'other' as well as the read/write/execute bits 
1413 set for the 'user'.
1415 .SS force group (S)
1416 This specifies a group name that all connections to this service
1417 should be made as. This may be useful for sharing files.
1419 .B Default:
1420        no forced group
1422 .B Example:
1423        force group = agroup
1425 .SS force user (S)
1426 This specifies a user name that all connections to this service
1427 should be made as. This may be useful for sharing files. You should
1428 also use it carefully as using it incorrectly can cause security
1429 problems.
1431 This user name only gets used once a connection is established. Thus
1432 clients still need to connect as a valid user and supply a valid
1433 password. Once connected, all file operations will be performed as the
1434 "forced user", not matter what username the client connected as.
1436 .B Default:
1437        no forced user
1439 .B Example:
1440        force user = auser
1442 .SS getwd cache (G)
1443 This is a tuning option. When this is enabled a cacheing algorithm will
1444 be used to reduce the time taken for getwd() calls. This can have a
1445 significant impact on performance, especially when widelinks is False.
1447 .B Default:
1448         getwd cache = No
1450 .B Example:
1451         getwd cache = Yes
1453 .SS group (S)
1454 This is an alias for "force group" and is only kept for compatibility
1455 with old versions of Samba. It may be removed in future versions.
1457 .SS guest account (S)
1458 This is a username which will be used for access to services which are
1459 specified as 'guest ok' (see below). Whatever privileges this user has
1460 will be available to any client connecting to the guest
1461 service. Typically this user will exist in the password file, but will
1462 not have a valid login. If a username is specified in a given service,
1463 the specified username overrides this one.
1465 One some systems the account "nobody" may not be able to print. Use
1466 another account in this case. You should test this by trying to log in
1467 as your guest user (perhaps by using the "su \-" command) and trying to
1468 print using
1469 .BR lpr .
1471 Note that as of version 1.9 of Samba this option may be set
1472 differently for each service.
1474 .B Default:
1475         specified at compile time
1477 .B Example:
1478         guest account = nobody
1479 .SS guest ok (S)
1481 .B public.
1482 .SS guest only (S)
1483 If this parameter is 'yes' for a service, then only guest connections to the
1484 service are permitted. This parameter will have no affect if "guest ok" or
1485 "public" is not set for the service.
1487 See the section below on user/password validation for more information about
1488 this option.
1490 .B Default:
1491         guest only = no
1493 .B Example:
1494         guest only = yes
1495 .SS hide dot files (S)
1496 This is a boolean parameter that controls whether files starting with
1497 a dot appear as hidden files.
1499 .B Default:
1500         hide dot files = yes
1502 .B Example:
1503         hide dot files = no
1506 .SS hide files(S)
1507 This is a list of files or directories that are not visible but are
1508 accessible.  The DOS 'hidden' attribute is applied to any files or
1509 directories that match.
1511 Each entry in the list must be separated by a "/", which allows spaces
1512 to be included in the entry.  '*' and '?' can be used to specify multiple 
1513 files or directories as in DOS wildcards.
1515 Each entry must be a unix path, not a DOS path and must not include the 
1516 unix directory separator "/".
1518 Note that the case sensitivity option is applicable in hiding files.
1520 Setting this parameter will affect the performance of Samba, as
1521 it will be forced to check all files and directories for a match
1522 as they are scanned.
1524 See also "hide dot files", "veto files" and "case sensitive"
1526 .B Default
1527         No files or directories are hidden by this option (dot files are
1528     hidden by default because of the "hide dot files" option).
1530 .B Example
1531         hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
1533 The above example is based on files that the Macintosh client (DAVE)
1534 creates for internal use, and also still hides all files beginning with
1535 a dot.
1537 .SS homedir map (G)
1538 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
1539 from which the server for the user's home directory should be extracted.
1540 At present, only the Sun auto.home map format is understood. The form of
1541 the map is:
1543 username        server:/some/file/system
1545 and the program will extract the servername from before the first ':'.
1546 There should probably be a better parsing system that copes with different
1547 map formats and also Amd (another automounter) maps.
1549 NB: The -DNETGROUP option is required in the Makefile for option to work
1550 and on some architectures the line -lrpcsvc needs to be added to the
1551 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
1553 See also "nis homedir"
1555 .B Default:
1556         homedir map = auto.home
1558 .B Example:
1559         homedir map = amd.homedir
1560 .SS hosts allow (S)
1562 .B allow hosts.
1563 .SS hosts deny (S)
1565 .B deny hosts.
1567 .SS hosts equiv (G)
1568 If this global parameter is a non-null string, it specifies the name of
1569 a file to read for the names of hosts and users who will be allowed access
1570 without specifying a password.
1572 This is not be confused with 
1573 .B allow hosts
1574 which is about hosts access to services and is more useful for guest services.
1575 .B hosts equiv
1576 may be useful for NT clients which will not supply passwords to samba.
1578 NOTE: The use of hosts.equiv can be a major security hole. This is
1579 because you are trusting the PC to supply the correct username. It is
1580 very easy to get a PC to supply a false username. I recommend that the
1581 hosts.equiv option be only used if you really know what you are doing,
1582 or perhaps on a home network where you trust your wife and kids :-)
1584 .B Default
1585         No host equivalences
1587 .B Example
1588         hosts equiv = /etc/hosts.equiv
1590 .SS include (G)
1592 This allows you to include one config file inside another.  The file is
1593 included literally, as though typed in place.
1595 It takes the standard substitutions, except %u, %P and %S
1597 .SS interfaces (G)
1599 This option allows you to setup multiple network interfaces, so that
1600 Samba can properly handle browsing on all interfaces.
1602 The option takes a list of ip/netmask pairs. The netmask may either be
1603 a bitmask, or a bitlength. 
1605 For example, the following line:
1607 interfaces = 192.168.2.10/24 192.168.3.10/24
1609 would configure two network interfaces with IP addresses 192.168.2.10
1610 and 192.168.3.10. The netmasks of both interfaces would be set to
1611 255.255.255.0. 
1613 You could produce an equivalent result by using:
1615 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
1617 if you prefer that format.
1619 If this option is not set then Samba will attempt to find a primary
1620 interface, but won't attempt to configure more than one interface.
1622 .SS invalid users (S)
1623 This is a list of users that should not be allowed to login to this
1624 service. This is really a "paranoid" check to absolutely ensure an
1625 improper setting does not breach your security.
1627 A name starting with @ is interpreted as a UNIX group.
1629 The current servicename is substituted for %S. This is useful in the
1630 [homes] section.
1632 See also "valid users"
1634 .B Default
1635         No invalid users
1637 .B Example
1638         invalid users = root fred admin @wheel
1640 .SS keep alive (G)
1641 The value of the parameter (an integer) represents the number of seconds 
1642 between 'keepalive' packets. If this parameter is zero, no keepalive packets
1643 will be sent. Keepalive packets, if sent, allow the server to tell whether a
1644 client is still present and responding.
1646 Keepalives should, in general, not be needed if the socket being used
1647 has the SO_KEEPALIVE attribute set on it (see "socket
1648 options"). Basically you should only use this option if you strike
1649 difficulties.
1651 .B Default:
1652         keep alive = 0
1654 .B Example:
1655         keep alive = 60
1656 .SS load printers (G)
1657 A boolean variable that controls whether all printers in the printcap
1658 will be loaded for browsing by default. 
1660 .B Default:
1661         load printers = yes
1663 .B Example:
1664         load printers = no
1666 .SS local master (G)
1667 This option allows the nmbd to become a local master browser on a
1668 subnet. If set to False then nmbd will not attempt to become a local
1669 master browser on a subnet and will also lose in all browsing elections. 
1670 By default this value is set to true. Setting this value to true doesn't 
1671 mean that Samba will become the local master browser on a subnet, just 
1672 that the nmbd will participate in elections for local master browser.
1674 .B Default:
1675         local master = yes
1677 .SS lock directory (G)
1678 This option specifies the directory where lock files will be placed.
1679 The lock files are used to implement the "max connections" option.
1681 .B Default:
1682         lock directory = /tmp/samba
1684 .B Example: 
1685         lock directory = /usr/local/samba/var/locks
1687 .SS locking (S)
1688 This controls whether or not locking will be performed by the server in 
1689 response to lock requests from the client.
1691 If "locking = no", all lock and unlock requests will appear to succeed and 
1692 all lock queries will indicate that the queried lock is clear.
1694 If "locking = yes", real locking will be performed by the server.
1696 This option may be particularly useful for read-only filesystems which
1697 do not need locking (such as cdrom drives).
1699 Be careful about disabling locking either globally or in a specific
1700 service, as lack of locking may result in data corruption.
1702 .B Default:
1703         locking = yes
1705 .B Example:
1706         locking = no
1708 .SS log file (G)
1710 This options allows you to override the name of the Samba log file
1711 (also known as the debug file).
1713 This option takes the standard substitutions, allowing you to have
1714 separate log files for each user or machine.
1716 .B Example:
1717         log file = /usr/local/samba/var/log.%m
1719 .SS log level (G)
1720 see "debug level"
1722 .SS logon drive (G)
1724 This parameter specifies the local path to which the home directory
1725 will be connected (see "logon home") and is only used by NT Workstations.
1727 .B Example:
1728         logon drive = h:
1730 .SS logon home (G)
1732 This parameter specifies the home directory location when a Win95 or
1733 NT Workstation logs into a Samba PDC.  It allows you to do "NET USE
1734 H: /HOME" from a command prompt, for example.
1737 This option takes the standard substitutions, allowing you to have
1738 separate logon scripts for each user or machine.
1740 .B Example:
1741         logon home = "\\\\remote_smb_server\\%U"
1743 .B Default:
1744         logon home = "\\\\%N\\%U"
1746 .SS logon path (G)
1748 This parameter specifies the home directory where roaming profiles 
1749 (USER.DAT / USER.MAN files for Windows 95) are stored.
1751 This option takes the standard substitutions, allowing you to have
1752 separate logon scripts for each user or machine.  It also specifies
1753 the directory from which the "desktop", "start menu", "nethood" and
1754 "programs" folders, and their contents, are loaded and displayed
1755 on your Windows 95 client.
1757 The share and the path must be readable by the user for the preferences
1758 and directories to be loaded onto the Windows 95 client.  The share
1759 must be writeable when the logs in for the first time, in order that
1760 the Windows 95 client can create the user.dat and other directories.
1762 Thereafter, the directories and any of contents can, if required,
1763 be made read-only.  It is not adviseable that the USER.DAT file be made
1764 read-only - rename it to USER.MAN to achieve the desired effect
1765 (a MANdatory profile).
1767 Windows clients can sometimes maintain a connection to the [homes]
1768 share, even though there is no user logged in.  Therefore, it is
1769 vital that the logon path does not include a reference to the
1770 homes share (i.e \\\\%N\\HOMES\profile_path will cause problems).
1773 This option takes the standard substitutions, allowing you to have
1774 separate logon scripts for each user or machine.
1776 .B Default:
1777         logon path = \\\\%N\\%U\\profile
1779 .B Example:
1780         logon path = \\\\PROFILESERVER\\HOME_DIR\\%U\\PROFILE
1782 .SS logon script (G)
1784 This parameter specifies the batch file (.bat) or NT command file (.cmd)
1785 to be downloaded and run on a machine when a user successfully logs in.
1786 The file must contain the DOS style cr/lf line endings.  Using a DOS-style
1787 editor to create the file is recommended.
1789 The script must be a relative path to the [netlogon] service.  If the
1790 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
1791 logon script = STARTUP.BAT, then file that will be downloaded is:
1793 .B /usr/local/samba/netlogon/STARTUP.BAT
1795 The contents of the batch file is entirely your choice.  A suggested
1796 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
1797 machine to synchronise clocks with the same time server.  Another use
1798 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
1799 or NET USE Q: \\\\SERVER\\ISO9001_QA.
1801 Note that it is particularly important not to allow write access to
1802 the [netlogon] share, or to grant users write permission on the
1803 batch files in a secure environment, as this would allow the batch
1804 files to be arbitrarily modified.
1807 This option takes the standard substitutions, allowing you to have
1808 separate logon scripts for each user or machine.
1810 .B Example:
1811         logon script = scripts/%U.bat
1813 .SS lppause command (S)
1814 This parameter specifies the command to be executed on the server host in
1815 order to stop printing or spooling a specific print job.
1817 This command should be a program or script which takes a printer name and
1818 job number to pause the print job. Currently I don't know of any print
1819 spooler system that can do this with a simple option, except for the PPR
1820 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
1821 of implementing this is by using job priorities, where jobs having a too
1822 low priority won't be sent to the printer. See also the
1823 .B lppause
1824 command.
1826 If a %p is given then the printername is put in its place. A %j is
1827 replaced with the job number (an integer).
1828 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
1829 command, the job will show up with the correct status, i.e. if the job
1830 priority is lower than the set fence priority it will have the PAUSED
1831 status, whereas if the priority is equal or higher it will have the
1832 SPOOLED or PRINTING status.
1834 Note that it is good practice to include the absolute path in the lppause
1835 command as the PATH may not be available to the server.
1837 .B Default:
1838         Currently no default value is given to this string
1840 .B Example for HPUX:
1841         lppause command = /usr/bin/lpalt %p-%j -p0
1843 .SS lpq cache time (G)
1845 This controls how long lpq info will be cached for to prevent the lpq
1846 command being called too often. A separate cache is kept for each
1847 variation of the lpq command used by the system, so if you use
1848 different lpq commands for different users then they won't share cache
1849 information.
1851 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
1852 of the lpq command in use.
1854 The default is 10 seconds, meaning that the cached results of a
1855 previous identical lpq command will be used if the cached data is less
1856 than 10 seconds old. A large value may be advisable if your lpq
1857 command is very slow.
1859 A value of 0 will disable cacheing completely.
1861 .B Default:
1862         lpq cache time = 10
1864 .B Example:
1865         lpq cache time = 30
1867 .SS lpq command (S)
1868 This parameter specifies the command to be executed on the server host in
1869 order to obtain "lpq"-style printer status information. 
1871 This command should be a program or script which takes a printer name
1872 as its only parameter and outputs printer status information. 
1874 Currently six styles of printer status information are supported; BSD,
1875 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
1876 control which type is expected using the "printing =" option.
1878 Some clients (notably Windows for Workgroups) may not correctly send the
1879 connection number for the printer they are requesting status information
1880 about. To get around this, the server reports on the first printer service
1881 connected to by the client. This only happens if the connection number sent
1882 is invalid.
1884 If a %p is given then the printername is put in its place. Otherwise
1885 it is placed at the end of the command.
1887 Note that it is good practice to include the absolute path in the lpq
1888 command as the PATH may not be available to the server.
1890 .B Default:
1891         depends on the setting of "printing ="
1893 .B Example:
1894         lpq command = /usr/bin/lpq %p
1896 .SS lpresume command (S)
1897 This parameter specifies the command to be executed on the server host in
1898 order to restart or continue printing or spooling a specific print job.
1900 This command should be a program or script which takes a printer name and
1901 job number to resume the print job. See also the lppause command.
1903 If a %p is given then the printername is put in its place. A %j is
1904 replaced with the job number (an integer).
1906 Note that it is good practice to include the absolute path in the lpresume
1907 command as the PATH may not be available to the server.
1909 .B Default:
1910         Currently no default value is given to this string
1912 .B Example for HPUX:
1913         lpresume command = /usr/bin/lpalt %p-%j -p2
1915 .SS lprm command (S)
1916 This parameter specifies the command to be executed on the server host in
1917 order to delete a print job.
1919 This command should be a program or script which takes a printer name
1920 and job number, and deletes the print job.
1922 Currently seven styles of printer control are supported; BSD, SYSV, AIX
1923 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
1924 which type is expected using the "printing =" option.
1926 If a %p is given then the printername is put in its place. A %j is
1927 replaced with the job number (an integer).
1929 Note that it is good practice to include the absolute path in the lprm
1930 command as the PATH may not be available to the server.
1932 .B Default:
1933         depends on the setting of "printing ="
1935 .B Example 1:
1936         lprm command = /usr/bin/lprm -P%p %j
1938 .B Example 2:
1939         lprm command = /usr/bin/cancel %p-%j
1941 .SS magic output (S)
1942 This parameter specifies the name of a file which will contain output
1943 created by a magic script (see
1944 .I magic script
1945 below).
1947 Warning: If two clients use the same magic script in the same directory the
1948 output file content is undefined.
1949 .B Default:
1950         magic output = <magic script name>.out
1952 .B Example:
1953         magic output = myfile.txt
1954 .SS magic script (S)
1955 This parameter specifies the name of a file which, if opened, will be
1956 executed by the server when the file is closed. This allows a UNIX script
1957 to be sent to the Samba host and executed on behalf of the connected user.
1959 Scripts executed in this way will be deleted upon completion, permissions
1960 permitting.
1962 If the script generates output, output will be sent to the file specified by
1964 .I magic output
1965 parameter (see above).
1967 Note that some shells are unable to interpret scripts containing
1968 carriage-return-linefeed instead of linefeed as the end-of-line
1969 marker. Magic scripts must be executable "as is" on the host, which
1970 for some hosts and some shells will require filtering at the DOS end.
1972 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
1974 .B Default:
1975         None. Magic scripts disabled.
1977 .B Example:
1978         magic script = user.csh
1980 .SS mangle case (S)
1982 See the section on "NAME MANGLING"
1984 .SS mangled map (S)
1985 This is for those who want to directly map UNIX file names which are
1986 not representable on DOS.  The mangling of names is not always what is
1987 needed.  In particular you may have documents with file extensions
1988 that differ between DOS and UNIX. For example, under UNIX it is common
1989 to use .html for HTML files, whereas under DOS .htm is more commonly
1990 used.
1992 So to map 'html' to 'htm' you put:
1994   mangled map = (*.html *.htm)
1996 One very useful case is to remove the annoying ;1 off the ends of
1997 filenames on some CDROMS (only visible under some UNIXes). To do this
1998 use a map of (*;1 *)
2000 .B default:
2001         no mangled map
2003 .B Example:
2004         mangled map = (*;1 *)
2006 .SS mangled names (S)
2007 This controls whether non-DOS names under UNIX should be mapped to
2008 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2009 should simply be ignored.
2011 See the section on "NAME MANGLING" for details on how to control the
2012 mangling process.
2014 If mangling is used then the mangling algorithm is as follows:
2016 - the first (up to) five alphanumeric characters before the rightmost dot of
2017 the filename are preserved, forced to upper case, and appear as the first (up
2018 to) five characters of the mangled name.
2020 - a tilde ("~") is appended to the first part of the mangled name, followed
2021 by a two-character unique sequence, based on the original root name 
2022 (i.e., the original filename minus its final extension). The final
2023 extension is included in the hash calculation only if it contains any upper
2024 case characters or is longer than three characters.
2026 Note that the character to use may be specified using the "mangling
2027 char" option, if you don't like ~.
2029 - the first three alphanumeric characters of the final extension are preserved,
2030 forced to upper case and appear as the extension of the mangled name. The 
2031 final extension is defined as that part of the original filename after the
2032 rightmost dot. If there are no dots in the filename, the mangled name will
2033 have no extension (except in the case of hidden files - see below).
2035 - files whose UNIX name begins with a dot will be presented as DOS hidden
2036 files. The mangled name will be created as for other filenames, but with the
2037 leading dot removed and "___" as its extension regardless of actual original
2038 extension (that's three underscores).
2041 The two-digit hash value consists of upper case alphanumeric characters.
2043 This algorithm can cause name collisions only if files in a directory share
2044 the same first five alphanumeric characters. The probability of such a clash 
2045 is 1/1300.
2047 The name mangling (if enabled) allows a file to be copied between UNIX
2048 directories from DOS while retaining the long UNIX filename. UNIX files can
2049 be renamed to a new extension from DOS and will retain the same basename. 
2050 Mangled names do not change between sessions.
2052 .B Default:
2053         mangled names = yes
2055 .B Example:
2056         mangled names = no
2057 .SS mangling char (S)
2058 This controls what character is used as the "magic" character in name
2059 mangling. The default is a ~ but this may interfere with some
2060 software. Use this option to set it to whatever you prefer.
2062 .B Default:
2063         mangling char = ~
2065 .B Example:
2066         mangling char = ^
2068 .SS mangled stack (G)
2069 This parameter controls the number of mangled names that should be cached in
2070 the Samba server.
2072 This stack is a list of recently mangled base names (extensions are only
2073 maintained if they are longer than 3 characters or contains upper case
2074 characters).
2076 The larger this value, the more likely it is that mangled names can be
2077 successfully converted to correct long UNIX names. However, large stack
2078 sizes will slow most directory access. Smaller stacks save memory in the
2079 server (each stack element costs 256 bytes).
2081 It is not possible to absolutely guarantee correct long file names, so
2082 be prepared for some surprises!
2084 .B Default:
2085         mangled stack = 50
2087 .B Example:
2088         mangled stack = 100
2090 .SS map archive (S)
2091 This controls whether the DOS archive attribute should be mapped to the
2092 UNIX owner execute bit.  The DOS archive bit is set when a file has been modified
2093 since its last backup.  One motivation for this option it to keep Samba/your
2094 PC from making any file it touches from becoming executable under UNIX.
2095 This can be quite annoying for shared source code, documents,  etc...
2097 Note that this requires the 'create mask' to be set such that owner
2098 execute bit is not masked out (ie. it must include 100). See the 
2099 parameter "create mask" for details.
2101 .B Default:
2102       map archive = yes
2104 .B Example:
2105       map archive = no
2107 .SS map hidden (S)
2108 This controls whether DOS style hidden files should be mapped to the
2109 UNIX world execute bit.
2111 Note that this requires the 'create mask' to be set such that the world
2112 execute bit is not masked out (ie. it must include 001). 
2113 See the parameter "create mask" for details.
2115 .B Default:
2116         map hidden = no
2118 .B Example:
2119         map hidden = yes
2120 .SS map system (S)
2121 This controls whether DOS style system files should be mapped to the
2122 UNIX group execute bit.
2124 Note that this requires the 'create mask' to be set such that the group
2125 execute bit is not masked out (ie. it must include 010). See the parameter 
2126 "create mask" for details.
2128 .B Default:
2129         map system = no
2131 .B Example:
2132         map system = yes
2133 .SS max connections (S)
2134 This option allows the number of simultaneous connections to a
2135 service to be limited. If "max connections" is greater than 0 then
2136 connections will be refused if this number of connections to the
2137 service are already open. A value of zero mean an unlimited number of
2138 connections may be made.
2140 Record lock files are used to implement this feature. The lock files
2141 will be stored in the directory specified by the "lock directory" option.
2143 .B Default:
2144         max connections = 0
2146 .B Example:
2147         max connections = 10
2149 .SS max disk size (G)
2150 This option allows you to put an upper limit on the apparent size of
2151 disks. If you set this option to 100 then all shares will appear to be
2152 not larger than 100 MB in size.
2154 Note that this option does not limit the amount of data you can put on
2155 the disk. In the above case you could still store much more than 100
2156 MB on the disk, but if a client ever asks for the amount of free disk
2157 space or the total disk size then the result will be bounded by the
2158 amount specified in "max disk size".
2160 This option is primarily useful to work around bugs in some pieces of
2161 software that can't handle very large disks, particularly disks over
2162 1GB in size.
2164 A "max disk size" of 0 means no limit.
2166 .B Default:
2167         max disk size = 0
2169 .B Example:
2170         max disk size = 1000
2172 .SS max log size (G)
2174 This option (an integer in kilobytes) specifies the max size the log
2175 file should grow to. Samba periodically checks the size and if it is
2176 exceeded it will rename the file, adding a .old extension.
2178 A size of 0 means no limit.
2180 .B Default:
2181         max log size = 5000
2183 .B Example:
2184         max log size = 1000
2186 .SS max mux (G)
2188 This option controls the maximum number of outstanding simultaneous SMB 
2189 operations that samba tells the client it will allow. You should never need 
2190 to set this parameter.
2192 .B Default:
2193         max mux = 50
2195 .SS max packet (G)
2197 A synonym for this parameter is 'packet size'.
2199 .SS max ttl (G)
2201 This option tells nmbd what the default 'time to live' of NetBIOS
2202 names should be (in seconds). You should never need to change this parameter.
2204 .B Default:
2205         max ttl = 14400
2206 .SS max xmit (G)
2208 This option controls the maximum packet size that will be negotiated
2209 by Samba. The default is 65535, which is the maximum. In some cases
2210 you may find you get better performance with a smaller value. A value
2211 below 2048 is likely to cause problems.
2213 .B Default:
2214         max xmit = 65535
2216 .B Example:
2217         max xmit = 8192
2219 .SS message command (G)
2221 This specifies what command to run when the server receives a WinPopup
2222 style message.
2224 This would normally be a command that would deliver the message
2225 somehow. How this is to be done is up to your imagination.
2227 What I use is:
2229    message command = csh -c 'xedit %s;rm %s' &
2231 This delivers the message using xedit, then removes it
2232 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2233 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
2234 immediately then your PCs may freeze when sending messages (they
2235 should recover after 30secs, hopefully).
2237 All messages are delivered as the global guest user. The command takes
2238 the standard substitutions, although %u won't work (%U may be better
2239 in this case).
2241 Apart from the standard substitutions, some additional ones apply. In
2242 particular:
2244 %s = the filename containing the message
2246 %t = the destination that the message was sent to (probably the server
2247 name)
2249 %f = who the message is from
2251 You could make this command send mail, or whatever else takes your
2252 fancy. Please let me know of any really interesting ideas you have.
2254 Here's a way of sending the messages as mail to root:
2256 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
2258 If you don't have a message command then the message won't be
2259 delivered and Samba will tell the sender there was an
2260 error. Unfortunately WfWg totally ignores the error code and carries
2261 on regardless, saying that the message was delivered.
2263 If you want to silently delete it then try "message command = rm %s".
2265 For the really adventurous, try something like this:
2267 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
2268                   -M %m; rm %s' &
2270 this would execute the command as a script on the server, then give
2271 them the result in a WinPopup message. Note that this could cause a
2272 loop if you send a message from the server using smbclient! You better
2273 wrap the above in a script that checks for this :-)
2275 .B Default:
2276         no message command
2278 .B Example:
2279         message command = csh -c 'xedit %s;rm %s' &
2281 .SS min print space (S)
2283 This sets the minimum amount of free disk space that must be available
2284 before a user will be able to spool a print job. It is specified in
2285 kilobytes. The default is 0, which means no limit.
2287 .B Default:
2288         min print space = 0
2290 .B Example:
2291         min print space = 2000
2293 .SS netbios aliases (G)
2295 This is a list of names that nmbd will advertise as additional
2296 names by which the Samba server is known. This allows one machine
2297 to appear in browse lists under multiple names. If a machine is
2298 acting as a browse server or logon server none of these names
2299 will be advertised as either browse server or logon servers, only
2300 the primary name of the machine will be advertised with these
2301 capabilities.
2303 See also 'netbios name'.
2305 .B Example:
2306    netbios aliases = TEST TEST1 TEST2
2308 .SS netbios name (G)
2310 This sets the NetBIOS name by which a Samba server is known. By
2311 default it is the same as the first component of the host's DNS name.
2312 If a machine is a browse server or logon server this name (or the
2313 first component of the hosts DNS name) will be the name that these
2314 services are advertised under.
2316 See also 'netbios aliases'.
2318 .B Example:
2319    netbios name = MYNAME
2321 .SS nis homedir (G)
2322 Get the home share server from a NIS (or YP) map. For unix systems that
2323 use an automounter, the user's home directory will often be mounted on
2324 a workstation on demand from a remote server. When the Samba logon server
2325 is not the actual home directory server, two network hops are required
2326 to access the home directory and this can be very slow especially with 
2327 writing via Samba to an NFS mounted directory. This option allows samba
2328 to return the home share as being on a different server to the logon
2329 server and as long as a samba daemon is running on the home directory 
2330 server, it will be mounted on the Samba client directly from the directory
2331 server. When Samba is returning the home share to the client, it will
2332 consult the NIS (or YP) map specified in "homedir map" and return the
2333 server listed there.
2335 .B Default:
2336         nis homedir = false
2338 .B Example:
2339         nis homedir = true
2341 .SS null passwords (G)
2342 Allow or disallow access to accounts that have null passwords. 
2344 .B Default:
2345         null passwords = no
2347 .B Example:
2348         null passwords = yes
2350 .SS only guest (S)
2351 A synonym for this command is 'guest only'.
2353 .SS only user (S)
2354 This is a boolean option that controls whether connections with
2355 usernames not in the user= list will be allowed. By default this
2356 option is disabled so a client can supply a username to be used by
2357 the server.
2359 Note that this also means Samba won't try to deduce usernames from the
2360 service name. This can be annoying for the [homes] section. To get
2361 around this you could use "user = %S" which means your "user" list
2362 will be just the service name, which for home directories is the name
2363 of the user.
2365 .B Default: 
2366         only user = False
2368 .B Example: 
2369         only user = True
2371 .SS oplocks (S)
2372 This boolean option tells smbd whether to issue oplocks (opportunistic
2373 locks) to file open requests on this share. The oplock code was introduced in
2374 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
2375 of access to files on Samba servers. It allows the clients to agressively
2376 cache files locally and you may want to disable this option for unreliable
2377 network environments (it is turned on by default in Windows NT Servers).
2378 For more information see the file Speed.txt in the Samba docs/ directory.
2380 .B Default:
2381     oplocks = True
2383 .B Example:
2384     oplocks = False
2387 .SS os level (G)
2388 This integer value controls what level Samba advertises itself as for
2389 browse elections. See BROWSING.txt for details.
2391 .SS packet size (G)
2392 The maximum transmit packet size during a raw read. This option is no
2393 longer implemented as of version 1.7.00, and is kept only so old
2394 configuration files do not become invalid.
2396 .SS passwd chat (G)
2397 This string controls the "chat" conversation that takes places
2398 between smbd and the local password changing program to change the
2399 users password. The string describes a sequence of response-receive
2400 pairs that smbd uses to determine what to send to the passwd program
2401 and what to expect back. If the expected output is not received then
2402 the password is not changed.
2404 This chat sequence is often quite site specific, depending on what
2405 local methods are used for password control (such as NIS+ etc).
2407 The string can contain the macros %o and %n which are substituted for
2408 the old and new passwords respectively. It can also contain the
2409 standard macros \en \er \et and \es to give line-feed, carriage-return,
2410 tab and space.
2412 The string can also contain a * which matches any sequence of
2413 characters.
2415 Double quotes can be used to collect strings with spaces in them into
2416 a single string.
2418 If the send string in any part of the chat sequence is a fullstop "."
2419 then no string is sent. Similarly, is the expect string is a fullstop
2420 then no string is expected.
2422 .B Example:
2423         passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
2424                        "*Reenter NEW password*" %n\en "*Password changed*"
2427 .B Default:
2428        passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
2430 .SS passwd program (G)
2431 The name of a program that can be used to set user passwords.
2433 This is only necessary if you have enabled remote password changing at
2434 compile time. Any occurrences of %u will be replaced with the user
2435 name.
2437 Also note that many passwd programs insist in "reasonable" passwords,
2438 such as a minimum length, or the inclusion of mixed case chars and
2439 digits. This can pose a problem as some clients (such as Windows for
2440 Workgroups) uppercase the password before sending it. 
2442 .B Default:
2443         passwd program = /bin/passwd
2445 .B Example:
2446         passwd program = /sbin/passwd %u
2448 .SS password level (G)
2449 Some client/server combinations have difficulty with mixed-case passwords.
2450 One offending client is Windows for Workgroups, which for some reason forces
2451 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
2452 when using COREPLUS!
2454 This parameter defines the maximum number of characters that may be upper case
2455 in passwords.
2457 For example, say the password given was "FRED". If
2458 .B password level
2459 is set to 1 (one), the following combinations would be tried if "FRED" failed:
2460 "Fred", "fred", "fRed", "frEd", "freD". If
2461 .B password level was set to 2 (two), the following combinations would also be
2462 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
2464 The higher value this parameter is set to the more likely it is that a mixed
2465 case password will be matched against a single case password. However, you
2466 should be aware that use of this parameter reduces security and increases the
2467 time taken to process a new connection.
2469 A value of zero will cause only two attempts to be made - the password as is
2470 and the password in all-lower case.
2472 If you find the connections are taking too long with this option then
2473 you probably have a slow crypt() routine. Samba now comes with a fast
2474 "ufc crypt" that you can select in the Makefile. You should also make
2475 sure the PASSWORD_LENGTH option is correct for your system in local.h
2476 and includes.h. On most systems only the first 8 chars of a password
2477 are significant so PASSWORD_LENGTH should be 8, but on some longer
2478 passwords are significant. The includes.h file tries to select the
2479 right length for your system.
2481 .B Default:
2482         password level = 0
2484 .B Example:
2485         password level = 4
2487 .SS password server (G)
2489 By specifying the name of another SMB server (such as a WinNT box)
2490 with this option, and using "security = server" you can get Samba to
2491 do all its username/password validation via a remote server.
2493 This options sets the name of the password server to use. It must be a
2494 netbios name, so if the machine's netbios name is different from its
2495 internet name then you may have to add its netbios name to
2496 /etc/hosts.
2498 The password server much be a machine capable of using the "LM1.2X002"
2499 or the "LM NT 0.12" protocol, and it must be in user level security
2500 mode. 
2502 NOTE: Using a password server means your UNIX box (running Samba) is
2503 only as secure as your password server. DO NOT CHOOSE A PASSWORD
2504 SERVER THAT YOU DON'T COMPLETELY TRUST.
2506 Never point a Samba server at itself for password serving. This will
2507 cause a loop and could lock up your Samba server!
2509 The name of the password server takes the standard substitutions, but
2510 probably the only useful one is %m, which means the Samba server will
2511 use the incoming client as the password server. If you use this then
2512 you better trust your clients, and you better restrict them with hosts
2513 allow!
2515 If you list several hosts in the "password server" option then smbd
2516 will try each in turn till it finds one that responds. This is useful
2517 in case your primary server goes down.
2519 If you are using a WindowsNT server as your password server then you
2520 will have to ensure that your users are able to login from the Samba 
2521 server, as the network logon will appear to come from there rather
2522 than from the users workstation.
2524 .SS path (S)
2525 A synonym for this parameter is 'directory'.
2527 This parameter specifies a directory to which the user of the service is to
2528 be given access. In the case of printable services, this is where print data 
2529 will spool prior to being submitted to the host for printing.
2531 For a printable service offering guest access, the service should be readonly
2532 and the path should be world-writable and have the sticky bit set. This is not
2533 mandatory of course, but you probably won't get the results you expect if you
2534 do otherwise.
2536 Any occurrences of %u in the path will be replaced with the username
2537 that the client is connecting as. Any occurrences of %m will be
2538 replaced by the name of the machine they are connecting from. These
2539 replacements are very useful for setting up pseudo home directories
2540 for users.
2542 Note that this path will be based on 'root dir' if one was specified.
2543 .B Default:
2544         none
2546 .B Example:
2547         path = /home/fred+ 
2549 .SS postexec (S)
2551 This option specifies a command to be run whenever the service is
2552 disconnected. It takes the usual substitutions. The command may be run
2553 as the root on some systems.
2555 An interesting example may be do unmount server resources:
2557 postexec = /etc/umount /cdrom
2559 See also preexec
2561 .B Default:
2562       none (no command executed)
2564 .B Example:
2565       postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
2567 .SS postscript (S)
2568 This parameter forces a printer to interpret the print files as
2569 postscript. This is done by adding a %! to the start of print output. 
2571 This is most useful when you have lots of PCs that persist in putting
2572 a control-D at the start of print jobs, which then confuses your
2573 printer.
2575 .B Default: 
2576         postscript = False
2578 .B Example: 
2579         postscript = True
2581 .SS preexec (S)
2583 This option specifies a command to be run whenever the service is
2584 connected to. It takes the usual substitutions.
2586 An interesting example is to send the users a welcome message every
2587 time they log in. Maybe a message of the day? Here is an example:
2589 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
2590        /usr/local/samba/bin/smbclient -M %m -I %I' &
2592 Of course, this could get annoying after a while :-)
2594 See also postexec
2596 .B Default:
2597         none (no command executed)
2599 .B Example:
2600         preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
2602 .SS preferred master (G)
2603 This boolean parameter controls if Samba is a preferred master browser
2604 for its workgroup.
2605 If this is set to true, on startup, samba will force an election, 
2606 and it will have a slight advantage in winning the election.  
2607 It is recommended that this parameter is used in conjunction 
2608 with domain master = yes, so that samba can guarantee becoming 
2609 a domain master.  
2611 Use this option with caution, because if there are several hosts
2612 (whether samba servers, Windows 95 or NT) that are preferred master
2613 browsers on the same subnet, they will each periodically and continuously
2614 attempt to become the local master browser.  This will result in
2615 unnecessary broadcast traffic and reduced browsing capabilities.
2618 .B os level = nn
2620 .B Default:
2621         preferred master = no
2623 .SS preload
2624 This is an alias for "auto services"
2626 .SS preserve case (S)
2628 This controls if new filenames are created with the case that the
2629 client passes, or if they are forced to be the "default" case.
2631 .B Default:
2632        preserve case = no
2634 See the section on "NAME MANGLING" for a fuller discussion.
2636 .SS print command (S)
2637 After a print job has finished spooling to a service, this command will be
2638 used via a system() call to process the spool file. Typically the command 
2639 specified will submit the spool file to the host's printing subsystem, but
2640 there is no requirement that this be the case. The server will not remove the
2641 spool file, so whatever command you specify should remove the spool file when
2642 it has been processed, otherwise you will need to manually remove old spool
2643 files.
2645 The print command is simply a text string. It will be used verbatim,
2646 with two exceptions: All occurrences of "%s" will be replaced by the
2647 appropriate spool file name, and all occurrences of "%p" will be
2648 replaced by the appropriate printer name. The spool file name is
2649 generated automatically by the server, the printer name is discussed
2650 below.
2652 The full path name will be used for the filename if %s is not preceded
2653 by a /. If you don't like this (it can stuff up some lpq output) then
2654 use %f instead. Any occurrences of %f get replaced by the spool
2655 filename without the full path at the front.
2657 The print command MUST contain at least one occurrence of "%s" or %f -
2658 the "%p" is optional. At the time a job is submitted, if no printer
2659 name is supplied the "%p" will be silently removed from the printer
2660 command.
2662 If specified in the [global] section, the print command given will be used
2663 for any printable service that does not have its own print command specified.
2665 If there is neither a specified print command for a printable service nor a 
2666 global print command, spool files will be created but not processed and (most
2667 importantly) not removed.
2669 Note that printing may fail on some UNIXes from the "nobody"
2670 account. If this happens then create an alternative guest account that
2671 can print and set the "guest account" in the [global] section.
2673 You can form quite complex print commands by realising that they are
2674 just passed to a shell. For example the following will log a print
2675 job, print the file, then remove it. Note that ; is the usual
2676 separator for command in shell scripts.
2678 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
2680 You may have to vary this command considerably depending on how you
2681 normally print files on your system.
2683 .B Default:
2684         print command = lpr -r -P %p %s
2686 .B Example:
2687         print command = /usr/local/samba/bin/myprintscript %p %s
2688 .SS print ok (S)
2690 .B printable.
2691 .SS printable (S)
2692 A synonym for this parameter is 'print ok'.
2694 If this parameter is 'yes', then clients may open, write to and submit spool 
2695 files on the directory specified for the service.
2697 Note that a printable service will ALWAYS allow writing to the service path
2698 (user privileges permitting) via the spooling of print data. The 'read only'
2699 parameter controls only non-printing access to the resource.
2701 .B Default:
2702         printable = no
2704 .B Example:
2705         printable = yes
2707 .SS printcap name (G)
2708 This parameter may be used to override the compiled-in default printcap
2709 name used by the server (usually /etc/printcap). See the discussion of the
2710 [printers] section above for reasons why you might want to do this.
2712 For those of you without a printcap (say on SysV) you can just create a
2713 minimal file that looks like a printcap and set "printcap name =" in
2714 [global] to point at it.
2716 A minimal printcap file would look something like this:
2718 print1|My Printer 1
2720 print2|My Printer 2
2722 print3|My Printer 3
2724 print4|My Printer 4
2726 print5|My Printer 5
2728 where the | separates aliases of a printer. The fact that the second
2729 alias has a space in it gives a hint to Samba that it's a comment.
2731 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
2732 will assume the file is in AIX "qconfig" format if the string
2733 "/qconfig" appears in the printcap filename.
2735 .B Default:
2736         printcap name = /etc/printcap
2738 .B Example:
2739         printcap name = /etc/myprintcap
2740 .SS printer (S)
2741 A synonym for this parameter is 'printer name'.
2743 This parameter specifies the name of the printer to which print jobs spooled
2744 through a printable service will be sent.
2746 If specified in the [global] section, the printer name given will be used
2747 for any printable service that does not have its own printer name specified.
2749 .B Default:
2750         none (but may be 'lp' on many systems)
2752 .B Example:
2753         printer name = laserwriter
2755 .SS printer driver (S)
2756 This option allows you to control the string that clients receive when
2757 they ask the server for the printer driver associated with a
2758 printer. If you are using Windows95 or WindowsNT then you can use this
2759 to automate the setup of printers on your system.
2761 You need to set this parameter to the exact string (case sensitive)
2762 that describes the appropriate printer driver for your system. 
2763 If you don't know the exact string to use then you should first try
2764 with no "printer driver" option set and the client will give you a
2765 list of printer drivers. The appropriate strings are shown in a
2766 scrollbox after you have chosen the printer manufacturer.
2768 .B Example:
2769         printer driver = HP LaserJet 4L
2771 .SS printer name (S)
2773 .B printer.
2775 .SS printing (G)
2776 This parameters controls how printer status information is interpreted
2777 on your system, and also affects the default values for the "print
2778 command", "lpq command" and "lprm command".
2780 Currently six printing styles are supported. They are "printing =
2781 bsd", "printing = sysv", "printing = hpux", "printing = aix",
2782 "printing = qnx" and "printing = plp".
2784 To see what the defaults are for the other print commands when using
2785 these three options use the "testparm" program.
2788 .SS protocol (G)
2789 The value of the parameter (a string) is the highest protocol level that will
2790 be supported by the server. 
2792 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
2793 merits of each are discussed in the README file.
2795 Normally this option should not be set as the automatic negotiation
2796 phase in the SMB protocol takes care of choosing the appropriate protocol.
2798 .B Default:
2799         protocol = NT1
2801 .B Example:
2802         protocol = LANMAN1
2803 .SS public (S)
2804 A synonym for this parameter is 'guest ok'.
2806 If this parameter is 'yes' for a service, then no password is required
2807 to connect to the service. Privileges will be those of the guest
2808 account.
2810 See the section below on user/password validation for more information about
2811 this option.
2813 .B Default:
2814         public = no
2816 .B Example:
2817         public = yes
2818 .SS read list (S)
2819 This is a list of users that are given read-only access to a
2820 service. If the connecting user is in this list then they will
2821 not be given write access, no matter what the "read only" option
2822 is set to. The list can include group names using the @group syntax.
2824 See also the "write list" option
2826 .B Default:
2827      read list =
2829 .B Example:
2830      read list = mary, @students
2832 .SS read only (S)
2834 .B writable
2836 .B write ok.
2837 Note that this is an inverted synonym for writable and write ok.
2838 .SS read prediction (G)
2839 This options enables or disables the read prediction code used to
2840 speed up reads from the server. When enabled the server will try to
2841 pre-read data from the last accessed file that was opened read-only
2842 while waiting for packets.
2844 .SS Default:
2845         read prediction = False
2847 .SS Example:
2848         read prediction = True
2849 .SS read raw (G)
2850 This parameter controls whether or not the server will support raw reads when
2851 transferring data to clients.
2853 If enabled, raw reads allow reads of 65535 bytes in one packet. This
2854 typically provides a major performance benefit.
2856 However, some clients either negotiate the allowable block size incorrectly
2857 or are incapable of supporting larger block sizes, and for these clients you
2858 may need to disable raw reads.
2860 In general this parameter should be viewed as a system tuning tool and left
2861 severely alone. See also
2862 .B write raw.
2864 .B Default:
2865         read raw = yes
2867 .B Example:
2868         read raw = no
2869 .SS read size (G)
2871 The option "read size" affects the overlap of disk reads/writes with
2872 network reads/writes. If the amount of data being transferred in
2873 several of the SMB commands (currently SMBwrite, SMBwriteX and
2874 SMBreadbraw) is larger than this value then the server begins writing
2875 the data before it has received the whole packet from the network, or
2876 in the case of SMBreadbraw, it begins writing to the network before
2877 all the data has been read from disk.
2879 This overlapping works best when the speeds of disk and network access
2880 are similar, having very little effect when the speed of one is much
2881 greater than the other.
2883 The default value is 2048, but very little experimentation has been
2884 done yet to determine the optimal value, and it is likely that the best
2885 value will vary greatly between systems anyway. A value over 65536 is
2886 pointless and will cause you to allocate memory unnecessarily.
2888 .B Default:
2889         read size = 2048
2891 .B Example:
2892         read size = 8192
2894 .SS remote announce (G)
2896 This option allows you to setup nmbd to periodically announce itself
2897 to arbitrary IP addresses with an arbitrary workgroup name. 
2899 This is useful if you want your Samba server to appear in a remote
2900 workgroup for which the normal browse propagation rules don't
2901 work. The remote workgroup can be anywhere that you can send IP
2902 packets to.
2904 For example:
2906        remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
2908 the above line would cause nmbd to announce itself to the two given IP
2909 addresses using the given workgroup names. If you leave out the
2910 workgroup name then the one given in the "workgroup" option is used
2911 instead. 
2913 The IP addresses you choose would normally be the broadcast addresses
2914 of the remote networks, but can also be the IP addresses of known
2915 browse masters if your network config is that stable.
2917 This option replaces similar functionality from the nmbd lmhosts file.
2919 .SS revalidate (S)
2921 This options controls whether Samba will allow a previously validated
2922 username/password pair to be used to attach to a share. Thus if you
2923 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
2924 automatically allow the client to request connection to the second
2925 share as the same username as the first without a password.
2927 If "revalidate" is True then the client will be denied automatic
2928 access as the same username.
2930 .B Default:
2931         revalidate = False
2933 .B Example:
2934         revalidate = True
2936 .SS root (G)
2938 .B root directory.
2939 .SS root dir (G)
2941 .B root directory.
2942 .SS root directory (G)
2943 Synonyms for this parameter are 'root dir' and 'root'.
2945 The server will chroot() to this directory on startup. This is not 
2946 strictly necessary for secure operation. Even without it the server
2947 will deny access to files not in one of the service entries. It may 
2948 also check for, and deny access to, soft links to other parts of the 
2949 filesystem, or attempts to use .. in file names to access other 
2950 directories (depending on the setting of the "wide links" parameter).
2952 Adding a "root dir" entry other than "/" adds an extra level of security, 
2953 but at a price. It absolutely ensures that no access is given to files not
2954 in the sub-tree specified in the "root dir" option, *including* some files 
2955 needed for complete operation of the server. To maintain full operability
2956 of the server you will need to mirror some system files into the "root dir"
2957 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
2958 and any binaries or configuration files needed for printing (if required). 
2959 The set of files that must be mirrored is operating system dependent.
2961 .B Default:
2962         root directory = /
2964 .B Example:
2965         root directory = /homes/smb
2966 .SS root postexec (S)
2968 This is the same as postexec except that the command is run as
2969 root. This is useful for unmounting filesystems (such as cdroms) after
2970 a connection is closed.
2972 .SS root preexec (S)
2974 This is the same as preexec except that the command is run as
2975 root. This is useful for mounting filesystems (such as cdroms) before
2976 a connection is finalised.
2978 .SS security (G)
2979 This option affects how clients respond to Samba.
2981 The option sets the "security mode bit" in replies to protocol negotiations
2982 to turn share level security on or off. Clients decide based on this bit 
2983 whether (and how) to transfer user and password information to the server.
2985 The default is "security=SHARE", mainly because that was the only
2986 option at one stage.
2988 The alternatives are "security = user" or "security = server". 
2990 If your PCs use usernames that are the same as their usernames on the
2991 UNIX machine then you will want to use "security = user". If you
2992 mostly use usernames that don't exist on the UNIX box then use
2993 "security = share".
2995 There is a bug in WfWg that may affect your decision. When in user
2996 level security a WfWg client will totally ignore the password you type
2997 in the "connect drive" dialog box. This makes it very difficult (if
2998 not impossible) to connect to a Samba service as anyone except the
2999 user that you are logged into WfWg as.
3001 If you use "security = server" then Samba will try to validate the
3002 username/password by passing it to another SMB server, such as an NT
3003 box. If this fails it will revert to "security = USER".
3005 See the "password server" option for more details.
3007 .B Default:
3008         security = SHARE
3010 .B Example:
3011         security = USER
3012 .SS server string (G)
3013 This controls what string will show up in the printer comment box in
3014 print manager and next to the IPC connection in "net view". It can be
3015 any string that you wish to show to your users.
3017 It also sets what will appear in browse lists next to the machine name.
3019 A %v will be replaced with the Samba version number.
3021 A %h will be replaced with the hostname.
3023 .B Default:
3024         server string = Samba %v
3026 .B Example:
3027         server string = University of GNUs Samba Server
3029 .SS set directory (S)
3030 If 'set directory = no', then users of the service may not use the setdir
3031 command to change directory.
3033 The setdir command is only implemented in the Digital Pathworks client. See the
3034 Pathworks documentation for details.
3036 .B Default:
3037         set directory = no
3039 .B Example:
3040         set directory = yes
3042 .SS shared file entries (G)
3043 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3044 It specifies the number of hash bucket entries used for share file locking.
3045 You should never change this parameter unless you have studied the source 
3046 and know what you are doing.
3048 .B Default
3049         shared file entries = 113
3051 .SS shared mem size (G)
3052 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
3053 It specifies the size of the shared memory (in bytes) to use between smbd 
3054 processes. You should never change this parameter unless you have studied 
3055 the source and know what you are doing.
3057 .B Default
3058         shared mem size = 102400
3060 .SS smb passwd file (G)
3061 This option sets the path to the encrypted smbpasswd file. This is a *VERY
3062 DANGEROUS OPTION* if the smb.conf is user writable. By default the path
3063 to the smbpasswd file is compiled into Samba.
3065 .SS smbrun (G)
3066 This sets the full path to the smbrun binary. This defaults to the
3067 value in the Makefile.
3069 You must get this path right for many services to work correctly.
3071 .B Default:
3072 taken from Makefile
3074 .B Example:
3075         smbrun = /usr/local/samba/bin/smbrun
3077 .SS share modes (S)
3079 This enables or disables the honouring of the "share modes" during a
3080 file open. These modes are used by clients to gain exclusive read or
3081 write access to a file. 
3083 These open modes are not directly supported by UNIX, so they are
3084 simulated using lock files in the "lock directory". The "lock
3085 directory" specified in smb.conf must be readable by all users.
3087 The share modes that are enabled by this option are DENY_DOS,
3088 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
3090 Enabling this option gives full share compatibility but may cost a bit
3091 of processing time on the UNIX server. They are enabled by default.
3093 .B Default:
3094         share modes = yes
3096 .B Example:
3097         share modes = no
3099 .SS short preserve case (S)
3101 This controls if new short filenames are created with the case that
3102 the client passes, or if they are forced to be the "default" case.
3104 .B Default:
3105        short preserve case = no
3107 See the section on "NAME MANGLING" for a fuller discussion.
3109 .SS socket address (G)
3111 This option allows you to control what address Samba will listen for
3112 connections on. This is used to support multiple virtual interfaces on
3113 the one server, each with a different configuration.
3115 By default samba will accept connections on any address.
3117 .B Example:
3118         socket address = 192.168.2.20
3120 .SS socket options (G)
3121 This option (which can also be invoked with the -O command line
3122 option) allows you to set socket options to be used when talking with
3123 the client.
3125 Socket options are controls on the networking layer of the operating
3126 systems which allow the connection to be tuned.
3128 This option will typically be used to tune your Samba server for
3129 optimal performance for your local network. There is no way that Samba
3130 can know what the optimal parameters are for your net, so you must
3131 experiment and choose them yourself. I strongly suggest you read the
3132 appropriate documentation for your operating system first (perhaps
3133 "man setsockopt" will help).
3135 You may find that on some systems Samba will say "Unknown socket
3136 option" when you supply an option. This means you either mis-typed it
3137 or you need to add an include file to includes.h for your OS. If the
3138 latter is the case please send the patch to me
3139 (samba-bugs@samba.anu.edu.au).
3141 Any of the supported socket options may be combined in any way you
3142 like, as long as your OS allows it.
3144 This is the list of socket options currently settable using this
3145 option:
3147   SO_KEEPALIVE
3149   SO_REUSEADDR
3151   SO_BROADCAST
3153   TCP_NODELAY
3155   IPTOS_LOWDELAY
3157   IPTOS_THROUGHPUT
3159   SO_SNDBUF *
3161   SO_RCVBUF *
3163   SO_SNDLOWAT *
3165   SO_RCVLOWAT *
3167 Those marked with a * take an integer argument. The others can
3168 optionally take a 1 or 0 argument to enable or disable the option, by
3169 default they will be enabled if you don't specify 1 or 0.
3171 To specify an argument use the syntax SOME_OPTION=VALUE for example
3172 SO_SNDBUF=8192. Note that you must not have any spaces before or after
3173 the = sign.
3175 If you are on a local network then a sensible option might be
3177 socket options = IPTOS_LOWDELAY
3179 If you have an almost unloaded local network and you don't mind a lot
3180 of extra CPU usage in the server then you could try
3182 socket options = IPTOS_LOWDELAY TCP_NODELAY
3184 If you are on a wide area network then perhaps try setting
3185 IPTOS_THROUGHPUT. 
3187 Note that several of the options may cause your Samba server to fail
3188 completely. Use these options with caution!
3190 .B Default:
3191         no socket options
3193 .B Example:
3194         socket options = IPTOS_LOWDELAY 
3199 .SS status (G)
3200 This enables or disables logging of connections to a status file that
3201 .B smbstatus
3202 can read.
3204 With this disabled
3205 .B smbstatus
3206 won't be able to tell you what
3207 connections are active.
3209 .B Default:
3210         status = yes
3212 .B Example:
3213         status = no
3215 .SS strict locking (S)
3216 This is a boolean that controls the handling of file locking in the
3217 server. When this is set to yes the server will check every read and
3218 write access for file locks, and deny access if locks exist. This can
3219 be slow on some systems.
3221 When strict locking is "no" the server does file lock checks only when
3222 the client explicitly asks for them. 
3224 Well behaved clients always ask for lock checks when it is important,
3225 so in the vast majority of cases "strict locking = no" is preferable.
3227 .B Default:
3228         strict locking = no
3230 .B Example:
3231         strict locking = yes
3233 .SS strip dot (G)
3234 This is a boolean that controls whether to strip trailing dots off
3235 UNIX filenames. This helps with some CDROMs that have filenames ending in a
3236 single dot.
3238 .B Default:
3239         strip dot = no
3241 .B Example:
3242     strip dot = yes
3244 .SS syslog (G)
3245 This parameter maps how Samba debug messages are logged onto the
3246 system syslog logging levels. Samba debug level zero maps onto
3247 syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug
3248 level two maps to LOG_NOTICE, debug level three maps onto LOG_INFO.
3249 The paramter sets the threshold for doing the mapping, all Samba
3250 debug messages above this threashold are mapped to syslog LOG_DEBUG
3251 messages.
3253 .B Default:
3255         syslog = 1
3257 .SS syslog only (G)
3258 If this parameter is set then Samba debug messages are logged into
3259 the system syslog only, and not to the debug log files.
3261 .B Default:
3262         syslog only = no
3264 .SS sync always (S)
3266 This is a boolean parameter that controls whether writes will always
3267 be written to stable storage before the write call returns. If this is
3268 false then the server will be guided by the client's request in each
3269 write call (clients can set a bit indicating that a particular write
3270 should be synchronous). If this is true then every write will be
3271 followed by a fsync() call to ensure the data is written to disk.
3273 .B Default:
3274         sync always = no
3276 .B Example:
3277         sync always = yes
3279 .SS time offset (G)
3280 This parameter is a setting in minutes to add to the normal GMT to
3281 local time conversion. This is useful if you are serving a lot of PCs
3282 that have incorrect daylight saving time handling.
3284 .B Default:
3285         time offset = 0
3287 .B Example:
3288         time offset = 60
3290 .SS time server (G)
3291 This parameter determines if nmbd advertises itself as a time server
3292 to Windows clients. The default is False.
3294 .B Default:
3295         time server = False
3297 .B Example:
3298         time server = True
3300 .SS unix realname (G)
3301 This boolean parameter when set causes samba to supply the real name field
3302 from the unix password file to the client. This is useful for setting up
3303 mail clients and WWW browsers on systems used by more than one person.
3305 .B Default:
3306         unix realname = no
3308 .B Example:
3309         unix realname = yes
3311 .SS user (S)
3313 .B username.
3314 .SS username (S)
3315 A synonym for this parameter is 'user'.
3317 Multiple users may be specified in a comma-delimited list, in which case the
3318 supplied password will be tested against each username in turn (left to right).
3320 The username= line is needed only when the PC is unable to supply its own
3321 username. This is the case for the coreplus protocol or where your
3322 users have different WfWg usernames to UNIX usernames. In both these
3323 cases you may also be better using the \e\eserver\eshare%user syntax
3324 instead. 
3326 The username= line is not a great solution in many cases as it means Samba
3327 will try to validate the supplied password against each of the
3328 usernames in the username= line in turn. This is slow and a bad idea for
3329 lots of users in case of duplicate passwords. You may get timeouts or
3330 security breaches using this parameter unwisely.
3332 Samba relies on the underlying UNIX security. This parameter does not
3333 restrict who can login, it just offers hints to the Samba server as to
3334 what usernames might correspond to the supplied password. Users can
3335 login as whoever they please and they will be able to do no more
3336 damage than if they started a telnet session. The daemon runs as the
3337 user that they log in as, so they cannot do anything that user cannot
3340 To restrict a service to a particular set of users you can use the
3341 "valid users=" line.
3343 If any of the usernames begin with a @ then the name will be looked up
3344 in the groups file and will expand to a list of all users in the group
3345 of that name. Note that searching though a groups file can take quite
3346 some time, and some clients may time out during the search.
3348 See the section below on username/password validation for more information
3349 on how this parameter determines access to the services.
3351 .B Default:
3352         The guest account if a guest service, else the name of the service.
3354 .B Examples:
3355         username = fred
3356         username = fred, mary, jack, jane, @users, @pcgroup
3358 .SS username level (G)
3360 This option helps Samba to try and 'guess' at the real UNIX username,
3361 as many DOS clients send an all-uppercase username. By default Samba
3362 tries all lowercase, followed by the username with the first letter
3363 capitalized, and fails if the username is not found on the UNIX machine.
3365 If this parameter is set to non-zero the behaviour changes. This 
3366 parameter is a number that specifies the number of uppercase combinations 
3367 to try whilst trying to determine the UNIX user name. The higher the number
3368 the more combinations will be tried, but the slower the discovery
3369 of usernames will be. Use this parameter when you have strange
3370 usernames on your UNIX machine, such as 'AstrangeUser'.
3372 .B Default:
3373     username level = 0
3375 .B Example:
3376     username level = 5
3378 .SS username map (G)
3380 This option allows you to to specify a file containing a mapping of
3381 usernames from the clients to the server. This can be used for several
3382 purposes. The most common is to map usernames that users use on DOS or
3383 Windows machines to those that the UNIX box uses. The other is to map
3384 multiple users to a single username so that they can more easily share
3385 files.
3387 The map file is parsed line by line. Each line should contain a single
3388 UNIX username on the left then a '=' followed by a list of usernames
3389 on the right. The list of usernames on the right may contain names of
3390 the form @group in which case they will match any UNIX username in
3391 that group. The special client name '*' is a wildcard and matches any
3392 name.
3394 The file is processed on each line by taking the supplied username and
3395 comparing it with each username on the right hand side of the '='
3396 signs. If the supplied name matches any of the names on the right
3397 hand side then it is replaced with the name on the left. Processing
3398 then continues with the next line.
3400 If any line begins with a '#' or a ';' then it is ignored
3402 For example to map from the name "admin" or "administrator" to the UNIX
3403 name "root" you would use
3405         root = admin administrator
3407 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
3408 would use
3410         sys = @system
3412 You can have as many mappings as you like in a username map file.
3414 You can map Windows usernames that have spaces in them by using double
3415 quotes around the name. For example:
3417         tridge = "Andrew Tridgell"
3419 would map the windows username "Andrew Tridgell" to the unix username
3420 tridge.
3422 Note that the remapping is applied to all occurrences of
3423 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
3424 remapped to "mary" then you will actually be connecting to
3425 "\e\eserver\emary" and will need to supply a password suitable for
3426 "mary" not "fred". The only exception to this is the username passed
3427 to the "password server" (if you have one). The password server will
3428 receive whatever username the client supplies without modification.
3430 Also note that no reverse mapping is done. The main effect this has is
3431 with printing. Users who have been mapped may have trouble deleting
3432 print jobs as PrintManager under WfWg will think they don't own the
3433 print job.
3435 .B Default
3436         no username map
3438 .B Example
3439         username map = /usr/local/samba/lib/users.map
3441 .SS valid chars (S)
3443 The option allows you to specify additional characters that should be
3444 considered valid by the server in filenames. This is particularly
3445 useful for national character sets, such as adding u-umlaut or a-ring.
3447 The option takes a list of characters in either integer or character
3448 form with spaces between them. If you give two characters with a colon
3449 between them then it will be taken as an lowercase:uppercase pair.
3451 If you have an editor capable of entering the characters into the
3452 config file then it is probably easiest to use this method. Otherwise
3453 you can specify the characters in octal, decimal or hexadecimal form
3454 using the usual C notation.
3456 For example to add the single character 'Z' to the charset (which is a
3457 pointless thing to do as it's already there) you could do one of the
3458 following
3460 valid chars = Z
3461 valid chars = z:Z
3462 valid chars = 0132:0172
3464 The last two examples above actually add two characters, and alter
3465 the uppercase and lowercase mappings appropriately.
3467 Note that you MUST specify this parameter after the "client code page"
3468 parameter if you have both set. If "client code page" is set after
3469 the "valid chars" parameter the "valid chars" settings will be
3470 overwritten.
3472 See also the "client code page" parameter.
3474 .B Default
3476         Samba defaults to using a reasonable set of valid characters
3478         for english systems
3480 .B Example
3481         valid chars = 0345:0305 0366:0326 0344:0304
3483 The above example allows filenames to have the swedish characters in
3484 them. 
3486 NOTE: It is actually quite difficult to correctly produce a "valid
3487 chars" line for a particular system. To automate the process
3488 tino@augsburg.net has written a package called "validchars" which will
3489 automatically produce a complete "valid chars" line for a given client
3490 system. Look in the examples subdirectory for this package.
3492 .SS valid users (S)
3493 This is a list of users that should be allowed to login to this
3494 service. A name starting with @ is interpreted as a UNIX group.
3496 If this is empty (the default) then any user can login. If a username
3497 is in both this list and the "invalid users" list then access is
3498 denied for that user.
3500 The current servicename is substituted for %S. This is useful in the
3501 [homes] section.
3503 See also "invalid users"
3505 .B Default
3506         No valid users list. (anyone can login)
3508 .B Example
3509         valid users = greg, @pcusers
3512 .SS veto files(S)
3513 This is a list of files and directories that are neither visible nor
3514 accessible.  Each entry in the list must be separated by a "/", which
3515 allows spaces to be included in the entry.  '*' and '?' can be used to
3516 specify multiple files or directories as in DOS wildcards.
3518 Each entry must be a unix path, not a DOS path and must not include the 
3519 unix directory separator "/".
3521 Note that the case sensitivity option is applicable in vetoing files.
3523 One feature of the veto files parameter that it is important to be
3524 aware of, is that if a directory contains nothing but files that
3525 match the veto files parameter (which means that Windows/DOS clients
3526 cannot ever see them) is deleted, the veto files within that directory
3527 *are automatically deleted* along with it, if the user has UNIX permissions
3528 to do so.
3530 Setting this parameter will affect the performance of Samba, as
3531 it will be forced to check all files and directories for a match
3532 as they are scanned.
3534 See also "hide files" and "case sensitive"
3536 .B Default
3537         No files or directories are vetoed.
3539 .B Examples
3540     Example 1.
3541     Veto any files containing the word Security, 
3542     any ending in .tmp, and any directory containing the
3543     word root.
3545         veto files = /*Security*/*.tmp/*root*/
3547     Example 2.
3548     Veto the Apple specific files that a NetAtalk server
3549     creates.
3551     veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
3553 .SS volume (S)
3554 This allows you to override the volume label returned for a
3555 share. Useful for CDROMs with installation programs that insist on a
3556 particular volume label.
3558 The default is the name of the share
3560 .SS wide links (S)
3561 This parameter controls whether or not links in the UNIX file system may be
3562 followed by the server. Links that point to areas within the directory tree
3563 exported by the server are always allowed; this parameter controls access 
3564 only to areas that are outside the directory tree being exported.
3566 .B Default:
3567         wide links = yes
3569 .B Example:
3570         wide links = no
3572 .SS wins proxy (G)
3574 This is a boolean that controls if nmbd will respond to broadcast name
3575 queries on behalf of other hosts. You may need to set this to no for
3576 some older clients.
3578 .B Default:
3579         wins proxy = no
3580 .SS wins server (G)
3582 This specifies the DNS name (or IP address) of the WINS server that Samba 
3583 should register with. If you have a WINS server on your network then you
3584 should set this to the WINS servers name.
3586 You should point this at your WINS server if you have a multi-subnetted
3587 network.
3588 .B Default:
3589         wins server = 
3591 .SS wins support (G)
3593 This boolean controls if Samba will act as a WINS server. You should
3594 not set this to true unless you have a multi-subnetted network and
3595 you wish a particular nmbd to be your WINS server. Note that you
3596 should *NEVER* set this to true on more than one machine in your
3597 network.
3599 .B Default:
3600         wins support = no
3601 .SS workgroup (G)
3603 This controls what workgroup your server will appear to be in when
3604 queried by clients. 
3606 .B Default:
3607         set in the Makefile
3609 .B Example:
3610         workgroup = MYGROUP
3612 .SS writable (S)
3613 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
3615 If this parameter is 'no', then users of a service may not create or modify
3616 files in the service's directory.
3618 Note that a printable service ('printable = yes') will ALWAYS allow 
3619 writing to the directory (user privileges permitting), but only via
3620 spooling operations.
3622 .B Default:
3623         writable = no
3625 .B Examples:
3626         read only = no
3627         writable = yes
3628         write ok = yes
3629 .SS write list (S)
3630 This is a list of users that are given read-write access to a
3631 service. If the connecting user is in this list then they will be
3632 given write access, no matter what the "read only" option is set
3633 to. The list can include group names using the @group syntax.
3635 Note that if a user is in both the read list and the write list then
3636 they will be given write access.
3638 See also the "read list" option
3640 .B Default:
3641      write list =
3643 .B Example:
3644      write list = admin, root, @staff
3646 .SS write ok (S)
3648 .B writable
3650 .B read only.
3651 .SS write raw (G)
3652 This parameter controls whether or not the server will support raw writes when
3653 transferring data from clients.
3655 .B Default:
3656         write raw = yes
3658 .B Example:
3659         write raw = no
3660 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
3661 There are a number of ways in which a user can connect to a
3662 service. The server follows the following steps in determining if it
3663 will allow a connection to a specified service. If all the steps fail
3664 then the connection request is rejected. If one of the steps pass then
3665 the following steps are not checked.
3667 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
3669 Step 1: If the client has passed a username/password pair and that
3670 username/password pair is validated by the UNIX system's password
3671 programs then the connection is made as that username. Note that this
3672 includes the \e\eserver\eservice%username method of passing a username.
3674 Step 2: If the client has previously registered a username with the
3675 system and now supplies a correct password for that username then the
3676 connection is allowed.
3678 Step 3: The client's netbios name and any previously used user names
3679 are checked against the supplied password, if they match then the
3680 connection is allowed as the corresponding user.
3682 Step 4: If the client has previously validated a username/password
3683 pair with the server and the client has passed the validation token
3684 then that username is used. This step is skipped if "revalidate = yes" 
3685 for this service.
3687 Step 5: If a "user = " field is given in the smb.conf file for the
3688 service and the client has supplied a password, and that password
3689 matches (according to the UNIX system's password checking) with one of
3690 the usernames from the user= field then the connection is made as the
3691 username in the "user=" line. If one of the username in the user= list
3692 begins with a @ then that name expands to a list of names in the group
3693 of the same name.
3695 Step 6: If the service is a guest service then a connection is made as
3696 the username given in the "guest account =" for the service,
3697 irrespective of the supplied password.
3698 .SH WARNINGS
3699 Although the configuration file permits service names to contain spaces, 
3700 your client software may not. Spaces will be ignored in comparisons anyway,
3701 so it shouldn't be a problem - but be aware of the possibility.
3703 On a similar note, many clients - especially DOS clients - limit service
3704 names to eight characters. Smbd has no such limitation, but attempts
3705 to connect from such clients will fail if they truncate the service names.
3706 For this reason you should probably keep your service names down to eight 
3707 characters in length.
3709 Use of the [homes] and [printers] special sections make life for an 
3710 administrator easy, but the various combinations of default attributes can be
3711 tricky. Take extreme care when designing these sections. In particular,
3712 ensure that the permissions on spool directories are correct.
3713 .SH VERSION
3714 This man page is (mostly) correct for version 1.9.18 of the Samba suite, plus some
3715 of the recent patches to it. These notes will necessarily lag behind 
3716 development of the software, so it is possible that your version of 
3717 the server has extensions or parameter semantics that differ from or are not 
3718 covered by this man page. Please notify these to the address below for 
3719 rectification.
3721 Prior to version 1.5.21 of the Samba suite, the configuration file was
3722 radically different (more primitive). If you are using a version earlier than
3723 1.8.05, it is STRONGLY recommended that you upgrade.
3724 .SH OPTIONS
3725 Not applicable.
3726 .SH FILES
3727 Not applicable.
3728 .SH ENVIRONMENT VARIABLES
3729 Not applicable.
3730 .SH SEE ALSO
3731 .BR smbd (8),
3732 .BR smbclient (1),
3733 .BR nmbd (8),
3734 .BR testparm (1), 
3735 .BR testprns (1),
3736 .BR lpq (1),
3737 .BR hosts_access (5)
3738 .SH DIAGNOSTICS
3739 [This section under construction]
3741 Most diagnostics issued by the server are logged in a specified log file. The
3742 log file name is specified at compile time, but may be overridden on the
3743 smbd command line (see
3744 .BR smbd (8)).
3746 The number and nature of diagnostics available depends on the debug level used
3747 by the server. If you have problems, set the debug level to 3 and peruse the
3748 log files.
3750 Most messages are reasonably self-explanatory. Unfortunately, at time of
3751 creation of this man page the source code is still too fluid to warrant
3752 describing each and every diagnostic. At this stage your best bet is still
3753 to grep the source code and inspect the conditions that gave rise to the 
3754 diagnostics you are seeing.
3755 .SH BUGS
3756 None known.
3758 Please send bug reports, comments and so on to:
3760 .RS 3
3761 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
3763 .RS 3
3764 or to the mailing list:
3767 .B samba@listproc.anu.edu.au
3770 You may also like to subscribe to the announcement channel:
3772 .RS 3
3773 .B samba-announce@listproc.anu.edu.au
3776 To subscribe to these lists send a message to
3777 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
3778 Name" or "subscribe samba-announce Your Name".
3780 Errors or suggestions for improvements to the Samba man pages should be 
3781 mailed to:
3783 .RS 3
3784 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)