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(max connections))(maxconnections)
831 it() link(bf(min print space))(minprintspace)
833 it() link(bf(only guest))(onlyguest)
835 it() link(bf(only user))(onlyuser)
837 it() link(bf(oplocks))(oplocks)
839 it() link(bf(path))(path)
841 it() link(bf(postexec))(postexec)
843 it() link(bf(postscript))(postscript)
845 it() link(bf(preexec))(preexec)
847 it() link(bf(preserve case))(preservecase)
849 it() link(bf(print command))(printcommand)
851 it() link(bf(print ok))(printok)
853 it() link(bf(printable))(printable)
855 it() link(bf(printer))(printer)
857 it() link(bf(printer driver))(printerdriver)
859 it() link(bf(printer driver location))(printerdriverlocation)
861 it() link(bf(printer name))(printername)
863 it() link(bf(printing))(printing)
865 it() link(bf(public))(public)
867 it() link(bf(queuepause command))(queuepausecommand)
869 it() link(bf(queueresume command))(queueresumecommand)
871 it() link(bf(read list))(readlist)
873 it() link(bf(read only))(readonly)
875 it() link(bf(revalidate))(revalidate)
877 it() link(bf(root postexec))(rootpostexec)
879 it() link(bf(root preexec))(rootpreexec)
881 it() link(bf(set directory))(setdirectory)
883 it() link(bf(share modes))(sharemodes)
885 it() link(bf(short preserve case))(shortpreservecase)
887 it() link(bf(status))(status)
889 it() link(bf(strict locking))(strictlocking)
891 it() link(bf(strict sync))(strictsync)
893 it() link(bf(sync always))(syncalways)
895 it() link(bf(user))(user)
897 it() link(bf(username))(username)
899 it() link(bf(users))(users)
901 it() link(bf(valid users))(validusers)
903 it() link(bf(veto files))(vetofiles)
905 it() link(bf(veto oplock files))(vetooplockfiles)
907 it() link(bf(volume))(volume)
909 it() link(bf(wide links))(wide links)
911 it() link(bf(writable))(writable)
913 it() link(bf(write list))(write list)
915 it() link(bf(write ok))(write ok)
917 it() link(bf(writeable))(writeable)
921 label(EXPLANATIONOFEACHPARAMETER)
922 manpagesection(EXPLANATION OF EACH PARAMETER)
927 dit(bf(admin users (S)))
929 This is a list of users who will be granted administrative privileges
930 on the share. This means that they will do all file operations as the
933 You should use this option very carefully, as any user in this list
934 will be able to do anything they like on the share, irrespective of
944 dit(bf(allow hosts (S)))
946 A synonym for this parameter is link(bf('hosts allow'))(hostsallow)
948 This parameter is a comma, space, or tab delimited set of hosts which
949 are permitted to access a service.
951 If specified in the link(bf([global]))(global) section then it will
952 apply to all services, regardless of whether the individual service
953 has a different setting.
955 You can specify the hosts by name or IP number. For example, you could
956 restrict access to only the hosts on a Class C subnet with something
957 like tt("allow hosts = 150.203.5."). The full syntax of the list is
958 described in the man page bf(hosts_access (5)). Note that this man
959 page may not be present on your system, so a brief description will
962 em(NOTE:) IF you wish to allow the url(bf(smbpasswd
963 (8)))(smbpasswd.html.8) program to be run by local users to change
964 their Samba passwords using the local url(bf(smbd (8)))(smbd.8.html)
965 daemon, then you em(MUST) ensure that the localhost is listed in your
966 bf(allow hosts) list, as url(bf(smbpasswd (8)))(smbpasswd.html.8) runs
967 in client-server mode and is seen by the local
968 url(bf(smbd))(smbd.8.html) process as just another client.
970 You can also specify hosts by network/netmask pairs and by netgroup
971 names if your system supports netgroups. The em(EXCEPT) keyword can also
972 be used to limit a wildcard list. The following examples may provide
975 bf(Example 1): allow localhost and all IPs in 150.203.*.* except one
977 tt( hosts allow = localhost, 150.203. EXCEPT 150.203.6.66)
979 bf(Example 2): allow localhost and hosts that match the given network/netmask
981 tt( hosts allow = localhost, 150.203.15.0/255.255.255.0)
983 bf(Example 3): allow a localhost plus a couple of hosts
985 tt( hosts allow = localhost, lapland, arvidsjaur)
987 bf(Example 4): allow only hosts in NIS netgroup "foonet" or localhost, but
988 deny access from one particular host
990 tt( hosts allow = @foonet, localhost)
991 tt( hosts deny = pirate)
993 Note that access still requires suitable user-level passwords.
995 See utl(bf(testparm (1)))(testparm.1.html) for a way of testing your
996 host access to see if it does what you expect.
999 none (i.e., all hosts permitted access)
1002 allow hosts = 150.203.5. localhost myhost.mynet.edu.au
1004 label(alternatepermissions)
1005 dit(bf(alternate permissions (S)))
1007 This is a deprecated parameter. It no longer has any effect in Samba2.0.
1008 In previous versions of Samba it affected the way the DOS "read only"
1009 attribute was mapped for a file. In Samba2.0 a file is marked "read only"
1010 if the UNIX file does not have the 'w' bit set for the owner of the file,
1011 regardless if the owner of the file is the currently logged on user or not.
1014 dit(bf(announce as (G)))
1016 This specifies what type of server url(bf(nmbd))(nmbd.8.html) will
1017 announce itself as, to a network neighborhood browse list. By default
1018 this is set to Windows NT. The valid options are : "NT", "Win95" or
1019 "WfW" meaining Windows NT, Windows 95 and Windows for Workgroups
1020 respectively. Do not change this parameter unless you have a specific
1021 need to stop Samba appearing as an NT server as this may prevent Samba
1022 servers from participating as browser servers correctly.
1030 label(announceversion)
1031 dit(bf(announce version (G)))
1033 This specifies the major and minor version numbers that nmbd will use
1034 when announcing itself as a server. The default is 4.2. Do not change
1035 this parameter unless you have a specific need to set a Samba server
1036 to be a downlevel server.
1039 announce version = 4.2
1042 announce version = 2.0
1046 dit(bf(auto services (G)))
1048 This is a list of services that you want to be automatically added to
1049 the browse lists. This is most useful for homes and printers services
1050 that would otherwise not be visible.
1052 Note that if you just want all printers in your printcap file loaded
1053 then the link(bf("load printers"))(loadprinters) option is easier.
1059 auto services = fred lp colorlp
1062 dit(bf(available (S)))
1064 This parameter lets you em('turn off') a service. If tt('available = no'),
1065 then em(ALL) attempts to connect to the service will fail. Such failures
1074 label(bindinterfacesonly)
1075 dit(bf(bind interfaces only (G)))
1077 This global parameter allows the Samba admin to limit what interfaces
1078 on a machine will serve smb requests. If affects file service
1079 url(bf(smbd))(smbd.8.html) and name service url(bf(nmbd))(nmbd.8.html)
1080 in slightly different ways.
1082 For name service it causes url(bf(nmbd))(nmbd.8.html) to bind to ports
1083 137 and 138 on the interfaces listed in the
1084 link(bf('interfaces'))(interfaces) parameter. nmbd also binds to the
1085 'all addresses' interface (0.0.0.0) on ports 137 and 138 for the
1086 purposes of reading broadcast messages. If this option is not set then
1087 nmbd will service name requests on all of these sockets. If bf("bind
1088 interfaces only") is set then nmbd will check the source address of
1089 any packets coming in on the broadcast sockets and discard any that
1090 don't match the broadcast addresses of the interfaces in the
1091 link(bf('interfaces'))(interfaces) parameter list. As unicast packets
1092 are received on the other sockets it allows nmbd to refuse to serve
1093 names to machines that send packets that arrive through any interfaces
1094 not listed in the 'interfaces' list. IP Source address spoofing does
1095 defeat this simple check, however so it must not be used seriously as
1096 a security feature for nmbd.
1098 For file service it causes smbd to bind only to the interface list
1099 given in the link(bf('interfaces'))(interfaces) parameter. This
1100 restricts the networks that smbd will serve to packets coming in those
1101 interfaces. Note that you should not use this parameter for machines
1102 that are serving PPP or other intermittant or non-broadcast network
1103 interfaces as it will not cope with non-permanent interfaces.
1105 In addition, to change a users SMB password, the
1106 url(bf(smbpasswd))(smbpasswd.8.html) by default connects to the
1107 em("localhost" - 127.0.0.1) address as an SMB client to issue the
1108 password change request. If bf("bind interfaces only") is set then
1109 unless the network address em(127.0.0.1) is added to the
1110 link(bf('interfaces'))(interfaces) parameter list then
1111 url(bf(smbpasswd))(smbpasswd.8.html) will fail to connect in it's
1112 default mode. url(bf(smbpasswd))(smbpasswd.8.html) can be forced to
1113 use the primary IP interface of the local host by using its
1114 url(bf("-r remote machine"))(smbpasswd.8.html#minusr) parameter, with
1115 bf("remote machine") set to the IP name of the primary interface
1119 bind interfaces only = False
1122 bind interfaces only = True
1124 label(blockinglocks)
1125 dit(bf(blocking locks (S)))
1127 This parameter controls the behavior of url(bf(smbd))(smbd.8.html) when
1128 given a request by a client to obtain a byte range lock on a region
1129 of an open file, and the request has a time limit associated with it.
1131 If this parameter is set and the lock range requested cannot be
1132 immediately satisfied, Samba 2.0 will internally queue the lock
1133 request, and periodically attempt to obtain the lock until the
1134 timeout period expires.
1136 If this parameter is set to "False", then Samba 2.0 will behave
1137 as previous versions of Samba would and will fail the lock
1138 request immediately if the lock range cannot be obtained.
1140 This parameter can be set per share.
1143 blocking locks = True
1146 blocking locks = False
1149 dit(bf(broweable (S)))
1151 This controls whether this share is seen in the list of available
1152 shares in a net view and in the browse list.
1161 dit(bf(browse list(G)))
1163 This controls whether url(bf(smbd))(smbd.8.html) will serve a browse
1164 list to a client doing a NetServerEnum call. Normally set to true. You
1165 should never need to change this.
1173 Synonym for link(bf(browsable))(browsable).
1175 label(casesensitive)
1176 dit(bf(case sensitive (G)))
1178 See the discussion in the section link(bf(NAME MANGLING))(NAMEMANGLING).
1181 dit(bf(casesignames (G)))
1183 Synonym for link(bf("case sensitive"))(casesensitive).
1185 label(changenotifytimeout)
1186 dit(bf(change notify timeout (G)))
1188 One of the new NT SMB requests that Samba 2.0 supports is the
1189 "ChangeNotify" requests. This SMB allows a client to tell a server to
1190 em("watch") a particular directory for any changes and only reply to
1191 the SMB request when a change has occurred. Such constant scanning of
1192 a directory is expensive under UNIX, hence an
1193 url(bf(smbd))(smbd.8.html) daemon only performs such a scan on each
1194 requested directory once every bf(change notify timeout) seconds.
1196 bf(change notify timeout) is specified in units of seconds.
1199 change notify timeout = 60
1202 change notify timeout = 300
1204 Would change the scan time to every 5 minutes.
1207 dit(bf(character set (G)))
1209 This allows a smbd to map incoming filenames from a DOS Code page (see
1210 the link(bf(client code page))(clientcodepage) parameter) to several
1211 built in UNIX character sets. The built in code page translations are:
1215 it() bf(ISO8859-1) Western European UNIX character set. The parameter
1216 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1217 page 850 if the bf(character set) parameter is set to iso8859-1
1218 in order for the conversion to the UNIX character set to be done
1221 it() bf(ISO8859-2) Eastern European UNIX character set. The parameter
1222 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1223 page 852 if the bf(character set) parameter is set to ISO8859-2
1224 in order for the conversion to the UNIX character set to be done
1227 it() bf(ISO8859-5) Russian Cyrillic UNIX character set. The parameter
1228 link(bf(client code page))(clientcodepage) em(MUST) be set to code
1229 page 866 if the bf(character set) parameter is set to ISO8859-2
1230 in order for the conversion to the UNIX character set to be done
1233 it() bf(KOI8-R) Alternate mapping for Russian Cyrillic UNIX
1234 character set. The parameter link(bf(client code
1235 page))(clientcodepage) em(MUST) be set to code page 866 if the
1236 bf(character set) parameter is set to KOI8-R in order for the
1237 conversion to the UNIX character set to be done correctly.
1241 em(BUG). These MSDOS code page to UNIX character set mappings should
1242 be dynamic, like the loading of MS DOS code pages, not static.
1244 See also link(bf(client code page))(clientcodepage). Normally this
1245 parameter is not set, meaning no filename translation is done.
1251 character set = ISO8859-1
1253 label(clientcodepage)
1254 dit(bf(client code page (G)))
1256 This parameter specifies the DOS code page that the clients accessing
1257 Samba are using. To determine what code page a Windows or DOS client
1258 is using, open a DOS command prompt and type the command "chcp". This
1259 will output the code page. The default for USA MS-DOS, Windows 95, and
1260 Windows NT releases is code page 437. The default for western european
1261 releases of the above operating systems is code page 850.
1263 This parameter tells url(bf(smbd))(smbd.8.html) which of the
1264 tt(codepage.XXX) files to dynamically load on startup. These files,
1265 described more fully in the manual page url(bf(make_smbcodepage
1266 (1)))(make_smbcodepage.1.html), tell url(bf(smbd))(smbd.8.html) how
1267 to map lower to upper case characters to provide the case insensitivity
1268 of filenames that Windows clients expect.
1270 Samba currenly ships with the following code page files :
1274 it() bf(Code Page 437 - MS-DOS Latin US)
1276 it() bf(Code Page 737 - Windows '95 Greek)
1278 it() bf(Code Page 850 - MS-DOS Latin 1)
1280 it() bf(Code Page 852 - MS-DOS Latin 2)
1282 it() bf(Code Page 861 - MS-DOS Icelandic)
1284 it() bf(Code Page 866 - MS-DOS Cyrillic)
1286 it() bf(Code Page 932 - MS-DOS Japanese SJIS)
1288 it() bf(Code Page 936 - MS-DOS Simplified Chinese)
1290 it() bf(Code Page 949 - MS-DOS Korean Hangul)
1292 it() bf(Code Page 950 - MS-DOS Traditional Chinese)
1296 Thus this parameter may have any of the values 437, 737, 850, 852,
1297 861, 932, 936, 949, or 950. If you don't find the codepage you need,
1298 read the comments in one of the other codepage files and the
1299 url(bf(make_smbcodepage (1)))(make_smbcodepage.1.html) man page and
1300 write one. Please remember to donate it back to the Samba user
1303 This parameter co-operates with the link(bf("valid
1304 chars"))(validchars) parameter in determining what characters are
1305 valid in filenames and how capitalization is done. If you set both
1306 this parameter and the link(bf("valid chars"))(validchars) parameter
1307 the bf("client code page") parameter em(MUST) be set before the
1308 link(bf("valid chars"))(validchars) parameter in the bf(smb.conf)
1309 file. The link(bf("valid chars"))(validchars) string will then augment
1310 the character settings in the "client code page" parameter.
1312 If not set, bf("client code page") defaults to 850.
1314 See also : link(bf("valid chars"))(validchars)
1317 client code page = 850
1320 client code page = 936
1323 dit(bf(codingsystem (G)))
1325 This parameter is used to determine how incoming Shift-JIS Japanese
1326 characters are mapped from the incoming link(bf("client code
1327 page"))(clientcodepage) used by the client, into file names in the
1328 UNIX filesystem. Only useful if link(bf("client code
1329 page"))(clientcodepage) is set to 932 (Japanese Shift-JIS).
1335 it() bf(SJIS)) Shift-JIS. Does no conversion of the incoming filename.
1337 it() bf(JIS8, J8BB, J8BH, J8@B, J8@J, J8@H )) Convert from incoming
1338 Shift-JIS to eight bit JIS code with different shift-in, shift out
1341 it() bf(JIS7, J7BB, J7BH, J7@B, J7@J, J7@H )) Convert from incoming
1342 Shift-JIS to seven bit JIS code with different shift-in, shift out
1345 it() bf(JUNET, JUBB, JUBH, JU@B, JU@J, JU@H )) Convert from incoming
1346 Shift-JIS to JUNET code with different shift-in, shift out codes.
1348 it() bf(EUC) Convert an incoming Shift-JIS character to EUC code.
1350 it() bf(HEX) Convert an incoming Shift-JIS character to a 3 byte hex
1351 representation, ie. tt(:AB).
1353 it() bf(CAP) Convert an incoming Shift-JIS character to the 3 byte hex
1354 representation used by the Columbia Appletalk Program (CAP),
1355 ie. tt(:AB). This is used for compatibility between Samba and CAP.
1360 dit(bf(comment (S)))
1362 This is a text field that is seen next to a share when a client does a
1363 queries the server, either via the network neighborhood or via "net
1364 view" to list what shares are available.
1366 If you want to set the string that is displayed next to the machine
1367 name then see the server string command.
1373 comment = Fred's Files
1376 dit(bf(config file (G)))
1378 This allows you to override the config file to use, instead of the
1379 default (usually bf(smb.conf)). There is a chicken and egg problem
1380 here as this option is set in the config file!
1382 For this reason, if the name of the config file has changed when the
1383 parameters are loaded then it will reload them from the new config
1386 This option takes the usual substitutions, which can be very useful.
1388 If the config file doesn't exist then it won't be loaded (allowing you
1389 to special case the config files of just a few clients).
1392 tt( config file = /usr/local/samba/lib/smb.conf.%m)
1397 This parameter allows you to em('clone') service entries. The specified
1398 service is simply duplicated under the current service's name. Any
1399 parameters specified in the current section will override those in the
1400 section being copied.
1402 This feature lets you set up a 'template' service and create similar
1403 services easily. Note that the service being copied must occur earlier
1404 in the configuration file than the service doing the copying.
1413 dit(bf(create mask (S)))
1415 A synonym for this parameter is link(bf('create mode'))(createmode).
1417 When a file is created, the neccessary permissions are calculated
1418 according to the mapping from DOS modes to UNIX permissions, and the
1419 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1420 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1421 of a file. Any bit em(*not*) set here will be removed from the modes set
1422 on a file when it is created.
1424 The default value of this parameter removes the 'group' and 'other'
1425 write and execute bits from the UNIX modes.
1427 Following this Samba will bit-wise 'OR' the UNIX mode created from
1428 this parameter with the value of the "force create mode" parameter
1429 which is set to 000 by default.
1431 This parameter does not affect directory modes. See the parameter
1432 link(bf('directory mode'))(directorymode) for details.
1434 See also the link(bf("force create mode"))(forcecreatemode) parameter
1435 for forcing particular mode bits to be set on created files. See also
1436 the link(bf("directory mode"))(directorymode) parameter for masking
1437 mode bits on created directories.
1446 dit(bf(create mode (S)))
1448 This is a synonym for link(bf(create mask))(createmask).
1451 dit(bf(deadtime (G)))
1453 The value of the parameter (a decimal integer) represents the number
1454 of minutes of inactivity before a connection is considered dead, and
1455 it is disconnected. The deadtime only takes effect if the number of
1458 This is useful to stop a server's resources being exhausted by a large
1459 number of inactive connections.
1461 Most clients have an auto-reconnect feature when a connection is
1462 broken so in most cases this parameter should be transparent to users.
1464 Using this parameter with a timeout of a few minutes is recommended
1467 A deadtime of zero indicates that no auto-disconnection should be
1476 label(debug timestamp (G))
1478 Samba2.0 debug log messages are timestamped by default. If you
1479 are running at a high debug level these timestamps can be
1480 distracting. This boolean parameter allows them to be turned
1484 debug timestamp = Yes
1487 debug timestamp = No
1490 dit(bf(debug level (G)))
1492 The value of the parameter (an integer) allows the debug level
1493 (logging level) to be specified in the bf(smb.conf) file. This is to
1494 give greater flexibility in the configuration of the system.
1496 The default will be the debug level specified on the command line
1497 or level zero if none was specified.
1503 dit(bf(default (G)))
1505 A synonym for link(bf(default service))(defaultservice).
1508 dit(bf(default case (S)))
1510 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING). Also note
1511 the link(bf("short preserve case"))(shortpreservecase) parameter.
1513 label(default service)
1514 dit(bf(default service (G)))
1516 This parameter specifies the name of a service which will be connected
1517 to if the service actually requested cannot be found. Note that the
1518 square brackets are em(NOT) given in the parameter value (see example
1521 There is no default value for this parameter. If this parameter is not
1522 given, attempting to connect to a nonexistent service results in an
1525 Typically the default service would be a link(bf(guest ok))(guestok),
1526 link(bf(read-only))(readonly) service.
1528 Also note that the apparent service name will be changed to equal that
1529 of the requested service, this is very useful as it allows you to use
1530 macros like link(bf(%S))(percentS) to make a wildcard service.
1532 Note also that any tt('_') characters in the name of the service used
1533 in the default service will get mapped to a tt('/'). This allows for
1539 default service = pub
1545 label(deletereadonly)
1546 dit(bf(delete readonly (S)))
1548 This parameter allows readonly files to be deleted. This is not
1549 normal DOS semantics, but is allowed by UNIX.
1551 This option may be useful for running applications such as rcs, where
1552 UNIX file ownership prevents changing file permissions, and DOS
1553 semantics prevent deletion of a read only file.
1556 delete readonly = No
1559 delete readonly = Yes
1561 label(deletevetofiles)
1562 dit(bf(delete veto files (S)))
1564 This option is used when Samba is attempting to delete a directory
1565 that contains one or more vetoed directories (see the link(bf('veto
1566 files'))(vetofiles) option). If this option is set to False (the
1567 default) then if a vetoed directory contains any non-vetoed files or
1568 directories then the directory delete will fail. This is usually what
1571 If this option is set to True, then Samba will attempt to recursively
1572 delete any files and directories within the vetoed directory. This can
1573 be useful for integration with file serving systems such as bf(NetAtalk),
1574 which create meta-files within directories you might normally veto
1575 DOS/Windows users from seeing (eg. tt(.AppleDouble))
1577 Setting tt('delete veto files = True') allows these directories to be
1578 transparently deleted when the parent directory is deleted (so long
1579 as the user has permissions to do so).
1581 See also the link(bf(veto files))(vetofiles) parameter.
1584 delete veto files = False
1587 delete veto files = True
1590 dit(bf(deny hosts (S)))
1592 The opposite of link(bf('allow hosts'))(allowhosts) - hosts listed
1593 here are em(NOT) permitted access to services unless the specific
1594 services have their own lists to override this one. Where the lists
1595 conflict, the link(bf('allow'))(allowhosts) list takes precedence.
1598 none (i.e., no hosts specifically excluded)
1601 deny hosts = 150.203.4. badhost.mynet.edu.au
1604 dit(bf(dfree command (G)))
1606 The dfree command setting should only be used on systems where a
1607 problem occurs with the internal disk space calculations. This has
1608 been known to happen with Ultrix, but may occur with other operating
1609 systems. The symptom that was seen was an error of "Abort Retry
1610 Ignore" at the end of each directory listing.
1612 This setting allows the replacement of the internal routines to
1613 calculate the total disk space and amount available with an external
1614 routine. The example below gives a possible script that might fulfill
1617 The external program will be passed a single parameter indicating a
1618 directory in the filesystem being queried. This will typically consist
1619 of the string tt("./"). The script should return two integers in
1620 ascii. The first should be the total disk space in blocks, and the
1621 second should be the number of available blocks. An optional third
1622 return value can give the block size in bytes. The default blocksize
1625 Note: Your script should em(NOT) be setuid or setgid and should be
1626 owned by (and writable only by) root!
1629 By default internal routines for determining the disk capacity
1630 and remaining space will be used.
1633 dfree command = /usr/local/samba/bin/dfree
1635 Where the script dfree (which must be made executable) could be:
1639 df $1 | tail -1 | awk '{print $2" "$4}'
1642 or perhaps (on Sys V based systems):
1646 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1649 Note that you may have to replace the command names with full
1650 path names on some systems.
1653 dit(bf(directory (S)))
1655 Synonym for link(bf(path))(path).
1657 label(directorymask)
1658 dit(bf(directory mask (S)))
1660 This parameter is the octal modes which are used when converting DOS
1661 modes to UNIX modes when creating UNIX directories.
1663 When a directory is created, the neccessary permissions are calculated
1664 according to the mapping from DOS modes to UNIX permissions, and the
1665 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1666 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1667 of a directory. Any bit em(*not*) set here will be removed from the
1668 modes set on a directory when it is created.
1670 The default value of this parameter removes the 'group' and 'other'
1671 write bits from the UNIX mode, allowing only the user who owns the
1672 directory to modify it.
1674 Following this Samba will bit-wise 'OR' the UNIX mode created from
1675 this parameter with the value of the "force directory mode"
1676 parameter. This parameter is set to 000 by default (ie. no extra mode
1679 See the link(bf("force directory mode"))(forcedirectorymode) parameter
1680 to cause particular mode bits to always be set on created directories.
1682 See also the link(bf("create mode"))(createmode) parameter for masking
1683 mode bits on created files.
1686 directory mask = 0755
1689 directory mask = 0775
1691 label(directorymode)
1692 dit(bf(directory mode (S)))
1694 Synonym for link(bf(directory mask))(directorymask).
1697 dit(bf(dns proxy (G)))
1699 Specifies that link(bf(nmbd))(nmbd.8.html) when acting as a WINS
1700 server and finding that a NetBIOS name has not been registered, should
1701 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1702 with the DNS server for that name on behalf of the name-querying
1705 Note that the maximum length for a NetBIOS name is 15 characters, so
1706 the DNS name (or DNS alias) can likewise only be 15 characters,
1709 link(bf(nmbd))(nmbd.8.html) spawns a second copy of itself to do the
1710 DNS name lookup requests, as doing a name lookup is a blocking action.
1712 See also the parameter link(bf(wins support))(winssupport).
1717 label(domainadmingroup)
1718 bf(domain admin group (G))
1720 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1721 Samba NT Domain Controller Code. It may be removed in a later release.
1722 To work with the latest code builds that may have more support for
1723 Samba NT Domain Controller functionality please subscibe to the
1724 mailing list bf(Samba-ntdom) available by sending email to
1725 email(listproc@samba.anu.edu.au)
1727 label(domainadminusers)
1728 dit(bf(domain admin users)
1730 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1731 Samba NT Domain Controller Code. It may be removed in a later release.
1732 To work with the latest code builds that may have more support for
1733 Samba NT Domain Controller functionality please subscibe to the
1734 mailing list bf(Samba-ntdom) available by sending email to
1735 email(listproc@samba.anu.edu.au)
1737 label(domain controller)
1738 dit(bf(domain controller (G)))
1740 This is a bf(DEPRECATED) parameter. It is currently not used within
1741 the Samba source and should be removed from all current smb.conf
1742 files. It is left behind for compatibility reasons.
1745 dit(bf(domain groups (G)))
1747 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1748 Samba NT Domain Controller Code. It may be removed in a later release.
1749 To work with the latest code builds that may have more support for
1750 Samba NT Domain Controller functionality please subscibe to the
1751 mailing list bf(Samba-ntdom) available by sending email to
1752 email(listproc@samba.anu.edu.au)
1754 label(domainguestgroup)
1755 dit(bf(domain guest group (G)))
1757 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1758 Samba NT Domain Controller Code. It may be removed in a later release.
1759 To work with the latest code builds that may have more support for
1760 Samba NT Domain Controller functionality please subscibe to the
1761 mailing list bf(Samba-ntdom) available by sending email to
1762 email(listproc@samba.anu.edu.au)
1764 label(domainguestusers)
1765 dit(bf(domain guest users (G)))
1767 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1768 Samba NT Domain Controller Code. It may be removed in a later release.
1769 To work with the latest code builds that may have more support for
1770 Samba NT Domain Controller functionality please subscibe to the
1771 mailing list bf(Samba-ntdom) available by sending email to
1772 email(listproc@samba.anu.edu.au)
1775 dit(bf(domain logons (G)))
1777 If set to true, the Samba server will serve Windows 95/98 Domain
1778 logons for the link(bf(workgroup))(workgroup) it is in. For more
1779 details on setting up this feature see the file DOMAINS.txt in the
1780 Samba documentation directory tt(docs/) shipped with the source code.
1782 Note that Win95/98 Domain logons are em(NOT) the same as Windows
1783 NT Domain logons. NT Domain logons require a Primary Domain Controller
1784 (PDC) for the Domain. It is inteded that in a future release Samba
1785 will be able to provide this functionality for Windows NT clients
1792 dit(bf(domain master (G)))
1794 Tell link(bf(nmbd))(nmbd.8.html) to enable WAN-wide browse list
1795 collation.Setting this option causes link(bf(nmbd))(nmbd.8.html) to
1796 claim a special domain specific NetBIOS name that identifies it as a
1797 domain master browser for its given
1798 link(bf(workgroup))(workgroup). Local master browsers in the same
1799 link(bf(workgroup))(workgroup) on broadcast-isolated subnets will give
1800 this link(bf(nmbd))(nmbd.8.html) their local browse lists, and then
1801 ask link(bf(smbd))(smbd.8.html) for a complete copy of the browse list
1802 for the whole wide area network. Browser clients will then contact
1803 their local master browser, and will receive the domain-wide browse
1804 list, instead of just the list for their broadcast-isolated subnet.
1806 Note that Windows NT Primary Domain Controllers expect to be able to
1807 claim this link(bf(workgroup))(workgroup) specific special NetBIOS
1808 name that identifies them as domain master browsers for that
1809 link(bf(workgroup))(workgroup) by default (ie. there is no way to
1810 prevent a Windows NT PDC from attempting to do this). This means that
1811 if this parameter is set and link(bf(nmbd))(nmbd.8.html) claims the
1812 special name for a link(bf(workgroup))(workgroup) before a Windows NT
1813 PDC is able to do so then cross subnet browsing will behave strangely
1820 dit(bf(dont descend (S)))
1822 There are certain directories on some systems (eg., the tt(/proc) tree
1823 under Linux) that are either not of interest to clients or are
1824 infinitely deep (recursive). This parameter allows you to specify a
1825 comma-delimited list of directories that the server should always show
1828 Note that Samba can be very fussy about the exact format of the "dont
1829 descend" entries. For example you may need tt("./proc") instead of
1830 just tt("/proc"). Experimentation is the best policy :-)
1833 none (i.e., all directories are OK to descend)
1836 dont descend = /proc,/dev
1838 label(dosfiletimeresolution)
1839 dit(bf(dos filetime resolution (S)))
1841 Under the DOS and Windows FAT filesystem, the finest granulatity on
1842 time resolution is two seconds. Setting this parameter for a share
1843 causes Samba to round the reported time down to the nearest two second
1844 boundary when a query call that requires one second resolution is made
1845 to link(bf(smbd))(smbd.8.html).
1847 This option is mainly used as a compatibility option for Visual C++
1848 when used against Samba shares. If oplocks are enabled on a share,
1849 Visual C++ uses two different time reading calls to check if a file
1850 has changed since it was last read. One of these calls uses a
1851 one-second granularity, the other uses a two second granularity. As
1852 the two second call rounds any odd second down, then if the file has a
1853 timestamp of an odd number of seconds then the two timestamps will not
1854 match and Visual C++ will keep reporting the file has changed. Setting
1855 this option causes the two timestamps to match, and Visual C++ is
1859 dos filetime resolution = False
1862 dos filetime resolution = True
1864 label(dos filetimes)
1865 dit(bf(dos filetimes (S)))
1867 Under DOS and Windows, if a user can write to a file they can change
1868 the timestamp on it. Under POSIX semantics, only the owner of the file
1869 or root may change the timestamp. By default, Samba runs with POSIX
1870 semantics and refuses to change the timestamp on a file if the user
1871 smbd is acting on behalf of is not the file owner. Setting this option
1872 to True allows DOS semantics and smbd will change the file timstamp as
1876 dos filetimes = False
1879 dos filetimes = True
1881 label(encryptpasswords)
1882 dit(bf(encrypt passwords (G)))
1884 This boolean controls whether encrypted passwords will be negotiated
1885 with the client. Note that Windows NT 4.0 SP3 and above and also
1886 Windows 98 will by default expect encrypted passwords unless a
1887 registry entry is changed. To use encrypted passwords in Samba see the
1888 file ENCRYPTION.txt in the Samba documentation directory tt(docs/)
1889 shipped with the source code.
1891 In order for encrypted passwords to work correctly
1892 link(bf(smbd))(smbd.8.html) must either have access to a local
1893 link(bf(smbpasswd (5)))(smbpasswd.5.html) file (see the
1894 link(bf(smbpasswd (8)))(smbpasswd.8.html) program for information on
1895 how to set up and maintain this file), or set the
1896 link(bf(security=))(security) parameter to either em("server") or
1897 em("domain") which causes link(bf(smbd))(smbd.8.html) to authenticate
1898 against another server.
1903 This is a synonym for link(bf(preexec))(preexec).
1906 label(fake directory create times)
1907 dit(bf(fake directory create times (S)))
1909 NTFS and Windows VFAT file systems keep a create time for all files
1910 and directories. This is not the same as the ctime - status change
1911 time - that Unix keeps, so Samba by default reports the earliest of
1912 the various times Unix does keep. Setting this parameter for a share
1913 causes Samba to always report midnight 1-1-1980 as the create time for
1916 This option is mainly used as a compatibility option for Visual C++
1917 when used against Samba shares. Visual C++ generated makefiles have
1918 the object directory as a dependency for each object file, and a make
1919 rule to create the directory. Also, when NMAKE compares timestamps it
1920 uses the creation time when examining a directory. Thus the object
1921 directory will be created if it does not exist, but once it does exist
1922 it will always have an earlier timestamp than the object files it
1925 However, Unix time semantics mean that the create time reported by
1926 Samba will be updated whenever a file is created or deleted in the
1927 directory. NMAKE therefore finds all object files in the object
1928 directory bar the last one built are out of date compared to the
1929 directory and rebuilds them. Enabling this option ensures directories
1930 always predate their contents and an NMAKE build will proceed as
1934 fake directory create times = False
1937 fake directory create times = True
1940 dit(bf(fake oplocks (S)))
1942 Oplocks are the way that SMB clients get permission from a server to
1943 locally cache file operations. If a server grants an oplock
1944 (opportunistic lock) then the client is free to assume that it is the
1945 only one accessing the file and it will aggressively cache file
1946 data. With some oplock types the client may even cache file open/close
1947 operations. This can give enormous performance benefits.
1949 When you set tt("fake oplocks = yes") link(bf(smbd))(smbd.8.html) will
1950 always grant oplock requests no matter how many clients are using the
1953 It is generally much better to use the real link(bf(oplock))(oplock)
1954 support rather than this parameter.
1956 If you enable this option on all read-only shares or shares that you
1957 know will only be accessed from one client at a time such as
1958 physically read-only media like CDROMs, you will see a big performance
1959 improvement on many operations. If you enable this option on shares
1960 where multiple clients may be accessing the files read-write at the
1961 same time you can get data corruption. Use this option carefully!
1963 This option is disabled by default.
1965 label(followsymlinks)
1966 dit(bf(follow symlinks (S)))
1968 This parameter allows the Samba administrator to stop
1969 link(bf(smbd))(smbd.8.html) from following symbolic links in a
1970 particular share. Setting this parameter to em("No") prevents any file
1971 or directory that is a symbolic link from being followed (the user
1972 will get an error). This option is very useful to stop users from
1973 adding a symbolic link to tt(/etc/pasword) in their home directory for
1974 instance. However it will slow filename lookups down slightly.
1976 This option is enabled (ie. link(bf(smbd))(smbd.8.html) will follow
1977 symbolic links) by default.
1979 label(forcecreatemode)
1980 dit(bf(force create mode (S)))
1982 This parameter specifies a set of UNIX mode bit permissions that will
1983 em(*always*) be set on a file created by Samba. This is done by
1984 bitwise 'OR'ing these bits onto the mode bits of a file that is being
1985 created. The default for this parameter is (in octel) 000. The modes
1986 in this parameter are bitwise 'OR'ed onto the file mode after the mask
1987 set in the link(bf("create mask"))(createmark) parameter is applied.
1989 See also the parameter link(bf("create mask"))(createmask) for details
1990 on masking mode bits on created files.
1993 force create mode = 000
1996 force create mode = 0755
1998 would force all created files to have read and execute permissions set
1999 for 'group' and 'other' as well as the read/write/execute bits set for
2002 label(forcedirectorymode)
2003 dit(bf(force directory mode (S)))
2005 This parameter specifies a set of UNIX mode bit permissions that will
2006 em(*always*) be set on a directory created by Samba. This is done by
2007 bitwise 'OR'ing these bits onto the mode bits of a directory that is
2008 being created. The default for this parameter is (in octel) 0000 which
2009 will not add any extra permission bits to a created directory. This
2010 operation is done after the mode mask in the parameter
2011 link(bf("directory mask"))(directorymask) is applied.
2013 See also the parameter link(bf("directory mask"))(directorymask) for
2014 details on masking mode bits on created directories.
2017 force directory mode = 000
2020 force directory mode = 0755
2022 would force all created directories to have read and execute
2023 permissions set for 'group' and 'other' as well as the
2024 read/write/execute bits set for the 'user'.
2027 dit(bf(force group (S)))
2029 This specifies a UNIX group name that will be assigned as the default
2030 primary group for all users connecting to this service. This is useful
2031 for sharing files by ensuring that all access to files on service will
2032 use the named group for their permissions checking. Thus, by assigning
2033 permissions for this group to the files and directories within this
2034 service the Samba administrator can restrict or allow sharing of these
2041 force group = agroup
2044 dit(bf(force user (S)))
2046 This specifies a UNIX user name that will be assigned as the default
2047 user for all users connecting to this service. This is useful for
2048 sharing files. You should also use it carefully as using it
2049 incorrectly can cause security problems.
2051 This user name only gets used once a connection is established. Thus
2052 clients still need to connect as a valid user and supply a valid
2053 password. Once connected, all file operations will be performed as the
2054 tt("forced user"), no matter what username the client connected as.
2056 This can be very useful.
2067 This parameter allows the administrator to configure the string that
2068 specifies the type of filesystem a share is using that is reported by
2069 link(bf(smbd))(smbd.8.html) when a client queries the filesystem type
2070 for a share. The default type is bf("NTFS") for compatibility with
2071 Windows NT but this can be changed to other strings such as "Samba" or
2081 dit(bf(getwd cache (G)))
2083 This is a tuning option. When this is enabled a cacheing algorithm
2084 will be used to reduce the time taken for getwd() calls. This can have
2085 a significant impact on performance, especially when the
2086 link(bf(widelinks))(widelinks) parameter is set to False.
2097 Synonym for link(bf("force group"))(forcegroup).
2100 dit(bf(guest account (S)))
2102 This is a username which will be used for access to services which are
2103 specified as link(bf('guest ok'))(guestok) (see below). Whatever
2104 privileges this user has will be available to any client connecting to
2105 the guest service. Typically this user will exist in the password
2106 file, but will not have a valid login. The user account bf("ftp") is
2107 often a good choice for this parameter. If a username is specified in
2108 a given service, the specified username overrides this one.
2110 One some systems the default guest account "nobody" may not be able to
2111 print. Use another account in this case. You should test this by
2112 trying to log in as your guest user (perhaps by using the tt("su -")
2113 command) and trying to print using the system print command such as
2114 bf(lpr (1)) or bf(lp (1)).
2117 specified at compile time, usually "nobody"
2123 dit(bf(guest ok (S)))
2125 If this parameter is em('yes') for a service, then no password is
2126 required to connect to the service. Privileges will be those of the
2127 link(bf(guest account))(guestaccount).
2129 See the section below on link(bf(security))(security) for more
2130 information about this option.
2139 dit(bf(guest only (S)))
2141 If this parameter is em('yes') for a service, then only guest
2142 connections to the service are permitted. This parameter will have no
2143 affect if link(bf("guest ok"))(guestok) or link(bf("public"))(public)
2144 is not set for the service.
2146 See the section below on link(bf(security))(security) for more
2147 information about this option.
2156 dit(bf(hide dot files (S)))
2158 This is a boolean parameter that controls whether files starting with
2159 a dot appear as hidden files.
2162 hide dot files = yes
2169 dit(bf(hide files(S)))
2171 This is a list of files or directories that are not visible but are
2172 accessible. The DOS 'hidden' attribute is applied to any files or
2173 directories that match.
2175 Each entry in the list must be separated by a tt('/'), which allows
2176 spaces to be included in the entry. tt('*') and tt('?') can be used
2177 to specify multiple files or directories as in DOS wildcards.
2179 Each entry must be a unix path, not a DOS path and must not include the
2180 unix directory separator tt('/').
2182 Note that the case sensitivity option is applicable in hiding files.
2184 Setting this parameter will affect the performance of Samba, as it
2185 will be forced to check all files and directories for a match as they
2188 See also link(bf("hide dot files"))(hidedotfiles), link(bf("veto
2189 files"))(vetofiles) and link(bf("case sensitive"))(casesensitive).
2192 No files or directories are hidden by this option (dot files are
2193 hidden by default because of the "hide dot files" option).
2196 tt( hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/)
2198 The above example is based on files that the Macintosh SMB client
2199 (DAVE) available from url(bf(Thursby))(www.thursby.com) creates for
2200 internal use, and also still hides all files beginning with a dot.
2203 dit(bf(homedir map (G)))
2205 If link(bf("nis homedir"))(nishomedir) is true, and
2206 link(bf(smbd))(smbd.8.html) is also acting as a Win95/98 link(bf(logon
2207 server))(domainlogons) then this parameter specifies the NIS (or YP)
2208 map from which the server for the user's home directory should be
2209 extracted. At present, only the Sun auto.home map format is
2210 understood. The form of the map is:
2212 tt(username server:/some/file/system)
2214 and the program will extract the servername from before the first
2215 tt(':'). There should probably be a better parsing system that copes
2216 with different map formats and also Amd (another automounter) maps.
2218 NB: A working NIS is required on the system for this option to work.
2220 See also link(bf("nis homedir"))(nishomedir), link(bf(domain
2221 logons))(domainlogons).
2224 homedir map = auto.home
2227 homedir map = amd.homedir
2230 dit(bf(hosts allow (S)))
2232 Synonym for link(bf(allow hosts))(allowhosts).
2235 dit(bf(hosts deny (S)))
2237 Synonym for link(bf(denyhosts))(denyhosts).
2240 dit(bf(hosts equiv (G)))
2242 If this global parameter is a non-null string, it specifies the name
2243 of a file to read for the names of hosts and users who will be allowed
2244 access without specifying a password.
2246 This is not be confused with link(bf(allow hosts))(allowhosts) which
2247 is about hosts access to services and is more useful for guest
2248 services. bf(hosts equiv) may be useful for NT clients which will not
2249 supply passwords to samba.
2251 NOTE: The use of bf(hosts equiv) can be a major security hole. This is
2252 because you are trusting the PC to supply the correct username. It is
2253 very easy to get a PC to supply a false username. I recommend that the
2254 bf(hosts equiv) option be only used if you really know what you are
2255 doing, or perhaps on a home network where you trust your spouse and
2256 kids. And only if you em(really) trust them :-).
2259 No host equivalences
2262 hosts equiv = /etc/hosts.equiv
2265 dit(bf(include (G)))
2267 This allows you to include one config file inside another. The file
2268 is included literally, as though typed in place.
2270 It takes the standard substitutions, except link(bf(%u))(percentu),
2271 link(bf(%P))(percentP) and link(bf(%S))(percentS).
2274 dit(bf(interfaces (G)))
2276 This option allows you to setup multiple network interfaces, so that
2277 Samba can properly handle browsing on all interfaces.
2279 The option takes a list of ip/netmask pairs. The netmask may either be
2280 a bitmask, or a bitlength.
2282 For example, the following line:
2284 tt(interfaces = 192.168.2.10/24 192.168.3.10/24)
2286 would configure two network interfaces with IP addresses 192.168.2.10
2287 and 192.168.3.10. The netmasks of both interfaces would be set to
2290 You could produce an equivalent result by using:
2292 tt(interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0)
2294 if you prefer that format.
2296 If this option is not set then Samba will attempt to find a primary
2297 interface, but won't attempt to configure more than one interface.
2299 See also link(bf("bind interfaces only"))(bindinterfacesonly).
2302 dit(bf(invalid users (S)))
2304 This is a list of users that should not be allowed to login to this
2305 service. This is really a em("paranoid") check to absolutely ensure an
2306 improper setting does not breach your security.
2308 A name starting with a tt('@') is interpreted as an NIS netgroup first
2309 (if your system supports NIS), and then as a UNIX group if the name
2310 was not found in the NIS netgroup database.
2312 A name starting with tt('+') is interpreted only by looking in the
2313 UNIX group database. A name starting with tt('&') is interpreted only
2314 by looking in the NIS netgroup database (this requires NIS to be
2315 working on your system). The characters tt('+') and tt('&') may be
2316 used at the start of the name in either order so the value
2317 tt("+&group") means check the UNIX group database, followed by the NIS
2318 netgroup database, and the value tt("&+group") means check the NIS
2319 netgroup database, followed by the UNIX group database (the same as
2320 the tt('@') prefix).
2322 The current servicename is substituted for
2323 link(bf(%S))(percentS). This is useful in the link(bf([homes]))(homes)
2326 See also link(bf("valid users"))(validusers).
2332 tt( invalid users = root fred admin @wheel)
2335 dit(bf(keepalive (G)))
2337 The value of the parameter (an integer) represents the number of
2338 seconds between bf('keepalive') packets. If this parameter is zero, no
2339 keepalive packets will be sent. Keepalive packets, if sent, allow the
2340 server to tell whether a client is still present and responding.
2342 Keepalives should, in general, not be needed if the socket being used
2343 has the SO_KEEPALIVE attribute set on it (see link(bf("socket
2344 options"))(socketoptions)). Basically you should only use this option
2345 if you strike difficulties.
2353 label(kerneloplocks)
2354 dit(bf(kernel oplocks (G)))
2356 For UNIXs that support kernel based oplocks (currently only IRIX but
2357 hopefully also Linux and FreeBSD soon) this parameter allows the use
2358 of them to be turned on or off.
2360 Kernel oplocks support allows Samba oplocks to be broken whenever a
2361 local UNIX process or NFS operation accesses a file that
2362 link(bf(smbd))(smbd.8.html) has oplocked. This allows complete data
2363 consistancy between SMB/CIFS, NFS and local file access (and is a
2364 em(very) cool feature :-).
2366 This parameter defaults to em("On") on systems that have the support,
2367 and em("off") on systems that don't. You should never need to touch
2371 dit(bf(ldap filter (G)))
2373 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2374 password database stored on an LDAP server back-end. These options
2375 are only available if your version of Samba was configured with
2376 the bf(--with-ldap) option.
2378 This parameter specifies an LDAP search filter used to search for a
2379 user name in the LDAP database. It must contain the string
2380 link(bf(%u))(percentU) which will be replaced with the user being
2387 dit(bf(ldap port (G)))
2389 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2390 password database stored on an LDAP server back-end. These options
2391 are only available if your version of Samba was configured with
2392 the bf(--with-ldap) option.
2394 This parameter specifies the TCP port number to use to contact
2401 dit(bf(ldap root (G)))
2403 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2404 password database stored on an LDAP server back-end. These options
2405 are only available if your version of Samba was configured with
2406 the bf(--with-ldap) option.
2408 This parameter specifies the entity to bind to the LDAP server
2409 as (essentially the LDAP username) in order to be able to perform
2410 queries and modifications on the LDAP database.
2412 See also link(bf(ldap root passwd))(ldaprootpasswd).
2415 empty string (no user defined)
2417 label(ldaprootpasswd)
2418 dit(bf(ldap root passwd (G)))
2420 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2421 password database stored on an LDAP server back-end. These options
2422 are only available if your version of Samba was configured with
2423 the bf(--with-ldap) option.
2425 This parameter specifies the password for the entity to bind to the
2426 LDAP server as (the password for this LDAP username) in order to be
2427 able to perform queries and modifications on the LDAP database.
2429 em(BUGS:) This parameter should em(NOT) be a readable parameter
2430 in the bf(smb.conf) file and will be removed once a correct
2431 storage place is found.
2433 See also link(bf(ldap root))(ldaproot).
2439 dit(bf(ldap server (G)))
2441 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2442 password database stored on an LDAP server back-end. These options
2443 are only available if your version of Samba was configured with
2444 the bf(--with-ldap) option.
2446 This parameter specifies the DNS name of the LDAP server to use
2447 for SMB/CIFS authentication purposes.
2450 ldap server = localhost
2453 dit(bf(ldap suffix (G)))
2455 This parameter is part of the em(EXPERIMENTAL) Samba support for a
2456 password database stored on an LDAP server back-end. These options
2457 are only available if your version of Samba was configured with
2458 the bf(--with-ldap) option.
2460 This parameter specifies the tt("dn") or LDAP em("distinguished name")
2461 that tells link(bf(smbd))(smbd.8.html) to start from when searching
2462 for an entry in the LDAP password database.
2468 dit(bf(lm announce (G)))
2470 This parameter determines if link(bf(nmbd))(nmbd.8.html) will produce
2471 Lanman announce broadcasts that are needed by bf(OS/2) clients in order
2472 for them to see the Samba server in their browse list. This parameter
2473 can have three values, tt("true"), tt("false"), or tt("auto"). The
2474 default is tt("auto"). If set to tt("false") Samba will never produce
2475 these broadcasts. If set to tt("true") Samba will produce Lanman
2476 announce broadcasts at a frequency set by the parameter link(bf("lm
2477 interval"))(lminterval). If set to tt("auto") Samba will not send Lanman
2478 announce broadcasts by default but will listen for them. If it hears
2479 such a broadcast on the wire it will then start sending them at a
2480 frequency set by the parameter link(bf("lm interval"))(lminterval).
2482 See also link(bf("lm interval"))(lminterval).
2491 dit(bf(lm interval (G)))
2493 If Samba is set to produce Lanman announce broadcasts needed by
2494 bf(OS/2) clients (see the link(bf("lm announce"))(lmannounce)
2495 parameter) then this parameter defines the frequency in seconds with
2496 which they will be made. If this is set to zero then no Lanman
2497 announcements will be made despite the setting of the link(bf("lm
2498 announce"))(lmannounce) parameter.
2500 See also link(bf("lm announce"))(lmannounce).
2509 dit(bf(load printers (G)))
2511 A boolean variable that controls whether all printers in the printcap
2512 will be loaded for browsing by default. See the
2513 link(bf("printers"))(printers) section for more details.
2522 dit(bf(local master (G)))
2524 This option allows link(bf(nmbd))(nmbd.8.html) to try and become a
2525 local master browser on a subnet. If set to False then
2526 link(bf(nmbd))(nmbd.8.html) will not attempt to become a local master
2527 browser on a subnet and will also lose in all browsing elections. By
2528 default this value is set to true. Setting this value to true doesn't
2529 mean that Samba will em(become) the local master browser on a subnet,
2530 just that link(bf(nmbd))(nmbd.8.html) will em(participate) in
2531 elections for local master browser.
2533 Setting this value to False will cause link(bf(nmbd))(nmbd.8.html)
2534 em(never) to become a local master browser.
2539 label(lockdirectory)
2540 dit(bf(lock directory (G)))
2542 This option specifies the directory where lock files will be placed.
2543 The lock files are used to implement the link(bf("max
2544 connections"))(maxconnections) option.
2547 lock directory = /tmp/samba
2550 lock directory = /usr/local/samba/var/locks
2553 dit(bf(locking (S)))
2555 This controls whether or not locking will be performed by the server
2556 in response to lock requests from the client.
2558 If tt("locking = no"), all lock and unlock requests will appear to
2559 succeed and all lock queries will indicate that the queried lock is
2562 If tt("locking = yes"), real locking will be performed by the server.
2564 This option em(may) be useful for read-only filesystems which em(may)
2565 not need locking (such as cdrom drives), although setting this
2566 parameter of tt("no") is not really recommended even in this case.
2568 Be careful about disabling locking either globally or in a specific
2569 service, as lack of locking may result in data corruption. You should
2570 never need to set this parameter.
2579 dit(bf(log file (G)))
2581 This options allows you to override the name of the Samba log file
2582 (also known as the debug file).
2584 This option takes the standard substitutions, allowing you to have
2585 separate log files for each user or machine.
2588 tt( log file = /usr/local/samba/var/log.%m)
2591 dit(bf(log level (G)))
2593 Synonym for link(bf("debug level"))(debuglevel).
2596 dit(bf(logon drive (G)))
2598 This parameter specifies the local path to which the home directory
2599 will be connected (see link(bf("logon home"))(logonhome)) and is only
2600 used by NT Workstations.
2602 Note that this option is only useful if Samba is set up as a
2603 link(bf(logon server))(domainlogons).
2609 dit(bf(logon home (G)))
2611 This parameter specifies the home directory location when a Win95/98 or
2612 NT Workstation logs into a Samba PDC. It allows you to do
2614 tt("NET USE H: /HOME")
2616 from a command prompt, for example.
2618 This option takes the standard substitutions, allowing you to have
2619 separate logon scripts for each user or machine.
2621 Note that this option is only useful if Samba is set up as a
2622 link(bf(logon server))(domainlogons).
2625 tt( logon home = "\\remote_smb_server\%U")
2628 tt( logon home = "\\%N\%U")
2631 dit(bf(logon path (G)))
2633 This parameter specifies the home directory where roaming profiles
2634 (USER.DAT / USER.MAN files for Windows 95/98) are stored.
2636 This option takes the standard substitutions, allowing you to have
2637 separate logon scripts for each user or machine. It also specifies
2638 the directory from which the tt("desktop"), tt("start menu"),
2639 tt("network neighborhood") and tt("programs") folders, and their
2640 contents, are loaded and displayed on your Windows 95/98 client.
2642 The share and the path must be readable by the user for the
2643 preferences and directories to be loaded onto the Windows 95/98
2644 client. The share must be writeable when the logs in for the first
2645 time, in order that the Windows 95/98 client can create the user.dat
2646 and other directories.
2648 Thereafter, the directories and any of contents can, if required, be
2649 made read-only. It is not adviseable that the USER.DAT file be made
2650 read-only - rename it to USER.MAN to achieve the desired effect (a
2651 em(MAN)datory profile).
2653 Windows clients can sometimes maintain a connection to the [homes]
2654 share, even though there is no user logged in. Therefore, it is vital
2655 that the logon path does not include a reference to the homes share
2656 (i.e setting this parameter to tt(\\%N\HOMES\profile_path) will cause
2659 This option takes the standard substitutions, allowing you to have
2660 separate logon scripts for each user or machine.
2662 Note that this option is only useful if Samba is set up as a
2663 link(bf(logon server))(domainlogons).
2666 tt( logon path = \\%N\%U\profile)
2669 tt( logon path = \\PROFILESERVER\HOME_DIR\%U\PROFILE)
2672 dit(bf(logon script (G)))
2674 This parameter specifies the batch file (.bat) or NT command file
2675 (.cmd) to be downloaded and run on a machine when a user successfully
2676 logs in. The file must contain the DOS style cr/lf line endings.
2677 Using a DOS-style editor to create the file is recommended.
2679 The script must be a relative path to the tt([netlogon]) service. If
2680 the tt([netlogon]) service specifies a link(bf(path))(path) of
2681 /usr/local/samba/netlogon, and logon script = STARTUP.BAT, then the
2682 file that will be downloaded is:
2684 tt(/usr/local/samba/netlogon/STARTUP.BAT)
2686 The contents of the batch file is entirely your choice. A suggested
2687 command would be to add tt(NET TIME \\SERVER /SET /YES), to force every
2688 machine to synchronise clocks with the same time server. Another use
2689 would be to add tt(NET USE U: \\SERVER\UTILS) for commonly used
2690 utilities, or tt(NET USE Q: \\SERVER\ISO9001_QA) for example.
2692 Note that it is particularly important not to allow write access to
2693 the tt([netlogon]) share, or to grant users write permission on the
2694 batch files in a secure environment, as this would allow the batch
2695 files to be arbitrarily modified and security to be breached.
2697 This option takes the standard substitutions, allowing you to have
2698 separate logon scripts for each user or machine.
2700 Note that this option is only useful if Samba is set up as a
2701 link(bf(logon server))(domainlogons).
2704 tt( logon script = scripts\%U.bat)
2706 label(lppausecommand)
2707 dit(bf(lppause command (S)))
2709 This parameter specifies the command to be executed on the server host
2710 in order to stop printing or spooling a specific print job.
2712 This command should be a program or script which takes a printer name
2713 and job number to pause the print job. One way of implementing this is
2714 by using job priorities, where jobs having a too low priority won't be
2715 sent to the printer.
2717 If a tt("%p") is given then the printername is put in its place. A
2718 tt("%j") is replaced with the job number (an integer). On HPUX (see
2719 link(bf(printing=hpux))(printing)), if the tt("-p%p") option is added
2720 to the lpq command, the job will show up with the correct status,
2721 i.e. if the job priority is lower than the set fence priority it will
2722 have the PAUSED status, whereas if the priority is equal or higher it
2723 will have the SPOOLED or PRINTING status.
2725 Note that it is good practice to include the absolute path in the
2726 lppause command as the PATH may not be available to the server.
2728 See also the link(bf("printing"))(printing) parameter.
2731 Currently no default value is given to this string, unless the
2732 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2733 which case the default is :
2735 tt( lp -i %p-%j -H hold)
2737 or if the value of the link(bf("printing"))(printing) parameter is tt(HPUX),
2738 then the default is:
2742 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2743 then the default is:
2745 tt( qstat -s -j%j -h)
2747 bf(Example for HPUX:)
2748 lppause command = /usr/bin/lpalt %p-%j -p0
2751 dit(bf(lpq cache time (G)))
2753 This controls how long lpq info will be cached for to prevent the
2754 bf(lpq) command being called too often. A separate cache is kept for
2755 each variation of the bf(lpq) command used by the system, so if you
2756 use different bf(lpq) commands for different users then they won't
2757 share cache information.
2759 The cache files are stored in tt(/tmp/lpq.xxxx) where xxxx is a hash of
2760 the bf(lpq) command in use.
2762 The default is 10 seconds, meaning that the cached results of a
2763 previous identical bf(lpq) command will be used if the cached data is
2764 less than 10 seconds old. A large value may be advisable if your
2765 bf(lpq) command is very slow.
2767 A value of 0 will disable cacheing completely.
2769 See also the link(bf("printing"))(printing) parameter.
2778 dit(bf(lpq command (S)))
2780 This parameter specifies the command to be executed on the server host
2781 in order to obtain tt("lpq")-style printer status information.
2783 This command should be a program or script which takes a printer name
2784 as its only parameter and outputs printer status information.
2786 Currently eight styles of printer status information are supported;
2787 BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX and SOFTQ. This covers most UNIX
2788 systems. You control which type is expected using the
2789 link(bf("printing ="))(printing) option.
2791 Some clients (notably Windows for Workgroups) may not correctly send
2792 the connection number for the printer they are requesting status
2793 information about. To get around this, the server reports on the first
2794 printer service connected to by the client. This only happens if the
2795 connection number sent is invalid.
2797 If a tt(%p) is given then the printername is put in its place. Otherwise
2798 it is placed at the end of the command.
2800 Note that it is good practice to include the absolute path in the bf(lpq
2801 command) as the PATH may not be available to the server.
2803 See also the link(bf("printing"))(printing) parameter.
2806 depends on the setting of link(bf("printing ="))(printing)
2809 tt( lpq command = /usr/bin/lpq %p)
2811 label(lpresumecommand)
2812 dit(bf(lpresume command (S)))
2814 This parameter specifies the command to be executed on the server host
2815 in order to restart or continue printing or spooling a specific print
2818 This command should be a program or script which takes a printer name
2819 and job number to resume the print job. See also the link(bf("lppause
2820 command"))(lppausecommand) parameter.
2822 If a tt(%p) is given then the printername is put in its place. A
2823 tt(%j) is replaced with the job number (an integer).
2825 Note that it is good practice to include the absolute path in the bf(lpresume
2826 command) as the PATH may not be available to the server.
2828 See also the link(bf("printing"))(printing) parameter.
2832 Currently no default value is given to this string, unless the
2833 value of the link(bf("printing"))(printing) parameter is tt(SYSV), in
2834 which case the default is :
2838 or if the value of the link(bf("printing"))(printing) parameter is tt(HPUX),
2839 then the default is:
2843 or if the value of the link(bf("printing"))(printing) parameter is tt(softq),
2844 then the default is:
2846 tt( qstat -s -j%j -r)
2848 bf(Example for HPUX:)
2849 tt( lpresume command = /usr/bin/lpalt %p-%j -p2)
2852 dit(bf(lprm command (S)))
2854 This parameter specifies the command to be executed on the server host
2855 in order to delete a print job.
2857 This command should be a program or script which takes a printer name
2858 and job number, and deletes the print job.
2860 If a tt(%p) is given then the printername is put in its place. A
2861 tt(%j) is replaced with the job number (an integer).
2863 Note that it is good practice to include the absolute path in the
2864 bf(lprm command) as the PATH may not be available to the server.
2866 See also the link(bf("printing"))(printing) parameter.
2869 depends on the setting of "printing ="
2872 tt( lprm command = /usr/bin/lprm -P%p %j)
2875 tt( lprm command = /usr/bin/cancel %p-%j)
2878 dit(bf(magic output (S)))
2880 This parameter specifies the name of a file which will contain output
2881 created by a magic script (see the link(bf("magic
2882 script"))(magicscript) parameter below).
2884 Warning: If two clients use the same link(bf("magic
2885 script"))(magicscript) in the same directory the output file content
2889 magic output = <magic script name>.out
2892 magic output = myfile.txt
2894 .SS magic script (S)
2895 This parameter specifies the name of a file which, if opened, will be
2896 executed by the server when the file is closed. This allows a UNIX script
2897 to be sent to the Samba host and executed on behalf of the connected user.
2899 Scripts executed in this way will be deleted upon completion, permissions
2902 If the script generates output, output will be sent to the file specified by
2905 parameter (see above).
2907 Note that some shells are unable to interpret scripts containing
2908 carriage-return-linefeed instead of linefeed as the end-of-line
2909 marker. Magic scripts must be executable "as is" on the host, which
2910 for some hosts and some shells will require filtering at the DOS end.
2912 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
2915 None. Magic scripts disabled.
2918 magic script = user.csh
2922 See the section on "NAME MANGLING"
2925 This is for those who want to directly map UNIX file names which are
2926 not representable on DOS. The mangling of names is not always what is
2927 needed. In particular you may have documents with file extensions
2928 that differ between DOS and UNIX. For example, under UNIX it is common
2929 to use .html for HTML files, whereas under DOS .htm is more commonly
2932 So to map 'html' to 'htm' you put:
2934 mangled map = (*.html *.htm)
2936 One very useful case is to remove the annoying ;1 off the ends of
2937 filenames on some CDROMS (only visible under some UNIXes). To do this
2938 use a map of (*;1 *)
2944 mangled map = (*;1 *)
2946 .SS mangled names (S)
2947 This controls whether non-DOS names under UNIX should be mapped to
2948 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2949 should simply be ignored.
2951 See the section on "NAME MANGLING" for details on how to control the
2954 If mangling is used then the mangling algorithm is as follows:
2956 - the first (up to) five alphanumeric characters before the rightmost dot of
2957 the filename are preserved, forced to upper case, and appear as the first (up
2958 to) five characters of the mangled name.
2960 - a tilde ("~") is appended to the first part of the mangled name, followed
2961 by a two-character unique sequence, based on the original root name
2962 (i.e., the original filename minus its final extension). The final
2963 extension is included in the hash calculation only if it contains any upper
2964 case characters or is longer than three characters.
2966 Note that the character to use may be specified using the "mangling
2967 char" option, if you don't like ~.
2969 - the first three alphanumeric characters of the final extension are preserved,
2970 forced to upper case and appear as the extension of the mangled name. The
2971 final extension is defined as that part of the original filename after the
2972 rightmost dot. If there are no dots in the filename, the mangled name will
2973 have no extension (except in the case of hidden files - see below).
2975 - files whose UNIX name begins with a dot will be presented as DOS hidden
2976 files. The mangled name will be created as for other filenames, but with the
2977 leading dot removed and "___" as its extension regardless of actual original
2978 extension (that's three underscores).
2981 The two-digit hash value consists of upper case alphanumeric characters.
2983 This algorithm can cause name collisions only if files in a directory share
2984 the same first five alphanumeric characters. The probability of such a clash
2987 The name mangling (if enabled) allows a file to be copied between UNIX
2988 directories from DOS while retaining the long UNIX filename. UNIX files can
2989 be renamed to a new extension from DOS and will retain the same basename.
2990 Mangled names do not change between sessions.
2997 .SS mangling char (S)
2998 This controls what character is used as the "magic" character in name
2999 mangling. The default is a ~ but this may interfere with some
3000 software. Use this option to set it to whatever you prefer.
3008 .SS mangled stack (G)
3009 This parameter controls the number of mangled names that should be cached in
3012 This stack is a list of recently mangled base names (extensions are only
3013 maintained if they are longer than 3 characters or contains upper case
3016 The larger this value, the more likely it is that mangled names can be
3017 successfully converted to correct long UNIX names. However, large stack
3018 sizes will slow most directory access. Smaller stacks save memory in the
3019 server (each stack element costs 256 bytes).
3021 It is not possible to absolutely guarantee correct long file names, so
3022 be prepared for some surprises!
3031 This controls whether the DOS archive attribute should be mapped to the
3032 UNIX owner execute bit. The DOS archive bit is set when a file has been modified
3033 since its last backup. One motivation for this option it to keep Samba/your
3034 PC from making any file it touches from becoming executable under UNIX.
3035 This can be quite annoying for shared source code, documents, etc...
3037 Note that this requires the 'create mask' to be set such that owner
3038 execute bit is not masked out (ie. it must include 100). See the
3039 parameter "create mask" for details.
3048 This controls whether DOS style hidden files should be mapped to the
3049 UNIX world execute bit.
3051 Note that this requires the 'create mask' to be set such that the world
3052 execute bit is not masked out (ie. it must include 001).
3053 See the parameter "create mask" for details.
3061 This controls whether DOS style system files should be mapped to the
3062 UNIX group execute bit.
3064 Note that this requires the 'create mask' to be set such that the group
3065 execute bit is not masked out (ie. it must include 010). See the parameter
3066 "create mask" for details.
3073 .SS max connections (S)
3074 This option allows the number of simultaneous connections to a
3075 service to be limited. If "max connections" is greater than 0 then
3076 connections will be refused if this number of connections to the
3077 service are already open. A value of zero mean an unlimited number of
3078 connections may be made.
3080 Record lock files are used to implement this feature. The lock files
3081 will be stored in the directory specified by the "lock directory" option.
3087 max connections = 10
3089 .SS max disk size (G)
3090 This option allows you to put an upper limit on the apparent size of
3091 disks. If you set this option to 100 then all shares will appear to be
3092 not larger than 100 MB in size.
3094 Note that this option does not limit the amount of data you can put on
3095 the disk. In the above case you could still store much more than 100
3096 MB on the disk, but if a client ever asks for the amount of free disk
3097 space or the total disk size then the result will be bounded by the
3098 amount specified in "max disk size".
3100 This option is primarily useful to work around bugs in some pieces of
3101 software that can't handle very large disks, particularly disks over
3104 A "max disk size" of 0 means no limit.
3110 max disk size = 1000
3112 .SS max log size (G)
3114 This option (an integer in kilobytes) specifies the max size the log
3115 file should grow to. Samba periodically checks the size and if it is
3116 exceeded it will rename the file, adding a .old extension.
3118 A size of 0 means no limit.
3128 This option controls the maximum number of outstanding simultaneous SMB
3129 operations that samba tells the client it will allow. You should never need
3130 to set this parameter.
3137 A synonym for this parameter is 'packet size'.
3141 This option tells nmbd what the default 'time to live' of NetBIOS
3142 names should be (in seconds) when nmbd is requesting a name using
3143 either a broadcast or from a WINS server. You should never need to
3144 change this parameter.
3149 .SS max wins ttl (G)
3151 This option tells nmbd when acting as a WINS server (wins support = true)
3152 what the maximum 'time to live' of NetBIOS names that nmbd will grant will
3153 be (in seconds). You should never need to change this parameter.
3154 The default is 3 days (259200 seconds).
3157 max wins ttl = 259200
3161 This option controls the maximum packet size that will be negotiated
3162 by Samba. The default is 65535, which is the maximum. In some cases
3163 you may find you get better performance with a smaller value. A value
3164 below 2048 is likely to cause problems.
3172 .SS message command (G)
3174 This specifies what command to run when the server receives a WinPopup
3177 This would normally be a command that would deliver the message
3178 somehow. How this is to be done is up to your imagination.
3182 message command = csh -c 'xedit %s;rm %s' &
3184 This delivers the message using xedit, then removes it
3185 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
3186 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
3187 immediately then your PCs may freeze when sending messages (they
3188 should recover after 30secs, hopefully).
3190 All messages are delivered as the global guest user. The command takes
3191 the standard substitutions, although %u won't work (%U may be better
3194 Apart from the standard substitutions, some additional ones apply. In
3197 %s = the filename containing the message
3199 %t = the destination that the message was sent to (probably the server
3202 %f = who the message is from
3204 You could make this command send mail, or whatever else takes your
3205 fancy. Please let me know of any really interesting ideas you have.
3207 Here's a way of sending the messages as mail to root:
3209 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
3211 If you don't have a message command then the message won't be
3212 delivered and Samba will tell the sender there was an
3213 error. Unfortunately WfWg totally ignores the error code and carries
3214 on regardless, saying that the message was delivered.
3216 If you want to silently delete it then try "message command = rm %s".
3218 For the really adventurous, try something like this:
3220 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
3223 this would execute the command as a script on the server, then give
3224 them the result in a WinPopup message. Note that this could cause a
3225 loop if you send a message from the server using smbclient! You better
3226 wrap the above in a script that checks for this :-)
3232 message command = csh -c 'xedit %s;rm %s' &
3234 .SS min print space (S)
3236 This sets the minimum amount of free disk space that must be available
3237 before a user will be able to spool a print job. It is specified in
3238 kilobytes. The default is 0, which means no limit.
3244 min print space = 2000
3246 .SS min wins ttl (G)
3248 This option tells nmbd when acting as a WINS server (wins support = true)
3249 what the minimum 'time to live' of NetBIOS names that nmbd will grant will
3250 be (in seconds). You should never need to change this parameter.
3251 The default is 6 hours (21600 seconds).
3254 min wins ttl = 21600
3256 .SS name resolve order (G)
3258 This option is used by the programs smbd, nmbd and smbclient to determine
3259 what naming services and in what order to resolve host names to IP addresses.
3260 This option is most useful in smbclient. The option takes a space separated
3261 string of different name resolution options. These are "lmhosts", "host",
3262 "wins" and "bcast". They cause names to be resolved as follows :
3264 lmhosts : Lookup an IP address in the Samba lmhosts file.
3265 host : Do a standard host name to IP address resolution, using the
3266 system /etc/hosts, NIS, or DNS lookups. This method of name
3267 resolution is operating system depended (for instance on Solaris
3268 this may be controlled by the /etc/nsswitch.conf file).
3269 wins : Query a name with the IP address listed in the "wins server ="
3270 parameter. If no WINS server has been specified this method will
3272 bcast : Do a broadcast on each of the known local interfaces listed in
3273 the "interfaces =" parameter. This is the least reliable of the
3274 name resolution methods as it depends on the target host being
3275 on a locally connected subnet.
3277 The default order is lmhosts, host, wins, bcast and these name resolution
3278 methods will be attempted in this order.
3280 This option was first introduced in Samba 1.9.18p4.
3283 name resolve order = lmhosts host wins bcast
3286 name resolve order = lmhosts bcast host
3288 This will cause the local lmhosts file to be examined first, followed
3289 by a broadcast attempt, followed by a normal system hostname lookup.
3291 .SS netbios aliases (G)
3293 This is a list of names that nmbd will advertise as additional
3294 names by which the Samba server is known. This allows one machine
3295 to appear in browse lists under multiple names. If a machine is
3296 acting as a browse server or logon server none of these names
3297 will be advertised as either browse server or logon servers, only
3298 the primary name of the machine will be advertised with these
3301 See also 'netbios name'.
3304 netbios aliases = TEST TEST1 TEST2
3306 .SS netbios name (G)
3308 This sets the NetBIOS name by which a Samba server is known. By
3309 default it is the same as the first component of the host's DNS name.
3310 If a machine is a browse server or logon server this name (or the
3311 first component of the hosts DNS name) will be the name that these
3312 services are advertised under.
3314 See also 'netbios aliases'.
3317 netbios name = MYNAME
3320 Get the home share server from a NIS (or YP) map. For unix systems that
3321 use an automounter, the user's home directory will often be mounted on
3322 a workstation on demand from a remote server. When the Samba logon server
3323 is not the actual home directory server, two network hops are required
3324 to access the home directory and this can be very slow especially with
3325 writing via Samba to an NFS mounted directory. This option allows samba
3326 to return the home share as being on a different server to the logon
3327 server and as long as a samba daemon is running on the home directory
3328 server, it will be mounted on the Samba client directly from the directory
3329 server. When Samba is returning the home share to the client, it will
3330 consult the NIS (or YP) map specified in "homedir map" and return the
3331 server listed there.
3339 .SS networkstation user login (G)
3340 This global parameter (new for 1.9.18p3) affects server level security.
3341 With this set (recommended) samba will do a full NetWkstaUserLogon to
3342 confirm that the client really should have login rights. This can cause
3343 problems with machines in trust relationships in which case you can
3344 disable it here, but be warned, we have heard that some NT machines
3345 will then allow anyone in with any password! Make sure you test it.
3347 In Samba 1.9.18p5 this parameter is of limited use, as smbd now
3348 explicitly tests for this NT bug and will refuse to use a password
3349 server that has the problem. The parameter now defaults to off,
3350 and it should not be neccessary to set this parameter to on. It will
3351 be removed in a future Samba release.
3354 networkstation user login = no
3357 networkstation user login = yes
3359 .SS null passwords (G)
3360 Allow or disallow access to accounts that have null passwords.
3366 null passwords = yes
3368 .SS ole locking compatibility (G)
3370 This parameter allows an administrator to turn off the byte range
3371 lock manipulation that is done within Samba to give compatibility
3372 for OLE applications. Windows OLE applications use byte range locking
3373 as a form of inter-process communication, by locking ranges of bytes
3374 around the 2^32 region of a file range. This can cause certain UNIX
3375 lock managers to crash or otherwise cause problems. Setting this
3376 parameter to "no" means you trust your UNIX lock manager to handle
3377 such cases correctly.
3380 ole locking compatibility = yes
3383 ole locking compatibility = no
3387 A synonym for this command is 'guest only'.
3390 This is a boolean option that controls whether connections with
3391 usernames not in the user= list will be allowed. By default this
3392 option is disabled so a client can supply a username to be used by
3395 Note that this also means Samba won't try to deduce usernames from the
3396 service name. This can be annoying for the [homes] section. To get
3397 around this you could use "user = %S" which means your "user" list
3398 will be just the service name, which for home directories is the name
3408 This boolean option tells smbd whether to issue oplocks (opportunistic
3409 locks) to file open requests on this share. The oplock code was introduced in
3410 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
3411 of access to files on Samba servers. It allows the clients to agressively
3412 cache files locally and you may want to disable this option for unreliable
3413 network environments (it is turned on by default in Windows NT Servers).
3414 For more information see the file Speed.txt in the Samba docs/ directory.
3416 Oplocks may be selectively turned off on certain files on a per share basis.
3417 See the 'veto oplock files' parameter.
3427 This integer value controls what level Samba advertises itself as for
3428 browse elections. See BROWSING.txt for details.
3431 The maximum transmit packet size during a raw read. This option is no
3432 longer implemented as of version 1.7.00, and is kept only so old
3433 configuration files do not become invalid.
3436 This string controls the "chat" conversation that takes places
3437 between smbd and the local password changing program to change the
3438 users password. The string describes a sequence of response-receive
3439 pairs that smbd uses to determine what to send to the passwd program
3440 and what to expect back. If the expected output is not received then
3441 the password is not changed.
3443 This chat sequence is often quite site specific, depending on what
3444 local methods are used for password control (such as NIS+ etc).
3446 The string can contain the macros %o and %n which are substituted for
3447 the old and new passwords respectively. It can also contain the
3448 standard macros \en \er \et and \es to give line-feed, carriage-return,
3451 The string can also contain a * which matches any sequence of
3454 Double quotes can be used to collect strings with spaces in them into
3457 If the send string in any part of the chat sequence is a fullstop "."
3458 then no string is sent. Similarly, is the expect string is a fullstop
3459 then no string is expected.
3461 Note that if the 'unix password sync' parameter is set to true,
3462 then this sequence is called *AS ROOT* when the SMB password in the
3463 smbpasswd file is being changed, without access to the old password
3464 cleartext. In this case the old password cleartext is set to ""
3467 See also 'unix password sync' and 'passwd chat debug'
3470 passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
3471 "*Reenter NEW password*" %n\en "*Password changed*"
3475 passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
3477 .SS passwd chat debug (G)
3479 This boolean specifies if the passwd chat script parameter is run
3480 in 'debug' mode. In this mode the strings passed to and received
3481 from the passwd chat are printed in the smbd log with a debug level
3482 of 100. This is a dangerous option as it will allow plaintext passwords
3483 to be seen in the smbd log. It is available to help Samba admins
3484 debug their passwd chat scripts and should be turned off after
3485 this has been done. This parameter is off by default.
3488 passwd chat debug = True
3491 passwd chat debug = False
3493 .SS passwd program (G)
3494 The name of a program that can be used to set user passwords.
3496 This is only available if you have enabled remote password changing at
3497 compile time (see the comments in the Makefile for details). Any occurrences
3498 of %u will be replaced with the user name. The user name is checked
3499 for existance before calling the password changing program.
3501 Also note that many passwd programs insist in "reasonable" passwords,
3502 such as a minimum length, or the inclusion of mixed case chars and
3503 digits. This can pose a problem as some clients (such as Windows for
3504 Workgroups) uppercase the password before sending it.
3506 Note that if the 'unix password sync' parameter is set to true,
3507 then this sequence is called *AS ROOT* when the SMB password in the
3508 smbpasswd file is being changed. If the 'unix passwd sync' parameter
3509 is set this parameter MUST USE ABSOLUTE PATHS for ALL programs called,
3510 and must be examined for security implications. Note that by default
3511 'unix password sync' is set to False.
3513 See also 'unix password sync'
3516 passwd program = /bin/passwd
3519 passwd program = /sbin/passwd %u
3521 .SS password level (G)
3522 Some client/server combinations have difficulty with mixed-case passwords.
3523 One offending client is Windows for Workgroups, which for some reason forces
3524 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
3525 when using COREPLUS!
3527 This parameter defines the maximum number of characters that may be upper case
3530 For example, say the password given was "FRED". If
3532 is set to 1 (one), the following combinations would be tried if "FRED" failed:
3533 "Fred", "fred", "fRed", "frEd", "freD". If
3534 .B password level was set to 2 (two), the following combinations would also be
3535 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
3537 The higher value this parameter is set to the more likely it is that a mixed
3538 case password will be matched against a single case password. However, you
3539 should be aware that use of this parameter reduces security and increases the
3540 time taken to process a new connection.
3542 A value of zero will cause only two attempts to be made - the password as is
3543 and the password in all-lower case.
3545 If you find the connections are taking too long with this option then
3546 you probably have a slow crypt() routine. Samba now comes with a fast
3547 "ufc crypt" that you can select in the Makefile. You should also make
3548 sure the PASSWORD_LENGTH option is correct for your system in local.h
3549 and includes.h. On most systems only the first 8 chars of a password
3550 are significant so PASSWORD_LENGTH should be 8, but on some longer
3551 passwords are significant. The includes.h file tries to select the
3552 right length for your system.
3560 .SS password server (G)
3562 By specifying the name of another SMB server (such as a WinNT box)
3563 with this option, and using "security = server" you can get Samba to
3564 do all its username/password validation via a remote server.
3566 This options sets the name of the password server to use. It must be a
3567 netbios name, so if the machine's netbios name is different from its
3568 internet name then you may have to add its netbios name to
3571 Note that with Samba 1.9.18p4 and above the name of the password
3572 server is looked up using the parameter "name resolve order=" and
3573 so may resolved by any method and order described in that parameter.
3575 The password server much be a machine capable of using the "LM1.2X002"
3576 or the "LM NT 0.12" protocol, and it must be in user level security
3579 NOTE: Using a password server means your UNIX box (running Samba) is
3580 only as secure as your password server. DO NOT CHOOSE A PASSWORD
3581 SERVER THAT YOU DON'T COMPLETELY TRUST.
3583 Never point a Samba server at itself for password serving. This will
3584 cause a loop and could lock up your Samba server!
3586 The name of the password server takes the standard substitutions, but
3587 probably the only useful one is %m, which means the Samba server will
3588 use the incoming client as the password server. If you use this then
3589 you better trust your clients, and you better restrict them with hosts
3592 If you list several hosts in the "password server" option then smbd
3593 will try each in turn till it finds one that responds. This is useful
3594 in case your primary server goes down.
3596 If you are using a WindowsNT server as your password server then you
3597 will have to ensure that your users are able to login from the Samba
3598 server, as the network logon will appear to come from there rather
3599 than from the users workstation.
3602 A synonym for this parameter is 'directory'.
3604 This parameter specifies a directory to which the user of the service is to
3605 be given access. In the case of printable services, this is where print data
3606 will spool prior to being submitted to the host for printing.
3608 For a printable service offering guest access, the service should be readonly
3609 and the path should be world-writable and have the sticky bit set. This is not
3610 mandatory of course, but you probably won't get the results you expect if you
3613 Any occurrences of %u in the path will be replaced with the username
3614 that the client is connecting as. Any occurrences of %m will be
3615 replaced by the name of the machine they are connecting from. These
3616 replacements are very useful for setting up pseudo home directories
3619 Note that this path will be based on 'root dir' if one was specified.
3628 This option specifies a command to be run whenever the service is
3629 disconnected. It takes the usual substitutions. The command may be run
3630 as the root on some systems.
3632 An interesting example may be do unmount server resources:
3634 postexec = /etc/umount /cdrom
3639 none (no command executed)
3642 postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
3645 This parameter forces a printer to interpret the print files as
3646 postscript. This is done by adding a %! to the start of print output.
3648 This is most useful when you have lots of PCs that persist in putting
3649 a control-D at the start of print jobs, which then confuses your
3660 This option specifies a command to be run whenever the service is
3661 connected to. It takes the usual substitutions.
3663 An interesting example is to send the users a welcome message every
3664 time they log in. Maybe a message of the day? Here is an example:
3666 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
3667 /usr/local/samba/bin/smbclient -M %m -I %I' &
3669 Of course, this could get annoying after a while :-)
3674 none (no command executed)
3677 preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
3679 .SS preferred master (G)
3680 This boolean parameter controls if Samba is a preferred master browser
3682 If this is set to true, on startup, samba will force an election,
3683 and it will have a slight advantage in winning the election.
3684 It is recommended that this parameter is used in conjunction
3685 with domain master = yes, so that samba can guarantee becoming
3688 Use this option with caution, because if there are several hosts
3689 (whether samba servers, Windows 95 or NT) that are preferred master
3690 browsers on the same subnet, they will each periodically and continuously
3691 attempt to become the local master browser. This will result in
3692 unnecessary broadcast traffic and reduced browsing capabilities.
3698 preferred master = no
3701 This is an alias for "auto services"
3703 .SS preserve case (S)
3705 This controls if new filenames are created with the case that the
3706 client passes, or if they are forced to be the "default" case.
3711 See the section on "NAME MANGLING" for a fuller discussion.
3713 .SS print command (S)
3714 After a print job has finished spooling to a service, this command will be
3715 used via a system() call to process the spool file. Typically the command
3716 specified will submit the spool file to the host's printing subsystem, but
3717 there is no requirement that this be the case. The server will not remove the
3718 spool file, so whatever command you specify should remove the spool file when
3719 it has been processed, otherwise you will need to manually remove old spool
3722 The print command is simply a text string. It will be used verbatim,
3723 with two exceptions: All occurrences of "%s" will be replaced by the
3724 appropriate spool file name, and all occurrences of "%p" will be
3725 replaced by the appropriate printer name. The spool file name is
3726 generated automatically by the server, the printer name is discussed
3729 The full path name will be used for the filename if %s is not preceded
3730 by a /. If you don't like this (it can stuff up some lpq output) then
3731 use %f instead. Any occurrences of %f get replaced by the spool
3732 filename without the full path at the front.
3734 The print command MUST contain at least one occurrence of "%s" or %f -
3735 the "%p" is optional. At the time a job is submitted, if no printer
3736 name is supplied the "%p" will be silently removed from the printer
3739 If specified in the [global] section, the print command given will be used
3740 for any printable service that does not have its own print command specified.
3742 If there is neither a specified print command for a printable service nor a
3743 global print command, spool files will be created but not processed and (most
3744 importantly) not removed.
3746 Note that printing may fail on some UNIXes from the "nobody"
3747 account. If this happens then create an alternative guest account that
3748 can print and set the "guest account" in the [global] section.
3750 You can form quite complex print commands by realising that they are
3751 just passed to a shell. For example the following will log a print
3752 job, print the file, then remove it. Note that ; is the usual
3753 separator for command in shell scripts.
3755 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
3757 You may have to vary this command considerably depending on how you
3758 normally print files on your system.
3761 print command = lpr -r -P %p %s
3764 print command = /usr/local/samba/bin/myprintscript %p %s
3769 A synonym for this parameter is 'print ok'.
3771 If this parameter is 'yes', then clients may open, write to and submit spool
3772 files on the directory specified for the service.
3774 Note that a printable service will ALWAYS allow writing to the service path
3775 (user privileges permitting) via the spooling of print data. The 'read only'
3776 parameter controls only non-printing access to the resource.
3784 .SS printcap name (G)
3785 This parameter may be used to override the compiled-in default printcap
3786 name used by the server (usually /etc/printcap). See the discussion of the
3787 [printers] section above for reasons why you might want to do this.
3789 On SystemV systems that use lpstat to list available printers you
3790 can use "printcap name = lpstat" to automatically obtain lists of
3791 available printers. This is the default for systems that define
3792 SYSV at compile time in Samba (this includes most SystemV based
3793 systems). If "printcap name" is set to lpstat on these systems then
3794 Samba will launch "lpstat -v" and attempt to parse the output to
3795 obtain a printer list.
3797 A minimal printcap file would look something like this:
3809 where the | separates aliases of a printer. The fact that the second
3810 alias has a space in it gives a hint to Samba that it's a comment.
3812 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
3813 will assume the file is in AIX "qconfig" format if the string
3814 "/qconfig" appears in the printcap filename.
3817 printcap name = /etc/printcap
3820 printcap name = /etc/myprintcap
3823 A synonym for this parameter is 'printer name'.
3825 This parameter specifies the name of the printer to which print jobs spooled
3826 through a printable service will be sent.
3828 If specified in the [global] section, the printer name given will be used
3829 for any printable service that does not have its own printer name specified.
3832 none (but may be 'lp' on many systems)
3835 printer name = laserwriter
3837 .SS printer driver (S)
3838 This option allows you to control the string that clients receive when
3839 they ask the server for the printer driver associated with a
3840 printer. If you are using Windows95 or WindowsNT then you can use this
3841 to automate the setup of printers on your system.
3843 You need to set this parameter to the exact string (case sensitive)
3844 that describes the appropriate printer driver for your system.
3845 If you don't know the exact string to use then you should first try
3846 with no "printer driver" option set and the client will give you a
3847 list of printer drivers. The appropriate strings are shown in a
3848 scrollbox after you have chosen the printer manufacturer.
3851 printer driver = HP LaserJet 4L
3853 .SS printer name (S)
3857 .SS printer driver file (G)
3858 This parameter tells Samba where the printer driver definition file,
3859 used when serving drivers to Windows 95 clients, is to be found. If
3860 this is not set, the default is :
3862 SAMBA_INSTALL_DIRECTORY/lib/printers.def
3864 This file is created from Windows 95 'msprint.def' files found on the
3865 Windows 95 client system. For more details on setting up serving of
3866 printer drivers to Windows 95 clients, see the documentation file
3867 docs/PRINTER_DRIVER.txt.
3870 None (set in compile).
3873 printer driver file&nb