1 mailto(samba-bugs@samba.anu.edu.au)
3 manpage(smb.conf)(5)(23 Oct 1998)(Samba)(SAMBA)
6 manpagename(smb.conf)(The configuration file for the Samba suite)
11 bf(smb.conf) The bf(smb.conf) file is a configuration file for the
12 Samba suite. bf(smb.conf) contains runtime configuration information
13 for the Samba programs. The bf(smb.conf) file is designed to be
14 configured and administered by the url(bf(swat (8)))(swat.8.html)
15 program. The complete description of the file format and possible
16 parameters held within are here for reference purposes.
19 manpagesection(FILE FORMAT)
21 The file consists of sections and parameters. A section begins with
22 the name of the section in square brackets and continues until the
23 next section begins. Sections contain parameters of the form
27 The file is line-based - that is, each newline-terminated line
28 represents either a comment, a section name or a parameter.
30 Section and parameter names are not case sensitive.
32 Only the first equals sign in a parameter is significant. Whitespace
33 before or after the first equals sign is discarded. Leading, trailing
34 and internal whitespace in section and parameter names is
35 irrelevant. Leading and trailing whitespace in a parameter value is
36 discarded. Internal whitespace within a parameter value is retained
39 Any line beginning with a semicolon (';') or a hash ('#') character is
40 ignored, as are lines containing only whitespace.
42 Any line ending in a tt('\') is "continued" on the next line in the
43 customary UNIX fashion.
45 The values following the equals sign in parameters are all either a
46 string (no quotes needed) or a boolean, which may be given as yes/no,
47 0/1 or true/false. Case is not significant in boolean values, but is
48 preserved in string values. Some items such as create modes are
51 label(SECTIONDESCRIPTIONS)
52 manpagesection(SECTION DESCRIPTIONS)
54 Each section in the configuration file (except for the
55 link(bf([global]))(global) section) describes a shared resource (known
56 as a em("share")). The section name is the name of the shared resource
57 and the parameters within the section define the shares attributes.
59 There are three special sections, link(bf([global]))(global),
60 link(bf([homes]))(homes) and link(bf([printers]))(printers), which are
61 described under link(bf('special sections'))(specialsections). The
62 following notes apply to ordinary section descriptions.
64 A share consists of a directory to which access is being given plus
65 a description of the access rights which are granted to the user of
66 the service. Some housekeeping options are also specifiable.
68 Sections are either filespace services (used by the client as an
69 extension of their native file systems) or printable services (used by
70 the client to access print services on the host running the server).
72 Sections may be designated link(bf(guest))(guestok) services, in which
73 case no password is required to access them. A specified UNIX
74 link(bf(guest account))(guestaccount) is used to define access
75 privileges in this case.
77 Sections other than guest services will require a password to access
78 them. The client provides the username. As older clients only provide
79 passwords and not usernames, you may specify a list of usernames to
80 check against the password using the link(bf("user="))(user) option in
81 the share definition. For modern clients such as Windows 95/98 and
82 Windows NT, this should not be neccessary.
84 Note that the access rights granted by the server are masked by the
85 access rights granted to the specified or guest UNIX user by the host
86 system. The server does not grant more access than the host system
89 The following sample section defines a file space share. The user has
90 write access to the path tt(/home/bar). The share is accessed via
101 The following sample section defines a printable share. The share
102 is readonly, but printable. That is, the only write access permitted
103 is via calls to open, write to and close a spool file. The
104 link(bf('guest ok'))(guestok) parameter means access will be permitted
105 as the default guest user (specified elsewhere):
109 path = /usr/spool/public
115 label(SPECIALSECTIONS)
116 manpagesection(SPECIAL SECTIONS)
121 dit(bf(The [global] section))
123 Parameters in this section apply to the server as a whole, or are
124 defaults for sections which do not specifically define certain
125 items. See the notes under link(bf('Parameters'))(Parameters) for more
129 dit(bf(The [homes] section))
131 If a section called tt('homes') is included in the configuration file,
132 services connecting clients to their home directories can be created
133 on the fly by the server.
135 When the connection request is made, the existing sections are
136 scanned. If a match is found, it is used. If no match is found, the
137 requested section name is treated as a user name and looked up in the
138 local password file. If the name exists and the correct password has
139 been given, a share is created by cloning the [homes] section.
141 Some modifications are then made to the newly created share:
145 it() The share name is changed from tt('homes') to the located
148 it() If no path was given, the path is set to the user's home
153 If you decide to use a link(bf(path=))(path) line in your [homes]
154 section then you may find it useful to use the link(bf(%S))(percentS)
157 tt(path=/data/pchome/%S)
159 would be useful if you have different home directories for your PCs
160 than for UNIX access.
162 This is a fast and simple way to give a large number of clients access
163 to their home directories with a minimum of fuss.
165 A similar process occurs if the requested section name is tt("homes"),
166 except that the share name is not changed to that of the requesting
167 user. This method of using the [homes] section works well if different
168 users share a client PC.
170 The [homes] section can specify all the parameters a normal service
171 section can specify, though some make more sense than others. The
172 following is a typical and suitable [homes] section:
179 An important point is that if guest access is specified in the [homes]
180 section, all home directories will be visible to all clients
181 bf(without a password). In the very unlikely event that this is
182 actually desirable, it would be wise to also specify link(bf(read only
185 Note that the link(bf(browseable))(browseable) flag for auto home
186 directories will be inherited from the global browseable flag, not the
187 [homes] browseable flag. This is useful as it means setting
188 browseable=no in the [homes] section will hide the [homes] share but
189 make any auto home directories visible.
192 dit(bf(The [printers] section))
194 This section works like link(bf([homes]))(homes), but for printers.
196 If a [printers] section occurs in the configuration file, users are
197 able to connect to any printer specified in the local host's printcap
200 When a connection request is made, the existing sections are
201 scanned. If a match is found, it is used. If no match is found, but a
202 link(bf([homes]))(homes) section exists, it is used as described
203 above. Otherwise, the requested section name is treated as a printer
204 name and the appropriate printcap file is scanned to see if the
205 requested section name is a valid printer share name. If a match is
206 found, a new printer share is created by cloning the [printers]
209 A few modifications are then made to the newly created share:
213 it() The share name is set to the located printer name
215 it() If no printer name was given, the printer name is set to the
218 it() If the share does not permit guest access and no username was
219 given, the username is set to the located printer name.
223 Note that the [printers] service MUST be printable - if you specify
224 otherwise, the server will refuse to load the configuration file.
226 Typically the path specified would be that of a world-writable spool
227 directory with the sticky bit set on it. A typical [printers] entry
228 would look like this:
232 path = /usr/spool/public
238 All aliases given for a printer in the printcap file are legitimate
239 printer names as far as the server is concerned. If your printing
240 subsystem doesn't work like that, you will have to set up a
241 pseudo-printcap. This is a file consisting of one or more lines like
244 verb( alias|alias|alias|alias... )
246 Each alias should be an acceptable printer name for your printing
247 subsystem. In the link(bf([global]))(global) section, specify the new
248 file as your printcap. The server will then only recognise names
249 found in your pseudo-printcap, which of course can contain whatever
250 aliases you like. The same technique could be used simply to limit
251 access to a subset of your local printers.
253 An alias, by the way, is defined as any component of the first entry
254 of a printcap record. Records are separated by newlines, components
255 (if there are more than one) are separated by vertical bar symbols
258 NOTE: On SYSV systems which use lpstat to determine what printers are
259 defined on the system you may be able to use link(bf("printcap name =
260 lpstat"))(printcapname) to automatically obtain a list of
261 printers. See the link(bf("printcap name"))(printcapname) option for
267 manpagesection(PARAMETERS)
269 Parameters define the specific attributes of sections.
271 Some parameters are specific to the link(bf([global]))(global) section
272 (eg., link(bf(security))(security)). Some parameters are usable in
273 all sections (eg., link(bf(create mode))(createmode)). All others are
274 permissible only in normal sections. For the purposes of the following
275 descriptions the link(bf([homes]))(homes) and
276 link(bf([printers]))(printers) sections will be considered normal.
277 The letter tt('G') in parentheses indicates that a parameter is
278 specific to the link(bf([global]))(global) section. The letter tt('S')
279 indicates that a parameter can be specified in a service specific
280 section. Note that all tt('S') parameters can also be specified in the
281 link(bf([global]))(global) section - in which case they will define
282 the default behaviour for all services.
284 Parameters are arranged here in alphabetical order - this may not
285 create best bedfellows, but at least you can find them! Where there
286 are synonyms, the preferred synonym is described, others refer to the
289 label(VARIABLESUBSTITUTIONS)
290 manpagesection(VARIABLE SUBSTITUTIONS)
292 Many of the strings that are settable in the config file can take
293 substitutions. For example the option link(bf(tt("path =
294 /tmp/%u")))(path) would be interpreted as tt("path = /tmp/john") if
295 the user connected with the username john.
297 These substitutions are mostly noted in the descriptions below, but
298 there are some general substitutions which apply whenever they might
299 be relevant. These are:
304 it() bf(%S) = the name of the current service, if any.
307 it() bf(%P) = the root directory of the current service, if any.
310 it() bf(%u) = user name of the current service, if any.
313 it() bf(%g) = primary group name of link(bf(%u))(percentu).
316 it() bf(%U) = session user name (the user name that
317 the client wanted, not necessarily the same as the one they got).
320 it() bf(%G) = primary group name of link(bf(%U))(percentU).
323 it() bf(%H) = the home directory of the user given by link(bf(%u))(percentu).
326 it() bf(%v) = the Samba version.
329 it() bf(%h) = the internet hostname that Samba is running on.
332 it() bf(%m) = the NetBIOS name of the client machine (very useful).
335 it() bf(%L) = the NetBIOS name of the server. This allows you to change your
336 config based on what the client calls you. Your server can have a "dual
340 it() bf(%M) = the internet name of the client machine.
343 it() bf(%N) = the name of your NIS home directory server. This is
344 obtained from your NIS auto.map entry. If you have not compiled Samba
345 with the bf(--with-automount) option then this value will be the same
346 as link(bf(%L))(percentL).
349 it() bf(%p) = the path of the service's home directory, obtained from your NIS
350 auto.map entry. The NIS auto.map entry is split up as "%N:%p".
353 it() bf(%R) = the selected protocol level after protocol
354 negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2 or NT1.
357 it() bf(%d) = The process id of the current server process.
360 it() bf(%a) = the architecture of the remote
361 machine. Only some are recognised, and those may not be 100%
362 reliable. It currently recognises Samba, WfWg, WinNT and
363 Win95. Anything else will be known as "UNKNOWN". If it gets it wrong
364 then sending a level 3 log to email(samba-bugs@samba.anu.edu.au)
365 should allow it to be fixed.
368 it() bf(%I) = The IP address of the client machine.
371 it() bf(%T) = the current date and time.
375 There are some quite creative things that can be done with these
376 substitutions and other smb.conf options.
379 manpagesection(NAME MANGLING)
381 Samba supports em("name mangling") so that DOS and Windows clients can
382 use files that don't conform to the 8.3 format. It can also be set to
383 adjust the case of 8.3 format filenames.
385 There are several options that control the way mangling is performed,
386 and they are grouped here rather than listed separately. For the
387 defaults look at the output of the testparm program.
389 All of these options can be set separately for each service (or
390 globally, of course).
394 label(manglecaseoption)
395 bf("mangle case = yes/no") controls if names that have characters that
396 aren't of the "default" case are mangled. For example, if this is yes
397 then a name like tt("Mail") would be mangled. Default em(no).
399 label(casesensitiveoption)
400 bf("case sensitive = yes/no") controls whether filenames are case
401 sensitive. If they aren't then Samba must do a filename search and
402 match on passed names. Default em(no).
404 label(defaultcaseoption)
405 bf("default case = upper/lower") controls what the default case is for new
406 filenames. Default em(lower).
408 label(preservecaseoption)
409 bf("preserve case = yes/no") controls if new files are created with the
410 case that the client passes, or if they are forced to be the tt("default")
411 case. Default em(Yes).
413 label(shortpreservecaseoption)
415 bf("short preserve case = yes/no") controls if new files which conform
416 to 8.3 syntax, that is all in upper case and of suitable length, are
417 created upper case, or if they are forced to be the tt("default")
418 case. This option can be use with link(bf("preserve case =
419 yes"))(preservecaseoption) to permit long filenames to retain their
420 case, while short names are lowered. Default em(Yes).
422 By default, Samba 2.0 has the same semantics as a Windows NT
423 server, in that it is case insensitive but case preserving.
425 label(COMPLETELISTOFGLOBALPARAMETERS)
426 manpagesection(COMPLETE LIST OF GLOBAL PARAMETERS)
428 Here is a list of all global parameters. See the section of each
429 parameter for details. Note that some are synonyms.
433 it() link(bf(announce as))(announceas)
435 it() link(bf(announce version))(announceversion)
437 it() link(bf(auto services))(autoservices)
439 it() link(bf(bind interfaces only))(bindinterfacesonly)
441 it() link(bf(browse list))(browselist)
443 it() link(bf(change notify timeout))(changenotifytimeout)
445 it() link(bf(character set))(characterset)
447 it() link(bf(client code page))(clientcodepage)
449 it() link(bf(coding system))(codingsystem)
451 it() link(bf(config file))(configfile)
453 it() link(bf(deadtime))(deadtime)
455 it() link(bf(debug timestamp))(debugtimestamp)
457 it() link(bf(debuglevel))(debuglevel)
459 it() link(bf(default))(default)
461 it() link(bf(default service))(defaultservice)
463 it() link(bf(dfree command))(dfreecommand)
465 it() link(bf(dns proxy))(dns proxy)
467 it() link(bf(domain admin group))(domainadmingroup)
469 it() link(bf(domain admin users))(domainadminusers)
471 it() link(bf(domain controller))(domaincontroller)
473 it() link(bf(domain groups))(domaingroups)
475 it() link(bf(domain guest group))(domainguestgroup)
477 it() link(bf(domain guest users))(domainguestusers)
479 it() link(bf(domain logons))(domainlogons)
481 it() link(bf(domain master))(domainmaster)
483 it() link(bf(encrypt passwords))(encryptpasswords)
485 it() link(bf(getwd cache))(getwdcache)
487 it() link(bf(homedir map))(homedirmap)
489 it() link(bf(hosts equiv))(hostsequiv)
491 it() link(bf(interfaces))(interfaces)
493 it() link(bf(keepalive))(keepalive)
495 it() link(bf(kernel oplocks))(kerneloplocks)
497 it() link(bf(ldap filter))(ldapfilter)
499 it() link(bf(ldap port))(ldapport)
501 it() link(bf(ldap root))(ldaproot)
503 it() link(bf(ldap root passwd))(ldaprootpasswd)
505 it() link(bf(ldap server))(ldapserver)
507 it() link(bf(ldap suffix))(ldapsuffix)
509 it() link(bf(lm announce))(lmannounce)
511 it() link(bf(lm interval))(lminterval)
513 it() link(bf(load printers))(loadprinters)
515 it() link(bf(local master))(localmaster)
517 it() link(bf(lock dir))(lockdir)
519 it() link(bf(lock directory))(lockdirectory)
521 it() link(bf(log file))(logfile)
523 it() link(bf(log level))(loglevel)
525 it() link(bf(logon drive))(logondrive)
527 it() link(bf(logon home))(logonhome)
529 it() link(bf(logon path))(logonpath)
531 it() link(bf(logon script))(logonscript)
533 it() link(bf(lpq cache time))(lpqcachetime)
535 it() link(bf(machine password timeout))(machinepasswordtimeout)
537 it() link(bf(mangled stack))(mangledstack)
539 it() link(bf(max disk size))(maxdisksize)
541 it() link(bf(max log size))(maxlogsize)
543 it() link(bf(max mux))(maxmux)
545 it() link(bf(max open files))(maxopenfiles)
547 it() link(bf(max packet))(maxpacket)
549 it() link(bf(max ttl))(maxttl)
551 it() link(bf(max wins ttl))(maxwinsttl)
553 it() link(bf(max xmit))(maxxmit)
555 it() link(bf(message command))(messagecommand)
557 it() link(bf(min wins ttl))(minwinsttl)
559 it() link(bf(name resolve order))(nameresolveorder)
561 it() link(bf(netbios aliases))(netbiosaliases)
563 it() link(bf(netbios name))(netbiosname)
565 it() link(bf(networkstation user login))(networkstationuserlogin)
567 it() link(bf(NIS homedir))(NIShomedir)
569 it() link(bf(nt pipe support))(ntpipesupport)
571 it() link(bf(nt smb support))(ntsmbsupport)
573 it() link(bf(null passwords))(nullpasswords)
575 it() link(bf(ole locking compatibility))(olelockingcompatibility)
577 it() link(bf(os level))(oslevel)
579 it() link(bf(packet size))(packetsize)
581 it() link(bf(panic action))(panicaction)
583 it() link(bf(passwd chat))(passwdchat)
585 it() link(bf(passwd chat debug))(passwdchatdebug)
587 it() link(bf(passwd program))(passwdprogram)
589 it() link(bf(password level))(passwordlevel)
591 it() link(bf(password server))(passwordserver)
593 it() link(bf(prefered master))(preferedmaster)
595 it() link(bf(preferred master))(preferredmaster)
597 it() link(bf(preload))(preload)
599 it() link(bf(printcap))(printcap)
601 it() link(bf(printcap name))(printcapname)
603 it() link(bf(printer driver file))(printerdriverfile)
605 it() link(bf(protocol))(protocol)
607 it() link(bf(read bmpx))(readbmpx)
609 it() link(bf(read prediction))(readprediction)
611 it() link(bf(read raw))(readraw)
613 it() link(bf(read size))(readsize)
615 it() link(bf(remote announce))(remoteannounce)
617 it() link(bf(remote browse sync))(remotebrowsesync)
619 it() link(bf(root))(root)
621 it() link(bf(root dir))(rootdir)
623 it() link(bf(root directory))(rootdirectory)
625 it() link(bf(security))(security)
627 it() link(bf(server string))(serverstring)
629 it() link(bf(shared mem size))(sharedmemsize)
631 it() link(bf(smb passwd file))(smbpasswdfile)
633 it() link(bf(smbrun))(smbrun)
635 it() link(bf(socket address))(socketaddress)
637 it() link(bf(socket options))(socketoptions)
639 it() link(bf(ssl))(ssl)
641 it() link(bf(ssl CA certDir))(sslCAcertDir)
643 it() link(bf(ssl CA certFile))(sslCAcertFile)
645 it() link(bf(ssl ciphers))(sslciphers)
647 it() link(bf(ssl client cert))(sslclientcert)
649 it() link(bf(ssl client key))(sslclientkey)
651 it() link(bf(ssl compatibility))(sslcompatibility)
653 it() link(bf(ssl hosts))(sslhosts)
655 it() link(bf(ssl hosts resign))(sslhostsresign)
657 it() link(bf(ssl require clientcert))(sslrequireclientcert)
659 it() link(bf(ssl require servercert))(sslrequireservercert)
661 it() link(bf(ssl server cert))(sslservercert)
663 it() link(bf(ssl server key))(sslserverkey)
665 it() link(bf(ssl version))(sslversion)
667 it() link(bf(stat cache))(statcache)
669 it() link(bf(stat cache size))(statcachesize)
671 it() link(bf(strip dot))(stripdot)
673 it() link(bf(syslog))(syslog)
675 it() link(bf(syslog only))(syslogonly)
677 it() link(bf(time offset))(timeoffset)
679 it() link(bf(time server))(timeserver)
681 it() link(bf(timestamp logs))(timestamplogs)
683 it() link(bf(unix password sync))(unixpasswordsync)
685 it() link(bf(unix realname))(unixrealname)
687 it() link(bf(update encrypted))(updateencrypted)
689 it() link(bf(use rhosts))(userhosts)
691 it() link(bf(username level))(usernamelevel)
693 it() link(bf(username map))(usernamemap)
695 it() link(bf(valid chars))(validchars)
697 it() link(bf(wins proxy))(winsproxy)
699 it() link(bf(wins server))(winsserver)
701 it() link(bf(wins support))(winssupport)
703 it() link(bf(workgroup))(workgroup)
705 it() link(bf(write raw))(writeraw)
709 label(COMPLETELISTOFSERVICEPARAMETERS)
710 manpagesection(COMPLETE LIST OF SERVICE PARAMETERS)
712 Here is a list of all service parameters. See the section of each
713 parameter for details. Note that some are synonyms.
717 it() link(bf(admin users))(adminusers)
719 it() link(bf(allow hosts))(allowhosts)
721 it() link(bf(alternate permissions))(alternatepermissions)
723 it() link(bf(available))(available)
725 it() link(bf(blocking locks))(blockinglocks)
727 it() link(bf(browsable))(browsable)
729 it() link(bf(browseable))(browseable)
731 it() link(bf(case sensitive))(casesensitive)
733 it() link(bf(casesignames))(casesignames)
735 it() link(bf(comment))(comment)
737 it() link(bf(copy))(copy)
739 it() link(bf(create mask))(createmask)
741 it() link(bf(create mode))(createmode)
743 it() link(bf(default case))(defaultcase)
745 it() link(bf(delete readonly))(deletereadonly)
747 it() link(bf(delete veto files))(deletevetofiles)
749 it() link(bf(deny hosts))(denyhosts)
751 it() link(bf(directory))(directory)
753 it() link(bf(directory mask))(directorymask)
755 it() link(bf(directory mode))(directorymode)
757 it() link(bf(dont descend))(dontdescend)
759 it() link(bf(dos filetime resolution))(dosfiletimeresolution)
761 it() link(bf(dos filetimes))(dosfiletimes)
763 it() link(bf(exec))(exec)
765 it() link(bf(fake directory create times))(fakedirectorycreatetimes)
767 it() link(bf(fake oplocks))(fakeoplocks)
769 it() link(bf(follow symlinks))(followsymlinks)
771 it() link(bf(force create mode))(forcecreatemode)
773 it() link(bf(force directory mode))(forcedirectorymode)
775 it() link(bf(force group))(forcegroup)
777 it() link(bf(force user))(forceuser)
779 it() link(bf(fstype))(fstype)
781 it() link(bf(group))(group)
783 it() link(bf(guest account))(guestaccount)
785 it() link(bf(guest ok))(guestok)
787 it() link(bf(guest only))(guestonly)
789 it() link(bf(hide dot files))(hidedotfiles)
791 it() link(bf(hide files))(hidefiles)
793 it() link(bf(hosts allow))(hostsallow)
795 it() link(bf(hosts deny))(hostsdeny)
797 it() link(bf(include))(include)
799 it() link(bf(invalid users))(invalidusers)
801 it() link(bf(locking))(locking)
803 it() link(bf(lppause command))(lppausecommand)
805 it() link(bf(lpq command))(lpqcommand)
807 it() link(bf(lpresume command))(lpresumecommand)
809 it() link(bf(lprm command))(lprmcommand)
811 it() link(bf(magic output))(magicoutput)
813 it() link(bf(magic script))(magicscript)
815 it() link(bf(mangle case))(manglecase)
817 it() link(bf(mangled map))(mangledmap)
819 it() link(bf(mangled names))(manglednames)
821 it() link(bf(mangling char))(manglingchar)
823 it() link(bf(map archive))(maparchive)
825 it() link(bf(map hidden))(maphidden)
827 it() link(bf(map system))(mapsystem)
829 it() link(bf(map to guest))(maptoguest)
831 it() link(bf(max connections))(maxconnections)
833 it() link(bf(min print space))(minprintspace)
835 it() link(bf(only guest))(onlyguest)
837 it() link(bf(only user))(onlyuser)
839 it() link(bf(oplocks))(oplocks)
841 it() link(bf(path))(path)
843 it() link(bf(postexec))(postexec)
845 it() link(bf(postscript))(postscript)
847 it() link(bf(preexec))(preexec)
849 it() link(bf(preserve case))(preservecase)
851 it() link(bf(print command))(printcommand)
853 it() link(bf(print ok))(printok)
855 it() link(bf(printable))(printable)
857 it() link(bf(printer))(printer)
859 it() link(bf(printer driver))(printerdriver)
861 it() link(bf(printer driver location))(printerdriverlocation)
863 it() link(bf(printer name))(printername)
865 it() link(bf(printing))(printing)
867 it() link(bf(public))(public)
869 it() link(bf(queuepause command))(queuepausecommand)
871 it() link(bf(queueresume command))(queueresumecommand)
873 it() link(bf(read list))(readlist)
875 it() link(bf(read only))(readonly)
877 it() link(bf(revalidate))(revalidate)
879 it() link(bf(root postexec))(rootpostexec)
881 it() link(bf(root preexec))(rootpreexec)
883 it() link(bf(set directory))(setdirectory)
885 it() link(bf(share modes))(sharemodes)
887 it() link(bf(short preserve case))(shortpreservecase)
889 it() link(bf(status))(status)
891 it() link(bf(strict locking))(strictlocking)
893 it() link(bf(strict sync))(strictsync)
895 it() link(bf(sync always))(syncalways)
897 it() link(bf(user))(user)
899 it() link(bf(username))(username)
901 it() link(bf(users))(users)
903 it() link(bf(valid users))(validusers)
905 it() link(bf(veto files))(vetofiles)
907 it() link(bf(veto oplock files))(vetooplockfiles)
909 it() link(bf(volume))(volume)
911 it() link(bf(wide links))(wide links)
913 it() link(bf(writable))(writable)
915 it() link(bf(write list))(write list)
917 it() link(bf(write ok))(write ok)
919 it() link(bf(writeable))(writeable)
923 label(EXPLANATIONOFEACHPARAMETER)
924 manpagesection(EXPLANATION OF EACH PARAMETER)
929 dit(bf(admin users (S)))
931 This is a list of users who will be granted administrative privileges
932 on the share. This means that they will do all file operations as the
935 You should use this option very carefully, as any user in this list
936 will be able to do anything they like on the share, irrespective of
943 tt( admin users = jason)
946 dit(bf(allow hosts (S)))
948 A synonym for this parameter is link(bf('hosts allow'))(hostsallow)
950 This parameter is a comma, space, or tab delimited set of hosts which
951 are permitted to access a service.
953 If specified in the link(bf([global]))(global) section then it will
954 apply to all services, regardless of whether the individual service
955 has a different setting.
957 You can specify the hosts by name or IP number. For example, you could
958 restrict access to only the hosts on a Class C subnet with something
959 like tt("allow hosts = 150.203.5."). The full syntax of the list is
960 described in the man page bf(hosts_access (5)). Note that this man
961 page may not be present on your system, so a brief description will
964 em(NOTE:) IF you wish to allow the url(bf(smbpasswd
965 (8)))(smbpasswd.html.8) program to be run by local users to change
966 their Samba passwords using the local url(bf(smbd (8)))(smbd.8.html)
967 daemon, then you em(MUST) ensure that the localhost is listed in your
968 bf(allow hosts) list, as url(bf(smbpasswd (8)))(smbpasswd.html.8) runs
969 in client-server mode and is seen by the local
970 url(bf(smbd))(smbd.8.html) process as just another client.
972 You can also specify hosts by network/netmask pairs and by netgroup
973 names if your system supports netgroups. The em(EXCEPT) keyword can also
974 be used to limit a wildcard list. The following examples may provide
977 bf(Example 1): allow localhost and all IPs in 150.203.*.* except one
979 tt( hosts allow = localhost, 150.203. EXCEPT 150.203.6.66)
981 bf(Example 2): allow localhost and hosts that match the given network/netmask
983 tt( hosts allow = localhost, 150.203.15.0/255.255.255.0)
985 bf(Example 3): allow a localhost plus a couple of hosts
987 tt( hosts allow = localhost, lapland, arvidsjaur)
989 bf(Example 4): allow only hosts in NIS netgroup "foonet" or localhost, but
990 deny access from one particular host
992 tt( hosts allow = @foonet, localhost)
993 tt( hosts deny = pirate)
995 Note that access still requires suitable user-level passwords.
997 See url(bf(testparm (1)))(testparm.1.html) for a way of testing your
998 host access to see if it does what you expect.
1001 tt( none (i.e., all hosts permitted access))
1004 tt( allow hosts = 150.203.5. localhost myhost.mynet.edu.au)
1006 label(alternatepermissions)
1007 dit(bf(alternate permissions (S)))
1009 This is a deprecated parameter. It no longer has any effect in Samba2.0.
1010 In previous versions of Samba it affected the way the DOS "read only"
1011 attribute was mapped for a file. In Samba2.0 a file is marked "read only"
1012 if the UNIX file does not have the 'w' bit set for the owner of the file,
1013 regardless if the owner of the file is the currently logged on user or not.
1016 dit(bf(announce as (G)))
1018 This specifies what type of server url(bf(nmbd))(nmbd.8.html) will
1019 announce itself as, to a network neighborhood browse list. By default
1020 this is set to Windows NT. The valid options are : "NT", "Win95" or
1021 "WfW" meaining Windows NT, Windows 95 and Windows for Workgroups
1022 respectively. Do not change this parameter unless you have a specific
1023 need to stop Samba appearing as an NT server as this may prevent Samba
1024 servers from participating as browser servers correctly.
1027 tt( announce as = NT)
1030 tt( announce as = Win95)
1032 label(announceversion)
1033 dit(bf(announce version (G)))
1035 This specifies the major and minor version numbers that nmbd will use
1036 when announcing itself as a server. The default is 4.2. Do not change
1037 this parameter unless you have a specific need to set a Samba server
1038 to be a downlevel server.
1041 tt( announce version = 4.2)
1044 tt( announce version = 2.0)
1048 dit(bf(auto services (G)))
1050 This is a list of services that you want to be automatically added to
1051 the browse lists. This is most useful for homes and printers services
1052 that would otherwise not be visible.
1054 Note that if you just want all printers in your printcap file loaded
1055 then the link(bf("load printers"))(loadprinters) option is easier.
1058 tt( no auto services)
1061 tt( auto services = fred lp colorlp)
1064 dit(bf(available (S)))
1066 This parameter lets you em('turn off') a service. If tt('available = no'),
1067 then em(ALL) attempts to connect to the service will fail. Such failures
1071 tt( available = yes)
1076 label(bindinterfacesonly)
1077 dit(bf(bind interfaces only (G)))
1079 This global parameter allows the Samba admin to limit what interfaces
1080 on a machine will serve smb requests. If affects file service
1081 url(bf(smbd))(smbd.8.html) and name service url(bf(nmbd))(nmbd.8.html)
1082 in slightly different ways.
1084 For name service it causes url(bf(nmbd))(nmbd.8.html) to bind to ports
1085 137 and 138 on the interfaces listed in the
1086 link(bf('interfaces'))(interfaces) parameter. nmbd also binds to the
1087 'all addresses' interface (0.0.0.0) on ports 137 and 138 for the
1088 purposes of reading broadcast messages. If this option is not set then
1089 nmbd will service name requests on all of these sockets. If bf("bind
1090 interfaces only") is set then nmbd will check the source address of
1091 any packets coming in on the broadcast sockets and discard any that
1092 don't match the broadcast addresses of the interfaces in the
1093 link(bf('interfaces'))(interfaces) parameter list. As unicast packets
1094 are received on the other sockets it allows nmbd to refuse to serve
1095 names to machines that send packets that arrive through any interfaces
1096 not listed in the 'interfaces' list. IP Source address spoofing does
1097 defeat this simple check, however so it must not be used seriously as
1098 a security feature for nmbd.
1100 For file service it causes smbd to bind only to the interface list
1101 given in the link(bf('interfaces'))(interfaces) parameter. This
1102 restricts the networks that smbd will serve to packets coming in those
1103 interfaces. Note that you should not use this parameter for machines
1104 that are serving PPP or other intermittant or non-broadcast network
1105 interfaces as it will not cope with non-permanent interfaces.
1107 In addition, to change a users SMB password, the
1108 url(bf(smbpasswd))(smbpasswd.8.html) by default connects to the
1109 em("localhost" - 127.0.0.1) address as an SMB client to issue the
1110 password change request. If bf("bind interfaces only") is set then
1111 unless the network address em(127.0.0.1) is added to the
1112 link(bf('interfaces'))(interfaces) parameter list then
1113 url(bf(smbpasswd))(smbpasswd.8.html) will fail to connect in it's
1114 default mode. url(bf(smbpasswd))(smbpasswd.8.html) can be forced to
1115 use the primary IP interface of the local host by using its
1116 url(bf("-r remote machine"))(smbpasswd.8.html#minusr) parameter, with
1117 bf("remote machine") set to the IP name of the primary interface
1121 tt( bind interfaces only = False)
1124 tt( bind interfaces only = True)
1126 label(blockinglocks)
1127 dit(bf(blocking locks (S)))
1129 This parameter controls the behavior of url(bf(smbd))(smbd.8.html) when
1130 given a request by a client to obtain a byte range lock on a region
1131 of an open file, and the request has a time limit associated with it.
1133 If this parameter is set and the lock range requested cannot be
1134 immediately satisfied, Samba 2.0 will internally queue the lock
1135 request, and periodically attempt to obtain the lock until the
1136 timeout period expires.
1138 If this parameter is set to "False", then Samba 2.0 will behave
1139 as previous versions of Samba would and will fail the lock
1140 request immediately if the lock range cannot be obtained.
1142 This parameter can be set per share.
1145 tt( blocking locks = True)
1148 tt( blocking locks = False)
1151 dit(bf(broweable (S)))
1153 This controls whether this share is seen in the list of available
1154 shares in a net view and in the browse list.
1157 tt( browsable = Yes)
1163 dit(bf(browse list(G)))
1165 This controls whether url(bf(smbd))(smbd.8.html) will serve a browse
1166 list to a client doing a NetServerEnum call. Normally set to true. You
1167 should never need to change this.
1170 tt( browse list = Yes)
1175 Synonym for link(bf(browsable))(browsable).
1177 label(casesensitive)
1178 dit(bf(case sensitive (G)))
1180 See the discussion in the section link(bf(NAME MANGLING))(NAMEMANGLING).
1183 dit(bf(casesignames (G)))
1185 Synonym for link(bf("case sensitive"))(casesensitive).
1187 label(changenotifytimeout)
1188 dit(bf(change notify timeout (G)))
1190 One of the new NT SMB requests that Samba 2.0 supports is the
1191 "ChangeNotify" requests. This SMB allows a client to tell a server to
1192 em("watch") a particular directory for any changes and only reply to
1193 the SMB request when a change has occurred. Such constant scanning of
1194 a directory is expensive under UNIX, hence an
1195 url(bf(smbd))(smbd.8.html) daemon only performs such a scan on each
1196 requested directory once every bf(change notify timeout) seconds.
1198 bf(change notify timeout) is specified in units of seconds.
1201 tt( change notify timeout = 60)
1204 tt( change notify timeout = 300)
1206 Would change the scan time to every 5 minutes.
1209 dit(bf(character set (G)))
1211 This allows a smbd to map incoming filenames from a DOS Code page (see
1212 the link(bf(client code page))(clientcodepage) parameter) to several
1213 built in UNIX character sets. The built in code page translations are:
1217 it() bf(ISO8859-1) Western European UNIX character set. The parameter
1218 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1219 page 850 if the bf(character set) parameter is set to iso8859-1
1220 in order for the conversion to the UNIX character set to be done
1223 it() bf(ISO8859-2) Eastern European UNIX character set. The parameter
1224 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1225 page 852 if the bf(character set) parameter is set to ISO8859-2
1226 in order for the conversion to the UNIX character set to be done
1229 it() bf(ISO8859-5) Russian Cyrillic UNIX character set. The parameter
1230 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1231 page 866 if the bf(character set) parameter is set to ISO8859-2
1232 in order for the conversion to the UNIX character set to be done
1235 it() bf(KOI8-R) Alternate mapping for Russian Cyrillic UNIX
1236 character set. The parameter link(bf(client code
1237 page))(clientcodepage) em(MUST) be set to code page 866 if the
1238 bf(character set) parameter is set to KOI8-R in order for the
1239 conversion to the UNIX character set to be done correctly.
1243 em(BUG). These MSDOS code page to UNIX character set mappings should
1244 be dynamic, like the loading of MS DOS code pages, not static.
1246 See also link(bf(client code page))(clientcodepage). Normally this
1247 parameter is not set, meaning no filename translation is done.
1250 tt( character set = <empty string>)
1253 tt( character set = ISO8859-1)
1255 label(clientcodepage)
1256 dit(bf(client code page (G)))
1258 This parameter specifies the DOS code page that the clients accessing
1259 Samba are using. To determine what code page a Windows or DOS client
1260 is using, open a DOS command prompt and type the command "chcp". This
1261 will output the code page. The default for USA MS-DOS, Windows 95, and
1262 Windows NT releases is code page 437. The default for western european
1263 releases of the above operating systems is code page 850.
1265 This parameter tells url(bf(smbd))(smbd.8.html) which of the
1266 tt(codepage.XXX) files to dynamically load on startup. These files,
1267 described more fully in the manual page url(bf(make_smbcodepage
1268 (1)))(make_smbcodepage.1.html), tell url(bf(smbd))(smbd.8.html) how
1269 to map lower to upper case characters to provide the case insensitivity
1270 of filenames that Windows clients expect.
1272 Samba currenly ships with the following code page files :
1276 it() bf(Code Page 437 - MS-DOS Latin US)
1278 it() bf(Code Page 737 - Windows '95 Greek)
1280 it() bf(Code Page 850 - MS-DOS Latin 1)
1282 it() bf(Code Page 852 - MS-DOS Latin 2)
1284 it() bf(Code Page 861 - MS-DOS Icelandic)
1286 it() bf(Code Page 866 - MS-DOS Cyrillic)
1288 it() bf(Code Page 932 - MS-DOS Japanese SJIS)
1290 it() bf(Code Page 936 - MS-DOS Simplified Chinese)
1292 it() bf(Code Page 949 - MS-DOS Korean Hangul)
1294 it() bf(Code Page 950 - MS-DOS Traditional Chinese)
1298 Thus this parameter may have any of the values 437, 737, 850, 852,
1299 861, 932, 936, 949, or 950. If you don't find the codepage you need,
1300 read the comments in one of the other codepage files and the
1301 url(bf(make_smbcodepage (1)))(make_smbcodepage.1.html) man page and
1302 write one. Please remember to donate it back to the Samba user
1305 This parameter co-operates with the link(bf("valid
1306 chars"))(validchars) parameter in determining what characters are
1307 valid in filenames and how capitalization is done. If you set both
1308 this parameter and the link(bf("valid chars"))(validchars) parameter
1309 the bf("client code page") parameter em(MUST) be set before the
1310 link(bf("valid chars"))(validchars) parameter in the bf(smb.conf)
1311 file. The link(bf("valid chars"))(validchars) string will then augment
1312 the character settings in the "client code page" parameter.
1314 If not set, bf("client code page") defaults to 850.
1316 See also : link(bf("valid chars"))(validchars)
1319 tt( client code page = 850)
1322 tt( client code page = 936)
1325 dit(bf(codingsystem (G)))
1327 This parameter is used to determine how incoming Shift-JIS Japanese
1328 characters are mapped from the incoming link(bf("client code
1329 page"))(clientcodepage) used by the client, into file names in the
1330 UNIX filesystem. Only useful if link(bf("client code
1331 page"))(clientcodepage) is set to 932 (Japanese Shift-JIS).
1337 it() bf(SJIS)) Shift-JIS. Does no conversion of the incoming filename.
1339 it() bf(JIS8, J8BB, J8BH, J8@B, J8@J, J8@H )) Convert from incoming
1340 Shift-JIS to eight bit JIS code with different shift-in, shift out
1343 it() bf(JIS7, J7BB, J7BH, J7@B, J7@J, J7@H )) Convert from incoming
1344 Shift-JIS to seven bit JIS code with different shift-in, shift out
1347 it() bf(JUNET, JUBB, JUBH, JU@B, JU@J, JU@H )) Convert from incoming
1348 Shift-JIS to JUNET code with different shift-in, shift out codes.
1350 it() bf(EUC) Convert an incoming Shift-JIS character to EUC code.
1352 it() bf(HEX) Convert an incoming Shift-JIS character to a 3 byte hex
1353 representation, ie. tt(:AB).
1355 it() bf(CAP) Convert an incoming Shift-JIS character to the 3 byte hex
1356 representation used by the Columbia Appletalk Program (CAP),
1357 ie. tt(:AB). This is used for compatibility between Samba and CAP.
1362 dit(bf(comment (S)))
1364 This is a text field that is seen next to a share when a client does a
1365 queries the server, either via the network neighborhood or via "net
1366 view" to list what shares are available.
1368 If you want to set the string that is displayed next to the machine
1369 name then see the server string command.
1372 tt( No comment string)
1375 tt( comment = Fred's Files)
1378 dit(bf(config file (G)))
1380 This allows you to override the config file to use, instead of the
1381 default (usually bf(smb.conf)). There is a chicken and egg problem
1382 here as this option is set in the config file!
1384 For this reason, if the name of the config file has changed when the
1385 parameters are loaded then it will reload them from the new config
1388 This option takes the usual substitutions, which can be very useful.
1390 If the config file doesn't exist then it won't be loaded (allowing you
1391 to special case the config files of just a few clients).
1394 tt( config file = /usr/local/samba/lib/smb.conf.%m)
1399 This parameter allows you to em('clone') service entries. The specified
1400 service is simply duplicated under the current service's name. Any
1401 parameters specified in the current section will override those in the
1402 section being copied.
1404 This feature lets you set up a 'template' service and create similar
1405 services easily. Note that the service being copied must occur earlier
1406 in the configuration file than the service doing the copying.
1412 tt( copy = otherservice)
1415 dit(bf(create mask (S)))
1417 A synonym for this parameter is link(bf('create mode'))(createmode).
1419 When a file is created, the neccessary permissions are calculated
1420 according to the mapping from DOS modes to UNIX permissions, and the
1421 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1422 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1423 of a file. Any bit em(*not*) set here will be removed from the modes set
1424 on a file when it is created.
1426 The default value of this parameter removes the 'group' and 'other'
1427 write and execute bits from the UNIX modes.
1429 Following this Samba will bit-wise 'OR' the UNIX mode created from
1430 this parameter with the value of the "force create mode" parameter
1431 which is set to 000 by default.
1433 This parameter does not affect directory modes. See the parameter
1434 link(bf('directory mode'))(directorymode) for details.
1436 See also the link(bf("force create mode"))(forcecreatemode) parameter
1437 for forcing particular mode bits to be set on created files. See also
1438 the link(bf("directory mode"))(directorymode) parameter for masking
1439 mode bits on created directories.
1442 tt( create mask = 0744)
1445 tt( create mask = 0775)
1448 dit(bf(create mode (S)))
1450 This is a synonym for link(bf(create mask))(createmask).
1453 dit(bf(deadtime (G)))
1455 The value of the parameter (a decimal integer) represents the number
1456 of minutes of inactivity before a connection is considered dead, and
1457 it is disconnected. The deadtime only takes effect if the number of
1460 This is useful to stop a server's resources being exhausted by a large
1461 number of inactive connections.
1463 Most clients have an auto-reconnect feature when a connection is
1464 broken so in most cases this parameter should be transparent to users.
1466 Using this parameter with a timeout of a few minutes is recommended
1469 A deadtime of zero indicates that no auto-disconnection should be
1478 label(debug timestamp (G))
1480 Samba2.0 debug log messages are timestamped by default. If you are
1481 running at a high link(bf("debug level"))(debuglevel) these timestamps
1482 can be distracting. This boolean parameter allows them to be turned
1486 tt( debug timestamp = Yes)
1489 tt( debug timestamp = No)
1492 dit(bf(debug level (G)))
1494 The value of the parameter (an integer) allows the debug level
1495 (logging level) to be specified in the bf(smb.conf) file. This is to
1496 give greater flexibility in the configuration of the system.
1498 The default will be the debug level specified on the command line
1499 or level zero if none was specified.
1502 tt( debug level = 3)
1505 dit(bf(default (G)))
1507 A synonym for link(bf(default service))(defaultservice).
1510 dit(bf(default case (S)))
1512 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING). Also note
1513 the link(bf("short preserve case"))(shortpreservecase) parameter.
1515 label(default service)
1516 dit(bf(default service (G)))
1518 This parameter specifies the name of a service which will be connected
1519 to if the service actually requested cannot be found. Note that the
1520 square brackets are em(NOT) given in the parameter value (see example
1523 There is no default value for this parameter. If this parameter is not
1524 given, attempting to connect to a nonexistent service results in an
1527 Typically the default service would be a link(bf(guest ok))(guestok),
1528 link(bf(read-only))(readonly) service.
1530 Also note that the apparent service name will be changed to equal that
1531 of the requested service, this is very useful as it allows you to use
1532 macros like link(bf(%S))(percentS) to make a wildcard service.
1534 Note also that any tt('_') characters in the name of the service used
1535 in the default service will get mapped to a tt('/'). This allows for
1541 default service = pub
1547 label(deletereadonly)
1548 dit(bf(delete readonly (S)))
1550 This parameter allows readonly files to be deleted. This is not
1551 normal DOS semantics, but is allowed by UNIX.
1553 This option may be useful for running applications such as rcs, where
1554 UNIX file ownership prevents changing file permissions, and DOS
1555 semantics prevent deletion of a read only file.
1558 tt( delete readonly = No)
1561 tt( delete readonly = Yes)
1563 label(deletevetofiles)
1564 dit(bf(delete veto files (S)))
1566 This option is used when Samba is attempting to delete a directory
1567 that contains one or more vetoed directories (see the link(bf('veto
1568 files'))(vetofiles) option). If this option is set to False (the
1569 default) then if a vetoed directory contains any non-vetoed files or
1570 directories then the directory delete will fail. This is usually what
1573 If this option is set to True, then Samba will attempt to recursively
1574 delete any files and directories within the vetoed directory. This can
1575 be useful for integration with file serving systems such as bf(NetAtalk),
1576 which create meta-files within directories you might normally veto
1577 DOS/Windows users from seeing (eg. tt(.AppleDouble))
1579 Setting tt('delete veto files = True') allows these directories to be
1580 transparently deleted when the parent directory is deleted (so long
1581 as the user has permissions to do so).
1583 See also the link(bf(veto files))(vetofiles) parameter.
1586 tt( delete veto files = False)
1589 tt( delete veto files = True)
1592 dit(bf(deny hosts (S)))
1594 The opposite of link(bf('allow hosts'))(allowhosts) - hosts listed
1595 here are em(NOT) permitted access to services unless the specific
1596 services have their own lists to override this one. Where the lists
1597 conflict, the link(bf('allow'))(allowhosts) list takes precedence.
1600 tt( none (i.e., no hosts specifically excluded))
1603 tt( deny hosts = 150.203.4. badhost.mynet.edu.au)
1606 dit(bf(dfree command (G)))
1608 The dfree command setting should only be used on systems where a
1609 problem occurs with the internal disk space calculations. This has
1610 been known to happen with Ultrix, but may occur with other operating
1611 systems. The symptom that was seen was an error of "Abort Retry
1612 Ignore" at the end of each directory listing.
1614 This setting allows the replacement of the internal routines to
1615 calculate the total disk space and amount available with an external
1616 routine. The example below gives a possible script that might fulfill
1619 The external program will be passed a single parameter indicating a
1620 directory in the filesystem being queried. This will typically consist
1621 of the string tt("./"). The script should return two integers in
1622 ascii. The first should be the total disk space in blocks, and the
1623 second should be the number of available blocks. An optional third
1624 return value can give the block size in bytes. The default blocksize
1627 Note: Your script should em(NOT) be setuid or setgid and should be
1628 owned by (and writable only by) root!
1631 tt( By default internal routines for determining the disk capacity
1632 and remaining space will be used.)
1635 tt( dfree command = /usr/local/samba/bin/dfree)
1637 Where the script dfree (which must be made executable) could be:
1641 df $1 | tail -1 | awk '{print $2" "$4}'
1644 or perhaps (on Sys V based systems):
1648 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1651 Note that you may have to replace the command names with full
1652 path names on some systems.
1655 dit(bf(directory (S)))
1657 Synonym for link(bf(path))(path).
1659 label(directorymask)
1660 dit(bf(directory mask (S)))
1662 This parameter is the octal modes which are used when converting DOS
1663 modes to UNIX modes when creating UNIX directories.
1665 When a directory is created, the neccessary permissions are calculated
1666 according to the mapping from DOS modes to UNIX permissions, and the
1667 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1668 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1669 of a directory. Any bit em(*not*) set here will be removed from the
1670 modes set on a directory when it is created.
1672 The default value of this parameter removes the 'group' and 'other'
1673 write bits from the UNIX mode, allowing only the user who owns the
1674 directory to modify it.
1676 Following this Samba will bit-wise 'OR' the UNIX mode created from
1677 this parameter with the value of the "force directory mode"
1678 parameter. This parameter is set to 000 by default (ie. no extra mode
1681 See the link(bf("force directory mode"))(forcedirectorymode) parameter
1682 to cause particular mode bits to always be set on created directories.
1684 See also the link(bf("create mode"))(createmode) parameter for masking
1685 mode bits on created files.
1688 tt( directory mask = 0755)
1691 tt( directory mask = 0775)
1693 label(directorymode)
1694 dit(bf(directory mode (S)))
1696 Synonym for link(bf(directory mask))(directorymask).
1699 dit(bf(dns proxy (G)))
1701 Specifies that url(bf(nmbd))(nmbd.8.html) when acting as a WINS
1702 server and finding that a NetBIOS name has not been registered, should
1703 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1704 with the DNS server for that name on behalf of the name-querying
1707 Note that the maximum length for a NetBIOS name is 15 characters, so
1708 the DNS name (or DNS alias) can likewise only be 15 characters,
1711 url(bf(nmbd))(nmbd.8.html) spawns a second copy of itself to do the
1712 DNS name lookup requests, as doing a name lookup is a blocking action.
1714 See also the parameter link(bf(wins support))(winssupport).
1717 tt( dns proxy = yes)
1719 label(domainadmingroup)
1720 bf(domain admin group (G))
1722 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1723 Samba NT Domain Controller Code. It may be removed in a later release.
1724 To work with the latest code builds that may have more support for
1725 Samba NT Domain Controller functionality please subscibe to the
1726 mailing list bf(Samba-ntdom) available by sending email to
1727 email(listproc@samba.anu.edu.au)
1729 label(domainadminusers)
1730 dit(bf(domain admin users)
1732 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1733 Samba NT Domain Controller Code. It may be removed in a later release.
1734 To work with the latest code builds that may have more support for
1735 Samba NT Domain Controller functionality please subscibe to the
1736 mailing list bf(Samba-ntdom) available by sending email to
1737 email(listproc@samba.anu.edu.au)
1739 label(domain controller)
1740 dit(bf(domain controller (G)))
1742 This is a bf(DEPRECATED) parameter. It is currently not used within
1743 the Samba source and should be removed from all current smb.conf
1744 files. It is left behind for compatibility reasons.
1747 dit(bf(domain groups (G)))
1749 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1750 Samba NT Domain Controller Code. It may be removed in a later release.
1751 To work with the latest code builds that may have more support for
1752 Samba NT Domain Controller functionality please subscibe to the
1753 mailing list bf(Samba-ntdom) available by sending email to
1754 email(listproc@samba.anu.edu.au)
1756 label(domainguestgroup)
1757 dit(bf(domain guest group (G)))
1759 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1760 Samba NT Domain Controller Code. It may be removed in a later release.
1761 To work with the latest code builds that may have more support for
1762 Samba NT Domain Controller functionality please subscibe to the
1763 mailing list bf(Samba-ntdom) available by sending email to
1764 email(listproc@samba.anu.edu.au)
1766 label(domainguestusers)
1767 dit(bf(domain guest users (G)))
1769 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1770 Samba NT Domain Controller Code. It may be removed in a later release.
1771 To work with the latest code builds that may have more support for
1772 Samba NT Domain Controller functionality please subscibe to the
1773 mailing list bf(Samba-ntdom) available by sending email to
1774 email(listproc@samba.anu.edu.au)
1777 dit(bf(domain logons (G)))
1779 If set to true, the Samba server will serve Windows 95/98 Domain
1780 logons for the link(bf(workgroup))(workgroup) it is in. For more
1781 details on setting up this feature see the file DOMAINS.txt in the
1782 Samba documentation directory tt(docs/) shipped with the source code.
1784 Note that Win95/98 Domain logons are em(NOT) the same as Windows
1785 NT Domain logons. NT Domain logons require a Primary Domain Controller
1786 (PDC) for the Domain. It is inteded that in a future release Samba
1787 will be able to provide this functionality for Windows NT clients
1791 tt( domain logons = no)
1794 dit(bf(domain master (G)))
1796 Tell url(bf(nmbd))(nmbd.8.html) to enable WAN-wide browse list
1797 collation.Setting this option causes url(bf(nmbd))(nmbd.8.html) to
1798 claim a special domain specific NetBIOS name that identifies it as a
1799 domain master browser for its given
1800 link(bf(workgroup))(workgroup). Local master browsers in the same
1801 link(bf(workgroup))(workgroup) on broadcast-isolated subnets will give
1802 this url(bf(nmbd))(nmbd.8.html) their local browse lists, and then
1803 ask url(bf(smbd))(smbd.8.html) for a complete copy of the browse list
1804 for the whole wide area network. Browser clients will then contact
1805 their local master browser, and will receive the domain-wide browse
1806 list, instead of just the list for their broadcast-isolated subnet.
1808 Note that Windows NT Primary Domain Controllers expect to be able to
1809 claim this link(bf(workgroup))(workgroup) specific special NetBIOS
1810 name that identifies them as domain master browsers for that
1811 link(bf(workgroup))(workgroup) by default (ie. there is no way to
1812 prevent a Windows NT PDC from attempting to do this). This means that
1813 if this parameter is set and url(bf(nmbd))(nmbd.8.html) claims the
1814 special name for a link(bf(workgroup))(workgroup) before a Windows NT
1815 PDC is able to do so then cross subnet browsing will behave strangely
1819 tt( domain master = no)
1822 dit(bf(dont descend (S)))
1824 There are certain directories on some systems (eg., the tt(/proc) tree
1825 under Linux) that are either not of interest to clients or are
1826 infinitely deep (recursive). This parameter allows you to specify a
1827 comma-delimited list of directories that the server should always show
1830 Note that Samba can be very fussy about the exact format of the "dont
1831 descend" entries. For example you may need tt("./proc") instead of
1832 just tt("/proc"). Experimentation is the best policy :-)
1835 tt( none (i.e., all directories are OK to descend))
1838 tt( dont descend = /proc,/dev)
1840 label(dosfiletimeresolution)
1841 dit(bf(dos filetime resolution (S)))
1843 Under the DOS and Windows FAT filesystem, the finest granulatity on
1844 time resolution is two seconds. Setting this parameter for a share
1845 causes Samba to round the reported time down to the nearest two second
1846 boundary when a query call that requires one second resolution is made
1847 to url(bf(smbd))(smbd.8.html).
1849 This option is mainly used as a compatibility option for Visual C++
1850 when used against Samba shares. If oplocks are enabled on a share,
1851 Visual C++ uses two different time reading calls to check if a file
1852 has changed since it was last read. One of these calls uses a
1853 one-second granularity, the other uses a two second granularity. As
1854 the two second call rounds any odd second down, then if the file has a
1855 timestamp of an odd number of seconds then the two timestamps will not
1856 match and Visual C++ will keep reporting the file has changed. Setting
1857 this option causes the two timestamps to match, and Visual C++ is
1861 tt( dos filetime resolution = False)
1864 tt( dos filetime resolution = True)
1866 label(dos filetimes)
1867 dit(bf(dos filetimes (S)))
1869 Under DOS and Windows, if a user can write to a file they can change
1870 the timestamp on it. Under POSIX semantics, only the owner of the file
1871 or root may change the timestamp. By default, Samba runs with POSIX
1872 semantics and refuses to change the timestamp on a file if the user
1873 smbd is acting on behalf of is not the file owner. Setting this option
1874 to True allows DOS semantics and smbd will change the file timstamp as
1878 tt( dos filetimes = False)
1881 tt( dos filetimes = True)
1883 label(encryptpasswords)
1884 dit(bf(encrypt passwords (G)))
1886 This boolean controls whether encrypted passwords will be negotiated
1887 with the client. Note that Windows NT 4.0 SP3 and above and also
1888 Windows 98 will by default expect encrypted passwords unless a
1889 registry entry is changed. To use encrypted passwords in Samba see the
1890 file ENCRYPTION.txt in the Samba documentation directory tt(docs/)
1891 shipped with the source code.
1893 In order for encrypted passwords to work correctly
1894 url(bf(smbd))(smbd.8.html) must either have access to a local
1895 url(bf(smbpasswd (5)))(smbpasswd.5.html) file (see the
1896 url(bf(smbpasswd (8)))(smbpasswd.8.html) program for information on
1897 how to set up and maintain this file), or set the
1898 link(bf(security=))(security) parameter to either em("server") or
1899 em("domain") which causes url(bf(smbd))(smbd.8.html) to authenticate
1900 against another server.
1905 This is a synonym for link(bf(preexec))(preexec).
1907 label(fake directory create times)
1908 dit(bf(fake directory create times (S)))
1910 NTFS and Windows VFAT file systems keep a create time for all files
1911 and directories. This is not the same as the ctime - status change
1912 time - that Unix keeps, so Samba by default reports the earliest of
1913 the various times Unix does keep. Setting this parameter for a share
1914 causes Samba to always report midnight 1-1-1980 as the create time for
1917 This option is mainly used as a compatibility option for Visual C++
1918 when used against Samba shares. Visual C++ generated makefiles have
1919 the object directory as a dependency for each object file, and a make
1920 rule to create the directory. Also, when NMAKE compares timestamps it
1921 uses the creation time when examining a directory. Thus the object
1922 directory will be created if it does not exist, but once it does exist
1923 it will always have an earlier timestamp than the object files it
1926 However, Unix time semantics mean that the create time reported by
1927 Samba will be updated whenever a file is created or deleted in the
1928 directory. NMAKE therefore finds all object files in the object
1929 directory bar the last one built are out of date compared to the
1930 directory and rebuilds them. Enabling this option ensures directories
1931 always predate their contents and an NMAKE build will proceed as
1935 tt( fake directory create times = False)
1938 tt( fake directory create times = True)
1941 dit(bf(fake oplocks (S)))
1943 Oplocks are the way that SMB clients get permission from a server to
1944 locally cache file operations. If a server grants an oplock
1945 (opportunistic lock) then the client is free to assume that it is the
1946 only one accessing the file and it will aggressively cache file
1947 data. With some oplock types the client may even cache file open/close
1948 operations. This can give enormous performance benefits.
1950 When you set tt("fake oplocks = yes") url(bf(smbd))(smbd.8.html) will
1951 always grant oplock requests no matter how many clients are using the
1954 It is generally much better to use the real link(bf(oplock))(oplock)
1955 support rather than this parameter.
1957 If you enable this option on all read-only shares or shares that you
1958 know will only be accessed from one client at a time such as
1959 physically read-only media like CDROMs, you will see a big performance
1960 improvement on many operations. If you enable this option on shares
1961 where multiple clients may be accessing the files read-write at the
1962 same time you can get data corruption. Use this option carefully!
1964 This option is disabled by default.
1966 label(followsymlinks)
1967 dit(bf(follow symlinks (S)))
1969 This parameter allows the Samba administrator to stop
1970 url(bf(smbd))(smbd.8.html) from following symbolic links in a
1971 particular share. Setting this parameter to em("No") prevents any file
1972 or directory that is a symbolic link from being followed (the user
1973 will get an error). This option is very useful to stop users from
1974 adding a symbolic link to tt(/etc/pasword) in their home directory for
1975 instance. However it will slow filename lookups down slightly.
1977 This option is enabled (ie. url(bf(smbd))(smbd.8.html) will follow
1978 symbolic links) by default.
1980 label(forcecreatemode)
1981 dit(bf(force create mode (S)))
1983 This parameter specifies a set of UNIX mode bit permissions that will
1984 em(*always*) be set on a file created by Samba. This is done by
1985 bitwise 'OR'ing these bits onto the mode bits of a file that is being
1986 created. The default for this parameter is (in octel) 000. The modes
1987 in this parameter are bitwise 'OR'ed onto the file mode after the mask
1988 set in the link(bf("create mask"))(createmark) parameter is applied.
1990 See also the parameter link(bf("create mask"))(createmask) for details
1991 on masking mode bits on created files.
1994 tt( force create mode = 000)
1997 tt( force create mode = 0755)
1999 would force all created files to have read and execute permissions set
2000 for 'group' and 'other' as well as the read/write/execute bits set for
2003 label(forcedirectorymode)
2004 dit(bf(force directory mode (S)))
2006 This parameter specifies a set of UNIX mode bit permissions that will
2007 em(*always*) be set on a directory created by Samba. This is done by
2008 bitwise 'OR'ing these bits onto the mode bits of a directory that is
2009 being created. The default for this parameter is (in octel) 0000 which
2010 will not add any extra permission bits to a created directory. This
2011 operation is done after the mode mask in the parameter
2012 link(bf("directory mask"))(directorymask) is applied.
2014 See also the parameter link(bf("directory mask"))(directorymask) for
2015 details on masking mode bits on created directories.
2018 tt( force directory mode = 000)
2021 tt( force directory mode = 0755)
2023 would force all created directories to have read and execute
2024 permissions set for 'group' and 'other' as well as the
2025 read/write/execute bits set for the 'user'.
2028 dit(bf(force group (S)))
2030 This specifies a UNIX group name that will be assigned as the default
2031 primary group for all users connecting to this service. This is useful
2032 for sharing files by ensuring that all access to files on service will
2033 use the named group for their permissions checking. Thus, by assigning
2034 permissions for this group to the files and directories within this
2035 service the Samba administrator can restrict or allow sharing of these
2039 tt( no forced group)
2042 tt( force group = agroup)
2045 dit(bf(force user (S)))
2047 This specifies a UNIX user name that will be assigned as the default
2048 user for all users connecting to this service. This is useful for
2049 sharing files. You should also use it carefully as using it
2050 incorrectly can cause security problems.
2052 This user name only gets used once a connection is established. Thus
2053 clients still need to connect as a valid user and supply a valid
2054 password. Once connected, all file operations will be performed as the
2055 tt("forced user"), no matter what username the client connected as.
2057 This can be very useful.
2063 tt( force user = auser)
2068 This parameter allows the administrator to configure the string that
2069 specifies the type of filesystem a share is using that is reported by
2070 url(bf(smbd))(smbd.8.html) when a client queries the filesystem type
2071 for a share. The default type is bf("NTFS") for compatibility with
2072 Windows NT but this can be changed to other strings such as "Samba" or
2082 dit(bf(getwd cache (G)))
2084 This is a tuning option. When this is enabled a cacheing algorithm
2085 will be used to reduce the time taken for getwd() calls. This can have
2086 a significant impact on performance, especially when the
2087 link(bf(widelinks))(widelinks) parameter is set to False.
2090 tt( getwd cache = No)
2093 tt( getwd cache = Yes
2098 Synonym for link(bf("force group"))(forcegroup).
2101 dit(bf(guest account (S)))
2103 This is a username which will be used for access to services which are
2104 specified as link(bf('guest ok'))(guestok) (see below). Whatever
2105 privileges this user has will be available to any client connecting to
2106 the guest service. Typically this user will exist in the password
2107 file, but will not have a valid login. The user account bf("ftp") is
2108 often a good choice for this parameter. If a username is specified in
2109 a given service, the specified username overrides this one.
2111 One some systems the default guest account "nobody" may not be able to
2112 print. Use another account in this case. You should test this by
2113 trying to log in as your guest user (perhaps by using the tt("su -")
2114 command) and trying to print using the system print command such as
2115 bf(lpr (1)) or bf(lp (1)).
2118 tt( specified at compile time, usually "nobody")
2121 tt( guest account = ftp)
2124 dit(bf(guest ok (S)))
2126 If this parameter is em('yes') for a service, then no password is
2127 required to connect to the service. Privileges will be those of the
2128 link(bf(guest account))(guestaccount).
2130 See the section below on link(bf(security))(security) for more
2131 information about this option.
2140 dit(bf(guest only (S)))
2142 If this parameter is em('yes') for a service, then only guest
2143 connections to the service are permitted. This parameter will have no
2144 affect if link(bf("guest ok"))(guestok) or link(bf("public"))(public)
2145 is not set for the service.
2147 See the section below on link(bf(security))(security) for more
2148 information about this option.
2151 tt( guest only = no)
2154 tt( guest only = yes)
2157 dit(bf(hide dot files (S)))
2159 This is a boolean parameter that controls whether files starting with
2160 a dot appear as hidden files.
2163 tt( hide dot files = yes)
2166 tt( hide dot files = no)
2170 dit(bf(hide files(S)))
2172 This is a list of files or directories that are not visible but are
2173 accessible. The DOS 'hidden' attribute is applied to any files or
2174 directories that match.
2176 Each entry in the list must be separated by a tt('/'), which allows
2177 spaces to be included in the entry. tt('*') and tt('?') can be used
2178 to specify multiple files or directories as in DOS wildcards.
2180 Each entry must be a unix path, not a DOS path and must not include the
2181 unix directory separator tt('/').
2183 Note that the case sensitivity option is applicable in hiding files.
2185 Setting this parameter will affect the performance of Samba, as it
2186 will be forced to check all files and directories for a match as they
2189 See also link(bf("hide dot files"))(hidedotfiles), link(bf("veto
2190 files"))(vetofiles) and link(bf("case sensitive"))(casesensitive).
2194 No files or directories are hidden by this option (dot files are
2195 hidden by default because of the "hide dot files" option).
2199 tt( hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/)
2201 The above example is based on files that the Macintosh SMB client
2202 (DAVE) available from url(bf(Thursby))(www.thursby.com) creates for
2203 internal use, and also still hides all files beginning with a dot.
2206 dit(bf(homedir map (G)))
2208 If link(bf("nis homedir"))(nishomedir) is true, and
2209 url(bf(smbd))(smbd.8.html) is also acting as a Win95/98 link(bf(logon
2210 server))(domainlogons) then this parameter specifies the NIS (or YP)
2211 map from which the server for the user's home directory should be
2212 extracted. At present, only the Sun auto.home map format is
2213 understood. The form of the map is:
2215 tt(username server:/some/file/system)
2217 and the program will extract the servername from before the first
2218 tt(':'). There should probably be a better parsing system that copes
2219 with different map formats and also Amd (another automounter) maps.
2221 NB: A working NIS is required on the system for this option to work.
2223 See also link(bf("nis homedir"))(nishomedir), link(bf(domain
2224 logons))(domainlogons).
2227 tt( homedir map = auto.home)
2230 tt( homedir map = amd.homedir)
2233 dit(bf(hosts allow (S)))
2235 Synonym for link(bf(allow hosts))(allowhosts).
2238 dit(bf(hosts deny (S)))
2240 Synonym for link(bf(denyhosts))(denyhosts).
2243 dit(bf(hosts equiv (G)))
2245 If this global parameter is a non-null string, it specifies the name
2246 of a file to read for the names of hosts and users who will be allowed
2247 access without specifying a password.
2249 This is not be confused with link(bf(allow hosts))(allowhosts) which
2250 is about hosts access to services and is more useful for guest
2251 services. bf(hosts equiv) may be useful for NT clients which will not
2252 supply passwords to samba.
2254 NOTE: The use of bf(hosts equiv) can be a major security hole. This is
2255 because you are trusting the PC to supply the correct username. It is
2256 very easy to get a PC to supply a false username. I recommend that the
2257 bf(hosts equiv) option be only used if you really know what you are
2258 doing, or perhaps on a home network where you trust your spouse and
2259 kids. And only if you em(really) trust them :-).
2262 tt( No host equivalences)
2265 tt( hosts equiv = /etc/hosts.equiv)
2268 dit(bf(include (G)))
2270 This allows you to include one config file inside another. The file
2271 is included literally, as though typed in place.
2273 It takes the standard substitutions, except link(bf(%u))(percentu),
2274 link(bf(%P))(percentP) and link(bf(%S))(percentS).
2277 dit(bf(interfaces (G)))
2279 This option allows you to setup multiple network interfaces, so that
2280 Samba can properly handle browsing on all interfaces.
2282 The option takes a list of ip/netmask pairs. The netmask may either be
2283 a bitmask, or a bitlength.
2285 For example, the following line:
2287 tt(interfaces = 192.168.2.10/24 192.168.3.10/24)
2289 would configure two network interfaces with IP addresses 192.168.2.10
2290 and 192.168.3.10. The netmasks of both interfaces would be set to
2293 You could produce an equivalent result by using:
2295 tt(interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0)
2297 if you prefer that format.
2299 If this option is not set then Samba will attempt to find a primary
2300 interface, but won't attempt to configure more than one interface.
2302 See also link(bf("bind interfaces only"))(bindinterfacesonly).
2305 dit(bf(invalid users (S)))
2307 This is a list of users that should not be allowed to login to this
2308 service. This is really a em("paranoid") check to absolutely ensure an
2309 improper setting does not breach your security.
2311 A name starting with a tt('@') is interpreted as an NIS netgroup first
2312 (if your system supports NIS), and then as a UNIX group if the name
2313 was not found in the NIS netgroup database.
2315 A name starting with tt('+') is interpreted only by looking in the
2316 UNIX group database. A name starting with tt('&') is interpreted only
2317 by looking in the NIS netgroup database (this requires NIS to be
2318 working on your system). The characters tt('+') and tt('&') may be
2319 used at the start of the name in either order so the value
2320 tt("+&group") means check the UNIX group database, followed by the NIS
2321 netgroup database, and the value tt("&+group") means check the NIS
2322 netgroup database, followed by the UNIX group database (the same as
2323 the tt('@') prefix).
2325 The current servicename is substituted for
2326 link(bf(%S))(percentS). This is useful in the link(bf([homes]))(homes)
2329 See also link(bf("valid users"))(validusers).
2332 tt( No invalid users)
2335 tt( invalid users = root fred admin @wheel)
2338 dit(bf(keepalive (G)))
2340 The value of the parameter (an integer) represents the number of
2341 seconds between bf('keepalive') packets. If this parameter is zero, no
2342 keepalive packets will be sent. Keepalive packets, if sent, allow the
2343 server to tell whether a client is still present and responding.
2345 Keepalives should, in general, not be needed if the socket being used
2346 has the SO_KEEPALIVE attribute set on it (see link(bf("socket
2347 options"))(socketoptions)). Basically you should only use this option
2348 if you strike difficulties.
2354 tt( keep alive = 60)
2356 label(kerneloplocks)
2357 dit(bf(kernel oplocks (G)))
2359 For UNIXs that support kernel based oplocks (currently only IRIX but
2360 hopefully also Linux and FreeBSD soon) this parameter allows the use
2361 of them to be turned on or off.
2363 Kernel oplocks support allows Samba oplocks to be broken whenever a
2364 local UNIX process or NFS operation accesses a file that
2365 url(bf(smbd))(smbd.8.html) has oplocked. This allows complete data
2366 consistancy between SMB/CIFS, NFS and local file access (and is a
2367 em(very) cool feature :-).
2369 This parameter defaults to em("On") on systems that have the support,
2370 and em("off") on systems that don't. You should never need to touch
2374 dit(bf(ldap filter (G)))
2376 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2377 password database stored on an LDAP server back-end. These options
2378 are only available if your version of Samba was configured with
2379 the bf(--with-ldap) option.
2381 This parameter specifies an LDAP search filter used to search for a
2382 user name in the LDAP database. It must contain the string
2383 link(bf(%u))(percentU) which will be replaced with the user being
2390 dit(bf(ldap port (G)))
2392 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2393 password database stored on an LDAP server back-end. These options
2394 are only available if your version of Samba was configured with
2395 the bf(--with-ldap) option.
2397 This parameter specifies the TCP port number to use to contact
2401 tt( ldap port = 389.)
2404 dit(bf(ldap root (G)))
2406 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2407 password database stored on an LDAP server back-end. These options
2408 are only available if your version of Samba was configured with
2409 the bf(--with-ldap) option.
2411 This parameter specifies the entity to bind to the LDAP server
2412 as (essentially the LDAP username) in order to be able to perform
2413 queries and modifications on the LDAP database.
2415 See also link(bf(ldap root passwd))(ldaprootpasswd).
2418 tt( empty string (no user defined))
2420 label(ldaprootpasswd)
2421 dit(bf(ldap root passwd (G)))
2423 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2424 password database stored on an LDAP server back-end. These options
2425 are only available if your version of Samba was configured with
2426 the bf(--with-ldap) option.
2428 This parameter specifies the password for the entity to bind to the
2429 LDAP server as (the password for this LDAP username) in order to be
2430 able to perform queries and modifications on the LDAP database.
2432 em(BUGS:) This parameter should em(NOT) be a readable parameter
2433 in the bf(smb.conf) file and will be removed once a correct
2434 storage place is found.
2436 See also link(bf(ldap root))(ldaproot).
2442 dit(bf(ldap server (G)))
2444 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2445 password database stored on an LDAP server back-end. These options
2446 are only available if your version of Samba was configured with
2447 the bf(--with-ldap) option.
2449 This parameter specifies the DNS name of the LDAP server to use
2450 for SMB/CIFS authentication purposes.
2453 tt( ldap server = localhost)
2456 dit(bf(ldap suffix (G)))
2458 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2459 password database stored on an LDAP server back-end. These options
2460 are only available if your version of Samba was configured with
2461 the bf(--with-ldap) option.
2463 This parameter specifies the tt("dn") or LDAP em("distinguished name")
2464 that tells url(bf(smbd))(smbd.8.html) to start from when searching
2465 for an entry in the LDAP password database.
2471 dit(bf(lm announce (G)))
2473 This parameter determines if url(bf(nmbd))(nmbd.8.html) will produce
2474 Lanman announce broadcasts that are needed by bf(OS/2) clients in order
2475 for them to see the Samba server in their browse list. This parameter
2476 can have three values, tt("true"), tt("false"), or tt("auto"). The
2477 default is tt("auto"). If set to tt("false") Samba will never produce
2478 these broadcasts. If set to tt("true") Samba will produce Lanman
2479 announce broadcasts at a frequency set by the parameter link(bf("lm
2480 interval"))(lminterval). If set to tt("auto") Samba will not send Lanman
2481 announce broadcasts by default but will listen for them. If it hears
2482 such a broadcast on the wire it will then start sending them at a
2483 frequency set by the parameter link(bf("lm interval"))(lminterval).
2485 See also link(bf("lm interval"))(lminterval).
2488 tt( lm announce = auto)
2491 tt( lm announce = true)
2494 dit(bf(lm interval (G)))
2496 If Samba is set to produce Lanman announce broadcasts needed by
2497 bf(OS/2) clients (see the link(bf("lm announce"))(lmannounce)
2498 parameter) then this parameter defines the frequency in seconds with
2499 which they will be made. If this is set to zero then no Lanman
2500 announcements will be made despite the setting of the link(bf("lm
2501 announce"))(lmannounce) parameter.
2503 See also link(bf("lm announce"))(lmannounce).
2506 tt( lm interval = 60)
2509 tt( lm interval = 120)
2512 dit(bf(load printers (G)))
2514 A boolean variable that controls whether all printers in the printcap
2515 will be loaded for browsing by default. See the
2516 link(bf("printers"))(printers) section for more details.
2519 tt( load printers = yes)
2522 tt( load printers = no)
2525 dit(bf(local master (G)))
2527 This option allows url(bf(nmbd))(nmbd.8.html) to try and become a
2528 local master browser on a subnet. If set to False then
2529 url(bf(nmbd))(nmbd.8.html) will not attempt to become a local master
2530 browser on a subnet and will also lose in all browsing elections. By
2531 default this value is set to true. Setting this value to true doesn't
2532 mean that Samba will em(become) the local master browser on a subnet,
2533 just that url(bf(nmbd))(nmbd.8.html) will em(participate) in
2534 elections for local master browser.
2536 Setting this value to False will cause url(bf(nmbd))(nmbd.8.html)
2537 em(never) to become a local master browser.
2540 tt( local master = yes)
2542 label(lockdirectory)
2543 dit(bf(lock directory (G)))
2545 This option specifies the directory where lock files will be placed.
2546 The lock files are used to implement the link(bf("max
2547 connections"))(maxconnections) option.
2550 tt( lock directory = /tmp/samba)
2553 tt( lock directory = /usr/local/samba/var/locks)
2556 dit(bf(locking (S)))
2558 This controls whether or not locking will be performed by the server
2559 in response to lock requests from the client.
2561 If tt("locking = no"), all lock and unlock requests will appear to
2562 succeed and all lock queries will indicate that the queried lock is
2565 If tt("locking = yes"), real locking will be performed by the server.
2567 This option em(may) be useful for read-only filesystems which em(may)
2568 not need locking (such as cdrom drives), although setting this
2569 parameter of tt("no") is not really recommended even in this case.
2571 Be careful about disabling locking either globally or in a specific
2572 service, as lack of locking may result in data corruption. You should
2573 never need to set this parameter.
2582 dit(bf(log file (G)))
2584 This options allows you to override the name of the Samba log file
2585 (also known as the debug file).
2587 This option takes the standard substitutions, allowing you to have
2588 separate log files for each user or machine.
2591 tt( log file = /usr/local/samba/var/log.%m)
2594 dit(bf(log level (G)))
2596 Synonym for link(bf("debug level"))(debuglevel).
2599 dit(bf(logon drive (G)))
2601 This parameter specifies the local path to which the home directory
2602 will be connected (see link(bf("logon home"))(logonhome)) and is only
2603 used by NT Workstations.
2605 Note that this option is only useful if Samba is set up as a
2606 link(bf(logon server))(domainlogons).
2609 tt( logon drive = h:)
2612 dit(bf(logon home (G)))
2614 This parameter specifies the home directory location when a Win95/98 or
2615 NT Workstation logs into a Samba PDC. It allows you to do
2617 tt("NET USE H: /HOME")
2619 from a command prompt, for example.
2621 This option takes the standard substitutions, allowing you to have
2622 separate logon scripts for each user or machine.
2624 Note that this option is only useful if Samba is set up as a
2625 link(bf(logon server))(domainlogons).
2628 tt( logon home = "\\remote_smb_server\%U")
2631 tt( logon home = "\\%N\%U")
2634 dit(bf(logon path (G)))
2636 This parameter specifies the home directory where roaming profiles
2637 (USER.DAT / USER.MAN files for Windows 95/98) are stored.
2639 This option takes the standard substitutions, allowing you to have
2640 separate logon scripts for each user or machine. It also specifies
2641 the directory from which the tt("desktop"), tt("start menu"),
2642 tt("network neighborhood") and tt("programs") folders, and their
2643 contents, are loaded and displayed on your Windows 95/98 client.
2645 The share and the path must be readable by the user for the
2646 preferences and directories to be loaded onto the Windows 95/98
2647 client. The share must be writeable when the logs in for the first
2648 time, in order that the Windows 95/98 client can create the user.dat
2649 and other directories.
2651 Thereafter, the directories and any of contents can, if required, be
2652 made read-only. It is not adviseable that the USER.DAT file be made
2653 read-only - rename it to USER.MAN to achieve the desired effect (a
2654 em(MAN)datory profile).
2656 Windows clients can sometimes maintain a connection to the [homes]
2657 share, even though there is no user logged in. Therefore, it is vital
2658 that the logon path does not include a reference to the homes share
2659 (i.e setting this parameter to tt(\\%N\HOMES\profile_path) will cause
2662 This option takes the standard substitutions, allowing you to have
2663 separate logon scripts for each user or machine.
2665 Note that this option is only useful if Samba is set up as a
2666 link(bf(logon server))(domainlogons).
2669 tt( logon path = \\%N\%U\profile)
2672 tt( logon path = \\PROFILESERVER\HOME_DIR\%U\PROFILE)
2675 dit(bf(logon script (G)))
2677 This parameter specifies the batch file (.bat) or NT command file
2678 (.cmd) to be downloaded and run on a machine when a user successfully
2679 logs in. The file must contain the DOS style cr/lf line endings.
2680 Using a DOS-style editor to create the file is recommended.
2682 The script must be a relative path to the tt([netlogon]) service. If
2683 the tt([netlogon]) service specifies a link(bf(path))(path) of
2684 /usr/local/samba/netlogon, and logon script = STARTUP.BAT, then the
2685 file that will be downloaded is:
2687 tt(/usr/local/samba/netlogon/STARTUP.BAT)
2689 The contents of the batch file is entirely your choice. A suggested
2690 command would be to add tt(NET TIME \\SERVER /SET /YES), to force every
2691 machine to synchronise clocks with the same time server. Another use
2692 would be to add tt(NET USE U: \\SERVER\UTILS) for commonly used
2693 utilities, or tt(NET USE Q: \\SERVER\ISO9001_QA) for example.
2695 Note that it is particularly important not to allow write access to
2696 the tt([netlogon]) share, or to grant users write permission on the
2697 batch files in a secure environment, as this would allow the batch
2698 files to be arbitrarily modified and security to be breached.
2700 This option takes the standard substitutions, allowing you to have
2701 separate logon scripts for each user or machine.
2703 Note that this option is only useful if Samba is set up as a
2704 link(bf(logon server))(domainlogons).
2707 tt( logon script = scripts\%U.bat)
2709 label(lppausecommand)
2710 dit(bf(lppause command (S)))
2712 This parameter specifies the command to be executed on the server host
2713 in order to stop printing or spooling a specific print job.
2715 This command should be a program or script which takes a printer name
2716 and job number to pause the print job. One way of implementing this is
2717 by using job priorities, where jobs having a too low priority won't be
2718 sent to the printer.
2720 If a tt("%p") is given then the printername is put in its place. A
2721 tt("%j") is replaced with the job number (an integer). On HPUX (see
2722 link(bf(printing=hpux))(printing)), if the tt("-p%p") option is added
2723 to the lpq command, the job will show up with the correct status,
2724 i.e. if the job priority is lower than the set fence priority it will
2725 have the PAUSED status, whereas if the priority is equal or higher it
2726 will have the SPOOLED or PRINTING status.
2728 Note that it is good practice to include the absolute path in the
2729 lppause command as the PATH may not be available to the server.
2731 See also the link(bf("printing"))(printing) parameter.
2734 Currently no default value is given to this string, unless the
2735 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2736 which case the default is :
2738 tt( lp -i %p-%j -H hold)
2740 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2741 then the default is:
2743 tt( qstat -s -j%j -h)
2745 bf(Example for HPUX:)
2746 lppause command = /usr/bin/lpalt %p-%j -p0
2749 dit(bf(lpq cache time (G)))
2751 This controls how long lpq info will be cached for to prevent the
2752 bf(lpq) command being called too often. A separate cache is kept for
2753 each variation of the bf(lpq) command used by the system, so if you
2754 use different bf(lpq) commands for different users then they won't
2755 share cache information.
2757 The cache files are stored in tt(/tmp/lpq.xxxx) where xxxx is a hash of
2758 the bf(lpq) command in use.
2760 The default is 10 seconds, meaning that the cached results of a
2761 previous identical bf(lpq) command will be used if the cached data is
2762 less than 10 seconds old. A large value may be advisable if your
2763 bf(lpq) command is very slow.
2765 A value of 0 will disable cacheing completely.
2767 See also the link(bf("printing"))(printing) parameter.
2770 tt( lpq cache time = 10)
2773 tt( lpq cache time = 30)
2776 dit(bf(lpq command (S)))
2778 This parameter specifies the command to be executed on the server host
2779 in order to obtain tt("lpq")-style printer status information.
2781 This command should be a program or script which takes a printer name
2782 as its only parameter and outputs printer status information.
2784 Currently eight styles of printer status information are supported;
2785 BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ. This covers most UNIX
2786 systems. You control which type is expected using the
2787 link(bf("printing ="))(printing) option.
2789 Some clients (notably Windows for Workgroups) may not correctly send
2790 the connection number for the printer they are requesting status
2791 information about. To get around this, the server reports on the first
2792 printer service connected to by the client. This only happens if the
2793 connection number sent is invalid.
2795 If a tt(%p) is given then the printername is put in its place. Otherwise
2796 it is placed at the end of the command.
2798 Note that it is good practice to include the absolute path in the bf(lpq
2799 command) as the PATH may not be available to the server.
2801 See also the link(bf("printing"))(printing) parameter.
2804 tt( depends on the setting of printing =)
2807 tt( lpq command = /usr/bin/lpq %p)
2809 label(lpresumecommand)
2810 dit(bf(lpresume command (S)))
2812 This parameter specifies the command to be executed on the server host
2813 in order to restart or continue printing or spooling a specific print
2816 This command should be a program or script which takes a printer name
2817 and job number to resume the print job. See also the link(bf("lppause
2818 command"))(lppausecommand) parameter.
2820 If a tt(%p) is given then the printername is put in its place. A
2821 tt(%j) is replaced with the job number (an integer).
2823 Note that it is good practice to include the absolute path in the bf(lpresume
2824 command) as the PATH may not be available to the server.
2826 See also the link(bf("printing"))(printing) parameter.
2830 Currently no default value is given to this string, unless the
2831 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2832 which case the default is :
2834 tt( lp -i %p-%j -H resume)
2836 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2837 then the default is:
2839 tt( qstat -s -j%j -r)
2841 bf(Example for HPUX:)
2842 tt( lpresume command = /usr/bin/lpalt %p-%j -p2)
2845 dit(bf(lprm command (S)))
2847 This parameter specifies the command to be executed on the server host
2848 in order to delete a print job.
2850 This command should be a program or script which takes a printer name
2851 and job number, and deletes the print job.
2853 If a tt(%p) is given then the printername is put in its place. A
2854 tt(%j) is replaced with the job number (an integer).
2856 Note that it is good practice to include the absolute path in the
2857 bf(lprm command) as the PATH may not be available to the server.
2859 See also the link(bf("printing"))(printing) parameter.
2862 tt( depends on the setting of "printing =")
2865 tt( lprm command = /usr/bin/lprm -P%p %j)
2868 tt( lprm command = /usr/bin/cancel %p-%j)
2870 label(machinepasswordtimeout)
2871 dit(bf(machine password timeout (G)))
2873 If a Samba server is a member of an Windows NT Domain (see the
2874 link(bf("security=domain"))(security)) parameter) then periodically a
2875 running url(bf(smbd))(smbd.8.html) process will try and change the
2876 bf(MACHINE ACCOUNT PASWORD) stored in the file called
2877 tt(<Domain>.<Machine>.mac) where tt(<Domain>) is the name of the
2878 Domain we are a member of and tt<Machine> is the primary
2879 link(bf("NetBIOS name"))(netbiosname) of the machine
2880 url(bf(smbd))(smbd.8.html) is running on. This parameter specifies
2881 how often this password will be changed, in seconds. The default
2882 is one week (expressed in seconds), the same as a Windows NT
2883 Domain member server.
2885 See also url(bf(smbpasswd (8)))(smbpasswd.8.html), and the
2886 link(bf("security=domain"))(security)) parameter.
2889 tt( machine password timeout = 604800)
2892 dit(bf(magic output (S)))
2894 This parameter specifies the name of a file which will contain output
2895 created by a magic script (see the link(bf("magic
2896 script"))(magicscript) parameter below).
2898 Warning: If two clients use the same link(bf("magic
2899 script"))(magicscript) in the same directory the output file content
2903 tt( magic output = <magic script name>.out)
2906 tt( magic output = myfile.txt)
2909 dit(bf(magic script (S)))
2911 This parameter specifies the name of a file which, if opened, will be
2912 executed by the server when the file is closed. This allows a UNIX
2913 script to be sent to the Samba host and executed on behalf of the
2916 Scripts executed in this way will be deleted upon completion,
2917 permissions permitting.
2919 If the script generates output, output will be sent to the file
2920 specified by the link(bf("magic output"))(magicoutput) parameter (see
2923 Note that some shells are unable to interpret scripts containing
2924 carriage-return-linefeed instead of linefeed as the end-of-line
2925 marker. Magic scripts must be executable em("as is") on the host,
2926 which for some hosts and some shells will require filtering at the DOS
2929 Magic scripts are em(EXPERIMENTAL) and should em(NOT) be relied upon.
2932 tt( None. Magic scripts disabled.)
2935 tt( magic script = user.csh)
2938 dit(bf(mangle case (S)))
2940 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING).
2943 dit(bf(mangled map (S)))
2945 This is for those who want to directly map UNIX file names which are
2946 not representable on Windows/DOS. The mangling of names is not always
2947 what is needed. In particular you may have documents with file
2948 extensions that differ between DOS and UNIX. For example, under UNIX
2949 it is common to use tt(".html") for HTML files, whereas under
2950 Windows/DOS tt(".htm") is more commonly used.
2952 So to map tt("html") to tt("htm") you would use:
2954 tt( mangled map = (*.html *.htm))
2956 One very useful case is to remove the annoying tt(";1") off the ends
2957 of filenames on some CDROMS (only visible under some UNIXes). To do
2958 this use a map of (*;1 *).
2964 tt( mangled map = (*;1 *))
2967 dit(bf(mangled names (S)))
2969 This controls whether non-DOS names under UNIX should be mapped to
2970 DOS-compatible names ("mangled") and made visible, or whether non-DOS
2971 names should simply be ignored.
2973 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING) for details
2974 on how to control the mangling process.
2976 If mangling is used then the mangling algorithm is as follows:
2980 it() The first (up to) five alphanumeric characters before the
2981 rightmost dot of the filename are preserved, forced to upper case, and
2982 appear as the first (up to) five characters of the mangled name.
2984 it() A tilde tt("~") is appended to the first part of the mangled
2985 name, followed by a two-character unique sequence, based on the
2986 original root name (i.e., the original filename minus its final
2987 extension). The final extension is included in the hash calculation
2988 only if it contains any upper case characters or is longer than three
2991 Note that the character to use may be specified using the
2992 link(bf("mangling char"))(manglingchar) option, if you don't like
2995 it() The first three alphanumeric characters of the final extension
2996 are preserved, forced to upper case and appear as the extension of the
2997 mangled name. The final extension is defined as that part of the
2998 original filename after the rightmost dot. If there are no dots in the
2999 filename, the mangled name will have no extension (except in the case
3000 of link(bf("hidden files"))(hidefiles) - see below).
3002 it() Files whose UNIX name begins with a dot will be presented as DOS
3003 hidden files. The mangled name will be created as for other filenames,
3004 but with the leading dot removed and tt("___") as its extension regardless
3005 of actual original extension (that's three underscores).
3009 The two-digit hash value consists of upper case alphanumeric
3012 This algorithm can cause name collisions only if files in a directory
3013 share the same first five alphanumeric characters. The probability of
3014 such a clash is 1/1300.
3016 The name mangling (if enabled) allows a file to be copied between UNIX
3017 directories from Windows/DOS while retaining the long UNIX
3018 filename. UNIX files can be renamed to a new extension from
3019 Windows/DOS and will retain the same basename. Mangled names do not
3020 change between sessions.
3023 tt( mangled names = yes)
3026 tt( mangled names = no)
3029 dit(bf(mangling char (S)))
3031 This controls what character is used as the em("magic") character in
3032 link(bf(name mangling))(manglednames). The default is a tt('~') but
3033 this may interfere with some software. Use this option to set it to
3034 whatever you prefer.
3037 tt( mangling char = ~)
3040 tt( mangling char = ^)
3043 dit(bf(mangled stack (G)))
3045 This parameter controls the number of mangled names that should be
3046 cached in the Samba server url(bf(smbd))(smbd.8.html).
3048 This stack is a list of recently mangled base names (extensions are
3049 only maintained if they are longer than 3 characters or contains upper
3052 The larger this value, the more likely it is that mangled names can be
3053 successfully converted to correct long UNIX names. However, large
3054 stack sizes will slow most directory access. Smaller stacks save
3055 memory in the server (each stack element costs 256 bytes).
3057 It is not possible to absolutely guarantee correct long file names, so
3058 be prepared for some surprises!
3061 tt( mangled stack = 50)
3064 tt( mangled stack = 100)
3067 dit(bf(map archive (S)))
3069 This controls whether the DOS archive attribute should be mapped to
3070 the UNIX owner execute bit. The DOS archive bit is set when a file
3071 has been modified since its last backup. One motivation for this
3072 option it to keep Samba/your PC from making any file it touches from
3073 becoming executable under UNIX. This can be quite annoying for shared
3074 source code, documents, etc...
3076 Note that this requires the link(bf("create mask"))(createmask)
3077 parameter to be set such that owner execute bit is not masked out
3078 (ie. it must include 100). See the parameter link(bf("create
3079 mask"))(createmask) for details.
3082 tt( map archive = yes)
3085 tt( map archive = no)
3088 dit(bf(map hidden (S)))
3090 This controls whether DOS style hidden files should be mapped to the
3091 UNIX world execute bit.
3093 Note that this requires the link(bf("create mask"))(createmask) to be
3094 set such that the world execute bit is not masked out (ie. it must
3095 include 001). See the parameter link(bf("create mask"))(createmask)
3099 tt( map hidden = no)
3102 tt( map hidden = yes)
3105 dit(bf(map system (S)))
3107 This controls whether DOS style system files should be mapped to the
3108 UNIX group execute bit.
3110 Note that this requires the link(bf("create mask"))(createmask) to be
3111 set such that the group execute bit is not masked out (ie. it must
3112 include 010). See the parameter link(bf("create mask"))(createmask)
3116 tt( map system = no)
3119 tt( map system = yes)
3122 dit(bf(map to guest (G)))
3124 This parameter is only useful in link(bf(security))(security) modes
3125 other than link(bf("security=share"))(security) - ie. user, server,
3128 This parameter can take three different values, which tell
3129 url(bf(smbd))(smbd.8.html) what to do with user login requests that
3130 don't match a valid UNIX user in some way.
3132 The three settings are :
3136 it() bf("Never") - Means user login requests with an invalid password
3137 are rejected. This is the default.
3139 it() bf("Bad User") - Means user logins with an invalid password are
3140 rejected, unless the username does not exist, in which case it is
3141 treated as a guest login and mapped into the link(bf("guest
3142 account"))(guestaccount).
3144 it() bf("Bad Password") - Means user logins with an invalid
3145 password are treated as a guest login and mapped into the
3146 link(bf("guest account"))(guestaccount). Note that this can
3147 cause problems as it means that any user mistyping their
3148 password will be silently logged on a bf("guest") - and
3149 will not know the reason they cannot access files they think
3150 they should - there will have been no message given to them
3151 that they got their password wrong. Helpdesk services will
3152 em(*hate*) you if you set the bf("map to guest") parameter
3157 Note that this parameter is needed to set up bf("Guest") share
3158 services when using link(bf(security))(security) modes other than
3159 share. This is because in these modes the name of the resource being
3160 requested is em(*not*) sent to the server until after the server has
3161 successfully authenticated the client so the server cannot make
3162 authentication decisions at the correct time (connection to the
3163 share) for bf("Guest") shares.
3165 For people familiar with the older Samba releases, this parameter
3166 maps to the old compile-time setting of the GUEST_SESSSETUP value
3170 tt( map to guest = Never)
3172 tt( map to guest = Bad User)
3174 label(maxconnections)
3175 dit(bf(max connections (S)))
3177 This option allows the number of simultaneous connections to a service
3178 to be limited. If bf("max connections") is greater than 0 then
3179 connections will be refused if this number of connections to the
3180 service are already open. A value of zero mean an unlimited number of
3181 connections may be made.
3183 Record lock files are used to implement this feature. The lock files
3184 will be stored in the directory specified by the link(bf("lock
3185 directory"))(lockdirectory) option.
3188 tt( max connections = 0)
3191 tt( max connections = 10)
3194 dit(bf(max disk size (G)))
3196 This option allows you to put an upper limit on the apparent size of
3197 disks. If you set this option to 100 then all shares will appear to be
3198 not larger than 100 MB in size.
3200 Note that this option does not limit the amount of data you can put on
3201 the disk. In the above case you could still store much more than 100
3202 MB on the disk, but if a client ever asks for the amount of free disk
3203 space or the total disk size then the result will be bounded by the
3204 amount specified in bf("max disk size").
3206 This option is primarily useful to work around bugs in some pieces of
3207 software that can't handle very large disks, particularly disks over
3210 A bf("max disk size") of 0 means no limit.
3213 tt( max disk size = 0)
3216 tt( max disk size = 1000)
3219 dit(bf(max log size (G)))
3221 This option (an integer in kilobytes) specifies the max size the log
3222 file should grow to. Samba periodically checks the size and if it is
3223 exceeded it will rename the file, adding a tt(".old") extension.
3225 A size of 0 means no limit.
3228 tt( max log size = 5000)
3231 tt( max log size = 1000)
3234 dit(bf(max mux (G)))
3236 This option controls the maximum number of outstanding simultaneous
3237 SMB operations that samba tells the client it will allow. You should
3238 never need to set this parameter.
3244 dit(bf(maxopenfiles (G)))
3246 This parameter limits the maximum number of open files that one
3247 url(bf(smbd))(smbd.8.html) file serving process may have open for
3248 a client at any one time. The default for this parameter is set
3249 very high (10,000) as Samba uses only one bit per un-opened file.
3251 The limit of the number of open files is usually set by the
3252 UNIX per-process file descriptor limit rather than this parameter
3253 so you should never need to touch this parameter.
3256 tt( max open files = 10000)
3259 dit(bf(max packet (G)))
3261 Synonym for label(bf("packet size"))(packetsize).
3264 dit(bf(max ttl (G)))
3266 This option tells url(bf(nmbd))(nmbd.8.html) what the default 'time
3267 to live' of NetBIOS names should be (in seconds) when
3268 url(bf(nmbd))(nmbd.8.html) is requesting a name using either a
3269 broadcast packet or from a WINS server. You should never need to
3270 change this parameter. The default is 3 days.
3273 tt( max ttl = 259200)
3276 dit(bf(max wins ttl (G)))
3278 This option tells url(bf(nmbd))(nmbd.8.html) when acting as a WINS
3279 server link(bf((wins support =true)))(winssupport) what the maximum
3280 'time to live' of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3281 grant will be (in seconds). You should never need to change this
3282 parameter. The default is 6 days (518400 seconds).
3284 See also the link(bf("min wins ttl"))(minwinsttl) parameter.
3287 tt( max wins ttl = 518400)
3290 dit(bf(max xmit (G)))
3292 This option controls the maximum packet size that will be negotiated
3293 by Samba. The default is 65535, which is the maximum. In some cases
3294 you may find you get better performance with a smaller value. A value
3295 below 2048 is likely to cause problems.
3298 tt( max xmit = 65535)
3301 tt( max xmit = 8192)
3303 label(messagecommand)
3304 dit(bf(message command (G)))
3306 This specifies what command to run when the server receives a WinPopup
3309 This would normally be a command that would deliver the message
3310 somehow. How this is to be done is up to your imagination.
3314 tt( message command = csh -c 'xedit %s;rm %s' &)
3316 This delivers the message using bf(xedit), then removes it
3317 afterwards. em(NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
3318 IMMEDIATELY). That's why I have the tt('&') on the end. If it doesn't
3319 return immediately then your PCs may freeze when sending messages
3320 (they should recover after 30secs, hopefully).
3322 All messages are delivered as the global guest user. The command takes
3323 the standard substitutions, although link(bf(%u))(percentu) won't work
3324 (link(bf(%U))(percentU) may be better in this case).
3326 Apart from the standard substitutions, some additional ones apply. In
3331 it() tt("%s") = the filename containing the message.
3333 it() tt("%t") = the destination that the message was sent to (probably the server
3336 it() tt("%f") = who the message is from.
3340 You could make this command send mail, or whatever else takes your
3341 fancy. Please let us know of any really interesting ideas you have.
3343 Here's a way of sending the messages as mail to root:
3345 tt(message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s)
3347 If you don't have a message command then the message won't be
3348 delivered and Samba will tell the sender there was an
3349 error. Unfortunately WfWg totally ignores the error code and carries
3350 on regardless, saying that the message was delivered.
3352 If you want to silently delete it then try:
3354 tt("message command = rm %s").
3356 For the really adventurous, try something like this:
3358 tt(message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient -M %m; rm %s' &)
3360 this would execute the command as a script on the server, then give
3361 them the result in a WinPopup message. Note that this could cause a
3362 loop if you send a message from the server using smbclient! You better
3363 wrap the above in a script that checks for this :-)
3366 tt( no message command)
3369 tt( message command = csh -c 'xedit %s;rm %s' &)
3371 label(minprintspace)
3372 dit(bf(min print space (S)))
3374 This sets the minimum amount of free disk space that must be available
3375 before a user will be able to spool a print job. It is specified in
3376 kilobytes. The default is 0, which means a user can always spool a print
3379 See also the link(bf(printing))(printing) parameter.
3382 tt( min print space = 0)
3385 tt( min print space = 2000)
3388 dit(bf(min wins ttl (G)))
3390 This option tells url(bf(nmbd))(nmbd.8.html) when acting as a WINS
3391 server link(bf((wins support = true)))(winssupport) what the minimum
3392 'time to live' of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3393 grant will be (in seconds). You should never need to change this
3394 parameter. The default is 6 hours (21600 seconds).
3397 tt( min wins ttl = 21600)
3400 label(nameresolveorder)
3401 dit(bf(name resolve order (G)))
3403 This option is used by the programs in the Samba suite to determine
3404 what naming services and in what order to resolve host names to IP
3405 addresses. The option takes a space separated string of different name
3408 The options are :"lmhosts", "host", "wins" and "bcast". They cause
3409 names to be resolved as follows :
3413 it() bf(lmhosts) : Lookup an IP address in the Samba lmhosts file.
3415 it() bf(host) : Do a standard host name to IP address resolution,
3416 using the system /etc/hosts, NIS, or DNS lookups. This method of name
3417 resolution is operating system depended for instance on IRIX or
3418 Solaris this may be controlled by the em(/etc/nsswitch.conf) file).
3420 it() bf(wins) : Query a name with the IP address listed in the
3421 link(bf(wins server))(winsserver) parameter. If no WINS server has
3422 been specified this method will be ignored.
3424 it() bf(bcast) : Do a broadcast on each of the known local interfaces
3425 listed in the link(bf(interfaces))(interfaces) parameter. This is the
3426 least reliable of the name resolution methods as it depends on the
3427 target host being on a locally connected subnet.
3432 tt( name resolve order = lmhosts host wins bcast)
3435 tt( name resolve order = lmhosts bcast host)
3437 This will cause the local lmhosts file to be examined first, followed
3438 by a broadcast attempt, followed by a normal system hostname lookup.
3440 label(netbiosaliases)
3441 dit(bf(netbios aliases (G)))
3443 This is a list of NetBIOS names that url(bf(nmbd))(nmbd.8.html) will
3444 advertise as additional names by which the Samba server is known. This
3445 allows one machine to appear in browse lists under multiple names. If
3446 a machine is acting as a link(bf(browse server))(localmaster) or
3447 link(bf(logon server))(domainlogons) none of these names will be
3448 advertised as either browse server or logon servers, only the primary
3449 name of the machine will be advertised with these capabilities.
3451 See also link(bf("netbios name"))(netbiosname).
3454 tt( empty string (no additional names))
3457 tt( netbios aliases = TEST TEST1 TEST2)
3460 dit(bf(netbios name (G)))
3462 This sets the NetBIOS name by which a Samba server is known. By
3463 default it is the same as the first component of the host's DNS name.
3464 If a machine is a link(bf(browse server))(localmaster) or
3465 link(bf(logon server))(domainlogons) this name (or the first component
3466 of the hosts DNS name) will be the name that these services are
3469 See also link(bf("netbios aliases"))(netbiosaliases).
3472 tt( Machine DNS name.)
3475 tt( netbios name = MYNAME)
3478 dit(bf(nis homedir (G)))
3480 Get the home share server from a NIS map. For UNIX systems that use an
3481 automounter, the user's home directory will often be mounted on a
3482 workstation on demand from a remote server.
3484 When the Samba logon server is not the actual home directory server,
3485 but is mounting the home directories via NFS then two network hops
3486 would be required to access the users home directory if the logon
3487 server told the client to use itself as the SMB server for home
3488 directories (one over SMB and one over NFS). This can be very
3491 This option allows Samba to return the home share as being on a
3492 different server to the logon server and as long as a Samba daemon is
3493 running on the home directory server, it will be mounted on the Samba
3494 client directly from the directory server. When Samba is returning the
3495 home share to the client, it will consult the NIS map specified in
3496 link(bf("homedir map"))(homedirmap) and return the server listed
3499 Note that for this option to work there must be a working NIS
3500 system and the Samba server with this option must also be a
3501 link(bf(logon server))(domainlogons).
3504 tt( nis homedir = false)
3507 tt( nis homedir = true)
3509 label(ntpipesupport)
3510 dit(bf(nt pipe support (G)))
3512 This boolean parameter controlls whether url(bf(smbd))(smbd.8.html)
3513 will allow Windows NT clients to connect to the NT SMB specific
3514 tt(IPC$) pipes. This is a developer debugging option and can be left
3518 tt( nt pipe support = yes)
3521 dit(bf(nt smb support (G)))
3523 This boolean parameter controlls whether url(bf(smbd))(smbd.8.html)
3524 will negotiate NT specific SMB support with Windows NT
3525 clients. Although this is a developer debugging option and should be
3526 left alone, benchmarking has discovered that Windows NT clients give
3527 faster performance with this option set to tt("no"). This is still
3528 being investigated. If this option is set to tt("no") then Samba
3529 offers exactly the same SMB calls that versions prior to Samba2.0
3530 offered. This information may be of use if any users are having
3531 problems with NT SMB support.
3534 tt( nt support = yes)
3536 label(nullpasswords)
3537 dit(bf(null passwords (G)))
3539 Allow or disallow client access to accounts that have null passwords.
3541 See also url(bf(smbpasswd (5)))(smbpasswd.5.html).
3544 tt( null passwords = no)
3547 tt( null passwords = yes)
3549 label(olelockingcompatibility)
3550 dit(bf(ole locking compatibility (G)))
3552 This parameter allows an administrator to turn off the byte range lock
3553 manipulation that is done within Samba to give compatibility for OLE
3554 applications. Windows OLE applications use byte range locking as a
3555 form of inter-process communication, by locking ranges of bytes around
3556 the 2^32 region of a file range. This can cause certain UNIX lock
3557 managers to crash or otherwise cause problems. Setting this parameter
3558 to tt("no") means you trust your UNIX lock manager to handle such cases
3562 tt( ole locking compatibility = yes)
3565 tt( ole locking compatibility = no)
3568 dit(bf(only guest (S)))
3570 A synonym for link(bf("guest only"))(guestonly).
3573 dit(bf(only user (S)))
3575 This is a boolean option that controls whether connections with
3576 usernames not in the link(bf(user=))(user) list will be allowed. By
3577 default this option is disabled so a client can supply a username to
3578 be used by the server.
3580 Note that this also means Samba won't try to deduce usernames from the
3581 service name. This can be annoying for the link(bf([homes]))(homes)
3582 section. To get around this you could use "link(bf(user))(user) =
3583 link(bf(%S))(percentS)" which means your link(bf("user"))(user) list
3584 will be just the service name, which for home directories is the name
3587 See also the link(bf(user))(user) parameter.
3590 tt( only user = False)
3593 tt( only user = True)
3596 dit(bf(oplocks (S)))
3598 This boolean option tells smbd whether to issue oplocks (opportunistic
3599 locks) to file open requests on this share. The oplock code can
3600 dramatically (approx 30% or more) improve the speed of access to files
3601 on Samba servers. It allows the clients to agressively cache files
3602 locally and you may want to disable this option for unreliable network
3603 environments (it is turned on by default in Windows NT Servers). For
3604 more information see the file Speed.txt in the Samba docs/ directory.
3606 Oplocks may be selectively turned off on certain files on a per share basis.
3607 See the 'veto oplock files' parameter. On some systems oplocks are recognised
3608 by the underlying operating system. This allows data synchronisation between
3609 all access to oplocked files, whether it be via Samba or NFS or a local
3610 UNIX process. See the link(bf(kernel oplocks))(kerneloplocks) parameter
3617 tt( oplocks = False)
3620 dit(bf(os level (G)))
3622 This integer value controls what level Samba advertises itself as for
3623 browse elections. The value of this parameter determines whether
3624 url(bf(nmbd))(nmbd.8.html) has a chance of becoming a local master
3625 browser for the link(bf(WORKGROUP))(workgroup) in the local broadcast
3626 area. The default is zero, which means url(bf(nmbd))(nmbd.8.html) will
3627 lose elections to Windows machines. See BROWSING.txt in the Samba
3628 docs/ directory for details.
3634 tt( os level = 65 ; This will win against any NT Server)
3637 dit(bf(packet size (G)))
3639 This is a deprecated parameter that how no effect on the current
3640 Samba code. It is left in the parameter list to prevent breaking
3641 old bf(smb.conf) files.
3644 dit(bf(panic action (G))
3646 This is a Samba developer option that allows a system command to be
3647 called when either url(bf(smbd))(smbd.8.html) or
3648 url(bf(nmbd))(nmbd.8.html) crashes. This is usually used to draw
3649 attention to the fact that a problem occured.
3652 tt( panic action = <empty string>)
3655 dit(bf(passwd chat (G)))
3657 This string controls the em("chat") conversation that takes places
3658 between url(bf(smbd))(smbd.8.html) and the local password changing
3659 program to change the users password. The string describes a sequence
3660 of response-receive pairs that url(bf(smbd))(smbd.8.html) uses to
3661 determine what to send to the link(bf(passwd))(passwdprogram) program
3662 and what to expect back. If the expected output is not received then
3663 the password is not changed.
3665 This chat sequence is often quite site specific, depending on what
3666 local methods are used for password control (such as NIS etc).
3668 The string can contain the macros tt("%o") and tt("%n") which are
3669 substituted for the old and new passwords respectively. It can also
3670 contain the standard macros tt("\n"), tt("\r"), tt("\t") and tt("\s")
3671 to give line-feed, carriage-return, tab and space.
3673 The string can also contain a tt('*') which matches any sequence of
3676 Double quotes can be used to collect strings with spaces in them into
3679 If the send string in any part of the chat sequence is a fullstop
3680 tt(".") then no string is sent. Similarly, is the expect string is a
3681 fullstop then no string is expected.
3683 Note that if the link(bf("unix password sync"))(unixpasswordsync)
3684 parameter is set to true, then this sequence is called em(*AS ROOT*)
3685 when the SMB password in the smbpasswd file is being changed, without
3686 access to the old password cleartext. In this case the old password
3687 cleartext is set to tt("") (the empty string).
3689 See also link(bf("unix password sync"))(unixpasswordsync),
3690 link(bf("passwd program"))(passwdprogram) and link(bf("passwd chat
3691 debug"))(passwdchatdebug).
3694 verb( passwd chat = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n \
3695 "*Reenter NEW password*" %n\n "*Password changed*"
3699 verb( passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed*)
3701 label(passwdchatdebug)
3702 dit(bf(passwd chat debug (G)))
3704 This boolean specifies if the passwd chat script parameter is run in
3705 tt("debug") mode. In this mode the strings passed to and received from
3706 the passwd chat are printed in the url(bf(smbd))(smbd.8.html) log with
3707 a link(bf("debug level"))(debuglevel) of 100. This is a dangerous
3708 option as it will allow plaintext passwords to be seen in the
3709 url(bf(smbd))(smbd.8.html) log. It is available to help Samba admins
3710 debug their link(bf("passwd chat"))(passwdchat) scripts when calling
3711 the link(bf("passwd program"))(passwdprogram) and should be turned off
3712 after this has been done. This parameter is off by default.
3714 See also link(bf("passwd chat"))(passwdchat"), link(bf("passwd
3715 program"))(passwdprogram).
3718 tt( passwd chat debug = True)
3721 tt( passwd chat debug = False)
3723 label(passwdprogram)
3724 dit(bf(passwd program (G)))
3726 The name of a program that can be used to set UNIX user passwords.
3727 Any occurrences of link(bf(%u))(percentu) will be replaced with the
3728 user name. The user name is checked for existance before calling the
3729 password changing program.
3731 Also note that many passwd programs insist in em("reasonable")
3732 passwords, such as a minimum length, or the inclusion of mixed case
3733 chars and digits. This can pose a problem as some clients (such as
3734 Windows for Workgroups) uppercase the password before sending it.
3736 em(Note) that if the link(bf("unix password sync"))(unixpasswordsync)
3737 parameter is set to tt("True") then this program is called em(*AS
3738 ROOT*) before the SMB password in the
3739 url(bf(smbpassswd))(smbpasswd.5.html) file is changed. If this UNIX
3740 password change fails, then url(bf(smbd))(smbd.8.html) will fail to
3741 change the SMB password also (this is by design).
3743 If the link(bf("unix password sync"))(unixpasswordsync) parameter is
3744 set this parameter em(MUST USE ABSOLUTE PATHS) for em(ALL) programs
3745 called, and must be examined for security implications. Note that by
3746 default link(bf("unix password sync"))(unixpasswordsync) is set to
3749 See also link(bf("unix password sync"))(unixpasswordsync).
3752 tt( passwd program = /bin/passwd)
3755 tt( passwd program = /sbin/passwd %u)
3757 label(passwordlevel)
3758 dit(bf(password level (G)))
3760 Some client/server combinations have difficulty with mixed-case
3761 passwords. One offending client is Windows for Workgroups, which for
3762 some reason forces passwords to upper case when using the LANMAN1
3763 protocol, but leaves them alone when using COREPLUS!
3765 This parameter defines the maximum number of characters that may be
3766 upper case in passwords.
3768 For example, say the password given was tt("FRED"). If bf(password
3769 level) is set to 1, the following combinations would be tried if
3772 tt("Fred"), tt("fred"), tt("fRed"), tt("frEd"), tt("freD")
3774 If bf(password level) was set to 2, the following combinations would
3777 tt("FRed"), tt("FrEd"), tt("FreD"), tt("fREd"), tt("fReD"),
3782 The higher value this parameter is set to the more likely it is that a
3783 mixed case password will be matched against a single case
3784 password. However, you should be aware that use of this parameter
3785 reduces security and increases the time taken to process a new
3788 A value of zero will cause only two attempts to be made - the password
3789 as is and the password in all-lower case.
3792 tt( password level = 0)
3795 tt( password level = 4)
3797 label(passwordserver)
3798 dit(bf(password server (G)))
3800 By specifying the name of another SMB server (such as a WinNT box)
3801 with this option, and using link(bf("security = domain"))(security) or
3802 link(bf("security = server"))(security) you can get Samba to do all
3803 its username/password validation via a remote server.
3805 This options sets the name of the password server to use. It must be a
3806 NetBIOS name, so if the machine's NetBIOS name is different from its
3807 internet name then you may have to add its NetBIOS name to the lmhosts
3808 file which is stored in the same directory as the bf(smb.conf) file.
3810 The name of the password server is looked up using the parameter
3811 link(bf("name resolve order="))(nameresolveorder) and so may resolved
3812 by any method and order described in that parameter.
3814 The password server much be a machine capable of using the "LM1.2X002"
3815 or the "LM NT 0.12" protocol, and it must be in user level security
3818 NOTE: Using a password server means your UNIX box (running Samba) is
3819 only as secure as your password server. em(DO NOT CHOOSE A PASSWORD
3820 SERVER THAT YOU DON'T COMPLETELY TRUST).
3822 Never point a Samba server at itself for password serving. This will
3823 cause a loop and could lock up your Samba server!
3825 The name of the password server takes the standard substitutions, but
3826 probably the only useful one is link(bf(%m))(percentm), which means
3827 the Samba server will use the incoming client as the password
3828 server. If you use this then you better trust your clients, and you
3829 better restrict them with hosts allow!
3831 If the link(bf("security"))(security) parameter is set to
3832 bf("domain"), then the list of machines in this option must be a list
3833 of Primary or Backup Domain controllers for the
3834 link(bf(Domain))(workgroup), as the Samba server is cryptographically
3835 in that domain, and will use crpytographically authenticated RPC calls
3836 to authenticate the user logging on. The advantage of using
3837 link(bf("security=domain"))(security) is that if you list several
3838 hosts in the bf("password server") option then
3839 url(bf(smbd))(smbd.8.html) will try each in turn till it finds one
3840 that responds. This is useful in case your primary server goes down.
3842 If the link(bf("security"))(security) parameter is set to
3843 bf("server"), then there are different restrictions that
3844 link(bf("security=domain"))(security) doesn't suffer from:
3848 it() You may list several password servers in the bf("password server"
3849 parameter, however if an url(bf(smbd))(smbd.8.html) makes a connection
3850 to a password server, and then the password server fails, no more
3851 users will be able to be authenticated from this
3852 url(bf(smbd))(smbd.8.html). This is a restriction of the SMB/CIFS
3853 protocol when in link(bf("security=server"))(security) mode and cannot
3856 it() If you are using a WindowsNT server as your password server then
3857 you will have to ensure that your users are able to login from the
3858 Samba server, as when in link(bf("security=server"))(security) mode
3859 the network logon will appear to come from there rather than from the
3864 See also the link(bf("security") parameter.
3867 tt( password server = <empty string>)
3870 tt( password server = NT-PDC, NT-BDC1, NT-BDC2)
3875 This parameter specifies a directory to which the user of the service
3876 is to be given access. In the case of printable services, this is
3877 where print data will spool prior to being submitted to the host for
3880 For a printable service offering guest access, the service should be
3881 readonly and the path should be world-writable and have the sticky bit
3882 set. This is not mandatory of course, but you probably won't get the
3883 results you expect if you do otherwise.
3885 Any occurrences of link(bf(%u))(percentu) in the path will be replaced
3886 with the UNIX username that the client is using on this
3887 connection. Any occurrences of link(bf(%m))(percentm) will be replaced
3888 by the NetBIOS name of the machine they are connecting from. These
3889 replacements are very useful for setting up pseudo home directories
3892 Note that this path will be based on link(bf("root dir"))(rootdir) if
3899 tt( path = /home/fred)
3902 dit(bf(postexec (S)))
3904 This option specifies a command to be run whenever the service is
3905 disconnected. It takes the usual substitutions. The command may be run
3906 as the root on some systems.
3908 An interesting example may be do unmount server resources:
3910 tt(postexec = /etc/umount /cdrom)
3912 See also link(bf(preexec))(preexec).
3915 tt( none (no command executed))
3918 tt( postexec = echo "%u disconnected from %S from %m (%I)" >> /tmp/log)
3921 dit(bf(postscript (S)))
3923 This parameter forces a printer to interpret the print files as
3924 postscript. This is done by adding a tt(%!) to the start of print output.
3926 This is most useful when you have lots of PCs that persist in putting
3927 a control-D at the start of print jobs, which then confuses your
3931 tt( postscript = False)
3934 tt( postscript = True)
3937 dit(bf(preexec (S)))
3939 This option specifies a command to be run whenever the service is
3940 connected to. It takes the usual substitutions.
3942 An interesting example is to send the users a welcome message every
3943 time they log in. Maybe a message of the day? Here is an example:
3946 preexec = csh -c 'echo \"Welcome to %S!\" | \
3947 /usr/local/samba/bin/smbclient -M %m -I %I' &
3950 Of course, this could get annoying after a while :-)
3952 See also link(bf(postexec))(postexec).
3955 tt( none (no command executed))
3958 tt( preexec = echo \"%u connected to %S from %m (%I)\" >> /tmp/log)
3960 label(preferredmaster)
3961 dit(bf(preferred master (G)))
3963 This boolean parameter controls if url(bf(nmbd))(nmbd.8.html) is a
3964 preferred master browser for its workgroup.
3966 If this is set to true, on startup, url(bf(nmbd))(nmbd.8.html) will
3967 force an election, and it will have a slight advantage in winning the
3968 election. It is recommended that this parameter is used in
3969 conjunction with link(bf("domain master = yes"))(domainmaster), so
3970 that url(bf(nmbd))(nmbd.8.html) can guarantee becoming a domain
3973 Use this option with caution, because if there are several hosts
3974 (whether Samba servers, Windows 95 or NT) that are preferred master
3975 browsers on the same subnet, they will each periodically and
3976 continuously attempt to become the local master browser. This will
3977 result in unnecessary broadcast traffic and reduced browsing
3980 See also link(bf(os level))(oslevel).
3983 tt( preferred master = no)
3986 tt( preferred master = yes)
3988 label(preferedmaster)
3989 dit(bf(prefered master (G)))
3991 Synonym for link(bf("preferred master"))(preferredmaster) for people
3992 who cannot spell :-).
3996 Synonym for link(bf("auto services"))(autoservices).
3999 dit(bf(preserve case (S)))
4001 This controls if new filenames are created with the case that the
4002 client passes, or if they are forced to be the tt("default") case.
4005 tt( preserve case = yes)
4007 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING) for a
4011 dit(bf(print command (S)))
4013 After a print job has finished spooling to a service, this command
4014 will be used via a tt(system()) call to process the spool
4015 file. Typically the command specified will submit the spool file to
4016 the host's printing subsystem, but there is no requirement that this
4017 be the case. The server will not remove the spool file, so whatever
4018 command you specify should remove the spool file when it has been
4019 processed, otherwise you will need to manually remove old spool files.
4021 The print command is simply a text string. It will be used verbatim,
4022 with two exceptions: All occurrences of tt("%s") will be replaced by
4023 the appropriate spool file name, and all occurrences of tt("%p") will
4024 be replaced by the appropriate printer name. The spool file name is
4025 generated automatically by the server, the printer name is discussed
4028 The full path name will be used for the filename if tt("%s") is not
4029 preceded by a tt('/'). If you don't like this (it can stuff up some
4030 lpq output) then use tt("%f") instead. Any occurrences of tt("%f") get
4031 replaced by the spool filename without the full path at the front.
4033 The print command em(MUST) contain at least one occurrence of tt("%s")
4034 or tt("%f") - the tt("%p") is optional. At the time a job is
4035 submitted, if no printer name is supplied the tt("%p") will be
4036 silently removed from the printer command.
4038 If specified in the link(bf("[global]")(global) section, the print
4039 command given will be used for any printable service that does not
4040 have its own print command specified.
4042 If there is neither a specified print command for a printable service
4043 nor a global print command, spool files will be created but not
4044 processed and (most importantly) not removed.
4046 Note that printing may fail on some UNIXes from the tt("nobody")
4047 account. If this happens then create an alternative guest account that
4048 can print and set the link(bf("guest account"))(guestaccount) in the
4049 link(bf("[global]")(global) section.
4051 You can form quite complex print commands by realising that they are
4052 just passed to a shell. For example the following will log a print
4053 job, print the file, then remove it. Note that tt(';') is the usual
4054 separator for command in shell scripts.
4056 tt(print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s)
4058 You may have to vary this command considerably depending on how you
4059 normally print files on your system. The default for the parameter
4060 varies depending on the setting of the link(bf("printing="))(printing)
4064 For link(bf("printing="))(printing) BSD, AIX, QNX, LPRNG or PLP :
4065 tt( print command = lpr -r -P%p %s)
4067 For link(bf("printing="))(printing) SYS or HPUX :
4068 tt( print command = lp -c -d%p %s; rm %s)
4070 For link(bf("printing="))(printing) SOFTQ :
4071 tt( print command = lp -d%p -s %s; rm %s)
4074 tt( print command = /usr/local/samba/bin/myprintscript %p %s)
4077 dit(bf(print ok (S)))
4079 Synonym for link(bf(printable))(printable).
4082 dit(bf(printable (S)))
4084 If this parameter is tt("yes"), then clients may open, write to and
4085 submit spool files on the directory specified for the service.
4087 Note that a printable service will ALWAYS allow writing to the service
4088 path (user privileges permitting) via the spooling of print data. The
4089 link(bf("read only"))(readonly) parameter controls only non-printing
4090 access to the resource.
4096 tt( printable = yes)
4099 dit(bf(printcap (G)))
4101 Synonym for link(bf(printcapname))(printcapname).
4104 dit(bf(printcap name (G)))
4106 This parameter may be used to override the compiled-in default
4107 printcap name used by the server (usually /etc/printcap). See the
4108 discussion of the link(bf([printers]))(printers) section above for
4109 reasons why you might want to do this.
4111 On System V systems that use bf(lpstat) to list available printers you
4112 can use tt("printcap name = lpstat") to automatically obtain lists of
4113 available printers. This is the default for systems that define SYSV
4114 at configure time in Samba (this includes most System V based
4115 systems). If bf("printcap name") is set to bf(lpstat) on these systems
4116 then Samba will launch tt("lpstat -v") and attempt to parse the output
4117 to obtain a printer list.
4119 A minimal printcap file would look something like this:
4129 where the tt('|') separates aliases of a printer. The fact that the
4130 second alias has a space in it gives a hint to Samba that it's a
4133 em(NOTE): Under AIX the default printcap name is
4134 tt("/etc/qconfig"). Samba will assume the file is in AIX tt("qconfig")
4135 format if the string tt("/qconfig") appears in the printcap filename.
4138 tt( printcap name = /etc/printcap)
4141 tt( printcap name = /etc/myprintcap)
4144 dit(bf(printer (S)))
4146 This parameter specifies the name of the printer to which print jobs
4147 spooled through a printable service will be sent.
4149 If specified in the link(bf([global]))(global) section, the printer
4150 name given will be used for any printable service that does not have
4151 its own printer name specified.
4154 none (but may be tt("lp") on many systems)
4157 printer name = laserwriter
4159 label(printerdriver)
4160 dit(bf(printer driver (S)))
4162 This option allows you to control the string that clients receive when
4163 they ask the server for the printer driver associated with a
4164 printer. If you are using Windows95 or WindowsNT then you can use this
4165 to automate the setup of printers on your system.
4167 You need to set this parameter to the exact string (case sensitive)
4168 that describes the appropriate printer driver for your system. If you
4169 don't know the exact string to use then you should first try with no
4170 bf("printer driver") option set and the client will give you a list of
4171 printer drivers. The appropriate strings are shown in a scrollbox
4172 after you have chosen the printer manufacturer.
4174 See also link(bf("printer driver file"))(printerdriverfile).
4177 printer driver = HP LaserJet 4L
4179 label(printerdriverfile)
4180 dit(bf(printer driver file (G)))
4182 This parameter tells Samba where the printer driver definition file,
4183 used when serving drivers to Windows 95 clients, is to be found. If
4184 this is not set, the default is :
4186 tt(SAMBA_INSTALL_DIRECTORY/lib/printers.def)
4188 This file is created from Windows 95 tt("msprint.def") files found on
4189 the Windows 95 client system. For more details on setting up serving
4190 of printer drivers to Windows 95 clients, see the documentation file
4191 in the docs/ directory, PRINTER_DRIVER.txt.
4194 tt( None (set in compile).)
4197 tt( printer driver file = /usr/local/samba/printers/drivers.def)
4199 See also link(bf("printer driver location"))(printerdriverlocation).
4201 label(printerdriverlocation)
4202 dit(bf(printer driver location (S)))
4204 This parameter tells clients of a particular printer share where to
4205 find the printer driver files for the automatic installation of
4206 drivers for Windows 95 machines. If Samba is set up to serve printer
4207 drivers to Windows 95 machines, this should be set to
4209 tt(\\MACHINE\aPRINTER$)
4211 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$
4212 is a share you set up for serving printer driver files. For more
4213 details on setting this up see the documentation file in the docs/
4214 directory, PRINTER_DRIVER.txt.
4220 tt( printer driver location = \\MACHINE\PRINTER$)
4222 See also link(bf("printer driver file"))(printerdriverfile).
4225 dit(bf(printer name (S)))
4227 Synonym for link(bf(printer))(printer).
4230 dit(bf(printing (S)))
4232 This parameters controls how printer status information is interpreted
4233 on your system, and also affects the default values for the
4234 link(bf("print command"))(printcommand), link(bf("lpq
4235 command"))(lpqcommand) link(bf("lppause command"))(lppausecommand),
4236 link(bf("lpresume command"))(lpresumecommand), and link(bf("lprm
4237 command"))(lprmcommand).
4239 Currently eight printing styles are supported. They are
4240 bf("printing=BSD"), bf("printing=AIX"), bf("printing=LPRNG"),
4242 bf("printing=SYSV"),bf("printing="HPUX"),bf("printing=QNX") and
4243 bf("printing=SOFTQ").
4245 To see what the defaults are for the other print commands when using
4246 these three options use the url(bf("testparm"))(testparm) program.
4248 This option can be set on a per printer basis
4250 See also the discussion in the link(bf([printers]))(printers) section.
4253 dit(bf(protocol (G)))
4255 The value of the parameter (a string) is the highest protocol level
4256 that will be supported by the server.
4258 Possible values are :
4262 it() CORE: Earliest version. No concept of user names.
4264 it() COREPLUS: Slight improvements on CORE for efficiency.
4266 it() LANMAN1: First em("modern") version of the protocol. Long
4269 it() LANMAN2: Updates to Lanman1 protocol.
4271 it() NT1: Current up to date version of the protocol. Used by Windows
4276 Normally this option should not be set as the automatic negotiation
4277 phase in the SMB protocol takes care of choosing the appropriate
4284 tt( protocol = LANMAN1)
4289 Synonym for link(bf("guest ok"))(guestok).
4291 label(queuepausecommand)
4292 dit(bf(queuepause command (S)))
4294 This parameter specifies the command to be executed on the server host
4295 in order to pause the printerqueue.
4297 This command should be a program or script which takes a printer name
4298 as its only parameter and stops the printerqueue, such that no longer
4299 jobs are submitted to the printer.
4301 This command is not supported by Windows for Workgroups, but can be
4302 issued from the Printer's window under Windows 95 & NT.
4304 If a tt("%p") is given then the printername is put in its
4305 place. Otherwise it is placed at the end of the command.
4307 Note that it is good practice to include the absolute path in the
4308 command as the PATH may not be available to the server.
4311 tt( depends on the setting of "printing =")
4314 tt( queuepause command = disable %p)
4316 label(queueresumecommand)
4317 dit(bf(queueresume command (S)))
4319 This parameter specifies the command to be executed on the server host
4320 in order to resume the printerqueue. It is the command to undo the
4321 behaviour that is caused by the previous parameter
4322 (link(bf("queuepause command))(queuepausecommand)).
4324 This command should be a program or script which takes a printer name
4325 as its only parameter and resumes the printerqueue, such that queued
4326 jobs are resubmitted to the printer.
4328 This command is not supported by Windows for Workgroups, but can be
4329 issued from the Printer's window under Windows 95 & NT.
4331 If a tt("%p") is given then the printername is put in its
4332 place. Otherwise it is placed at the end of the command.
4334 Note that it is good practice to include the absolute path in the
4335 command as the PATH may not be available to the server.
4338 tt( depends on the setting of "printing =")
4341 tt( queuepause command = enable %p)
4344 dit(bf(read bmpx (G)))
4346 This boolean parameter controls whether url(bf(smbd))(smbd.8.html)
4347 will support the "Read Block Multiplex" SMB. This is now rarely used
4348 and defaults to off. You should never need to set this parameter.
4354 dit(bf(read list (S)))
4356 This is a list of users that are given read-only access to a
4357 service. If the connecting user is in this list then they will not be
4358 given write access, no matter what the link(bf("read only"))(readonly)
4359 option is set to. The list can include group names using the syntax
4360 described in the link(bf("invalid users"))(invalidusers) parameter.
4362 See also the link(bf("write list"))(writelist) parameter and
4363 the link(bf("invalid users"))(invalidusers) parameter.
4366 tt( read list = <empty string>)
4369 tt( read list = mary, @students)
4372 dit(bf(read only (S)))
4374 Note that this is an inverted synonym for
4375 link(bf("writable"))(writable) and link(bf("write ok"))(writeok).
4377 See also link(bf("writable"))(writable) and link(bf("write
4380 label(readprediction)
4381 dit(bf(read prediction (G)))
4383 em(NOTE): This code is currently disabled in Samba2.0 and
4384 may be removed at a later date. Hence this parameter has
4387 This options enables or disables the read prediction code used to
4388 speed up reads from the server. When enabled the server will try to
4389 pre-read data from the last accessed file that was opened read-only
4390 while waiting for packets.
4393 tt( read prediction = False)