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)
1318 client code page = 850
1322 client code page = 936
1325 dit(bf(codingsystem (G)))
1327 This parameter is used to determine how incoming Shift-JIS Japanese
1328 characters are mapped from the incoming link(bf("client code
1329 page"))(clientcodepage) used by the client, into file names in the
1330 UNIX filesystem. Only useful if link(bf("client code
1331 page"))(clientcodepage) is set to 932 (Japanese Shift-JIS).
1337 it() bf(SJIS)) Shift-JIS. Does no conversion of the incoming filename.
1339 it() bf(JIS8, J8BB, J8BH, J8@B, J8@J, J8@H )) Convert from incoming
1340 Shift-JIS to eight bit JIS code with different shift-in, shift out
1343 it() bf(JIS7, J7BB, J7BH, J7@B, J7@J, J7@H )) Convert from incoming
1344 Shift-JIS to seven bit JIS code with different shift-in, shift out
1347 it() bf(JUNET, JUBB, JUBH, JU@B, JU@J, JU@H )) Convert from incoming
1348 Shift-JIS to JUNET code with different shift-in, shift out codes.
1350 it() bf(EUC) Convert an incoming Shift-JIS character to EUC code.
1352 it() bf(HEX) Convert an incoming Shift-JIS character to a 3 byte hex
1353 representation, ie. tt(:AB).
1355 it() bf(CAP) Convert an incoming Shift-JIS character to the 3 byte hex
1356 representation used by the Columbia Appletalk Program (CAP),
1357 ie. tt(:AB). This is used for compatibility between Samba and CAP.
1362 dit(bf(comment (S)))
1364 This is a text field that is seen next to a share when a client does a
1365 queries the server, either via the network neighborhood or via "net
1366 view" to list what shares are available.
1368 If you want to set the string that is displayed next to the machine
1369 name then see the server string command.
1377 comment = Fred's Files
1380 dit(bf(config file (G)))
1382 This allows you to override the config file to use, instead of the
1383 default (usually bf(smb.conf)). There is a chicken and egg problem
1384 here as this option is set in the config file!
1386 For this reason, if the name of the config file has changed when the
1387 parameters are loaded then it will reload them from the new config
1390 This option takes the usual substitutions, which can be very useful.
1392 If the config file doesn't exist then it won't be loaded (allowing you
1393 to special case the config files of just a few clients).
1397 tt( config file = /usr/local/samba/lib/smb.conf.%m)
1402 This parameter allows you to em('clone') service entries. The specified
1403 service is simply duplicated under the current service's name. Any
1404 parameters specified in the current section will override those in the
1405 section being copied.
1407 This feature lets you set up a 'template' service and create similar
1408 services easily. Note that the service being copied must occur earlier
1409 in the configuration file than the service doing the copying.
1418 dit(bf(create mask (S)))
1420 A synonym for this parameter is link(bf('create mode'))(createmode).
1422 When a file is created, the neccessary permissions are calculated
1423 according to the mapping from DOS modes to UNIX permissions, and the
1424 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1425 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1426 of a file. Any bit em(*not*) set here will be removed from the modes set
1427 on a file when it is created.
1429 The default value of this parameter removes the 'group' and 'other'
1430 write and execute bits from the UNIX modes.
1432 Following this Samba will bit-wise 'OR' the UNIX mode created from
1433 this parameter with the value of the "force create mode" parameter
1434 which is set to 000 by default.
1436 This parameter does not affect directory modes. See the parameter
1437 link(bf('directory mode'))(directorymode) for details.
1439 See also the link(bf("force create mode"))(forcecreatemode) parameter
1440 for forcing particular mode bits to be set on created files. See also
1441 the link(bf("directory mode"))(directorymode) parameter for masking
1442 mode bits on created directories.
1451 dit(bf(create mode (S)))
1453 This is a synonym for link(bf(create mask))(createmask).
1456 dit(bf(deadtime (G)))
1458 The value of the parameter (a decimal integer) represents the number
1459 of minutes of inactivity before a connection is considered dead, and
1460 it is disconnected. The deadtime only takes effect if the number of
1463 This is useful to stop a server's resources being exhausted by a large
1464 number of inactive connections.
1466 Most clients have an auto-reconnect feature when a connection is
1467 broken so in most cases this parameter should be transparent to users.
1469 Using this parameter with a timeout of a few minutes is recommended
1472 A deadtime of zero indicates that no auto-disconnection should be
1481 label(debug timestamp (G))
1483 Samba2.0 debug log messages are timestamped by default. If you
1484 are running at a high debug level these timestamps can be
1485 distracting. This boolean parameter allows them to be turned
1489 debug timestamp = Yes
1492 debug timestamp = No
1495 dit(bf(debug level (G)))
1497 The value of the parameter (an integer) allows the debug level
1498 (logging level) to be specified in the bf(smb.conf) file. This is to
1499 give greater flexibility in the configuration of the system.
1501 The default will be the debug level specified on the command line
1502 or level zero if none was specified.
1508 dit(bf(default (G)))
1510 A synonym for link(bf(default service))(defaultservice).
1513 dit(bf(default case (S)))
1515 See the section on link(bf("NAME MANGLING"))(NAMEMANGLING). Also note
1516 the link(bf("short preserve case"))(shortpreservecase) parameter.
1518 label(default service)
1519 dit(bf(default service (G)))
1521 This parameter specifies the name of a service which will be connected
1522 to if the service actually requested cannot be found. Note that the
1523 square brackets are em(NOT) given in the parameter value (see example
1526 There is no default value for this parameter. If this parameter is not
1527 given, attempting to connect to a nonexistent service results in an
1530 Typically the default service would be a link(bf(guest ok))(guestok),
1531 link(bf(read-only))(readonly) service.
1533 Also note that the apparent service name will be changed to equal that
1534 of the requested service, this is very useful as it allows you to use
1535 macros like link(bf(%S))(percentS) to make a wildcard service.
1537 Note also that any tt('_') characters in the name of the service used
1538 in the default service will get mapped to a tt('/'). This allows for
1545 default service = pub
1551 label(deletereadonly)
1552 dit(bf(delete readonly (S)))
1554 This parameter allows readonly files to be deleted. This is not
1555 normal DOS semantics, but is allowed by UNIX.
1557 This option may be useful for running applications such as rcs, where
1558 UNIX file ownership prevents changing file permissions, and DOS
1559 semantics prevent deletion of a read only file.
1562 delete readonly = No
1565 delete readonly = Yes
1567 label(deletevetofiles)
1568 dit(bf(delete veto files (S)))
1570 This option is used when Samba is attempting to delete a directory
1571 that contains one or more vetoed directories (see the link(bf('veto
1572 files'))(vetofiles) option). If this option is set to False (the
1573 default) then if a vetoed directory contains any non-vetoed files or
1574 directories then the directory delete will fail. This is usually what
1577 If this option is set to True, then Samba will attempt to recursively
1578 delete any files and directories within the vetoed directory. This can
1579 be useful for integration with file serving systems such as bf(NetAtalk),
1580 which create meta-files within directories you might normally veto
1581 DOS/Windows users from seeing (eg. tt(.AppleDouble))
1583 Setting tt('delete veto files = True') allows these directories to be
1584 transparently deleted when the parent directory is deleted (so long
1585 as the user has permissions to do so).
1587 See also the link(bf(veto files))(vetofiles) parameter.
1590 delete veto files = False
1593 delete veto files = True
1596 dit(bf(deny hosts (S)))
1598 The opposite of link(bf('allow hosts'))(allowhosts) - hosts listed
1599 here are em(NOT) permitted access to services unless the specific
1600 services have their own lists to override this one. Where the lists
1601 conflict, the link(bf('allow'))(allowhosts) list takes precedence.
1604 none (i.e., no hosts specifically excluded)
1607 deny hosts = 150.203.4. badhost.mynet.edu.au
1610 dit(bf(dfree command (G)))
1612 The dfree command setting should only be used on systems where a
1613 problem occurs with the internal disk space calculations. This has
1614 been known to happen with Ultrix, but may occur with other operating
1615 systems. The symptom that was seen was an error of "Abort Retry
1616 Ignore" at the end of each directory listing.
1618 This setting allows the replacement of the internal routines to
1619 calculate the total disk space and amount available with an external
1620 routine. The example below gives a possible script that might fulfill
1623 The external program will be passed a single parameter indicating a
1624 directory in the filesystem being queried. This will typically consist
1625 of the string tt("./"). The script should return two integers in
1626 ascii. The first should be the total disk space in blocks, and the
1627 second should be the number of available blocks. An optional third
1628 return value can give the block size in bytes. The default blocksize
1631 Note: Your script should em(NOT) be setuid or setgid and should be
1632 owned by (and writable only by) root!
1635 By default internal routines for determining the disk capacity
1636 and remaining space will be used.
1639 dfree command = /usr/local/samba/bin/dfree
1641 Where the script dfree (which must be made executable) could be:
1645 df $1 | tail -1 | awk '{print $2" "$4}'
1648 or perhaps (on Sys V based systems):
1652 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
1655 Note that you may have to replace the command names with full
1656 path names on some systems.
1659 dit(bf(directory (S)))
1661 Synonym for link(bf(path))(path).
1663 label(directorymask)
1664 dit(bf(directory mask (S)))
1666 This parameter is the octal modes which are used when converting DOS
1667 modes to UNIX modes when creating UNIX directories.
1669 When a directory is created, the neccessary permissions are calculated
1670 according to the mapping from DOS modes to UNIX permissions, and the
1671 resulting UNIX mode is then bit-wise 'AND'ed with this parameter.
1672 This parameter may be thought of as a bit-wise MASK for the UNIX modes
1673 of a directory. Any bit em(*not*) set here will be removed from the
1674 modes set on a directory when it is created.
1676 The default value of this parameter removes the 'group' and 'other'
1677 write bits from the UNIX mode, allowing only the user who owns the
1678 directory to modify it.
1680 Following this Samba will bit-wise 'OR' the UNIX mode created from
1681 this parameter with the value of the "force directory mode"
1682 parameter. This parameter is set to 000 by default (ie. no extra mode
1685 See the link(bf("force directory mode"))(forcedirectorymode) parameter
1686 to cause particular mode bits to always be set on created directories.
1688 See also the link(bf("create mode"))(createmode) parameter for masking
1689 mode bits on created files.
1692 directory mask = 0755
1695 directory mask = 0775
1697 label(directorymode)
1698 dit(bf(directory mode (S)))
1700 Synonym for link(bf(directory mask))(directorymask).
1703 dit(bf(dns proxy (G)))
1705 Specifies that link(bf(nmbd))(nmbd.8.html) when acting as a WINS
1706 server and finding that a NetBIOS name has not been registered, should
1707 treat the NetBIOS name word-for-word as a DNS name and do a lookup
1708 with the DNS server for that name on behalf of the name-querying
1711 Note that the maximum length for a NetBIOS name is 15 characters, so
1712 the DNS name (or DNS alias) can likewise only be 15 characters,
1715 link(bf(nmbd))(nmbd.8.html) spawns a second copy of itself to do the
1716 DNS name lookup requests, as doing a name lookup is a blocking action.
1718 See also the parameter link(bf(wins support))(winssupport).
1723 label(domainadmingroup)
1724 bf(domain admin group (G))
1726 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1727 Samba NT Domain Controller Code. It may be removed in a later release.
1728 To work with the latest code builds that may have more support for
1729 Samba NT Domain Controller functionality please subscibe to the
1730 mailing list bf(Samba-ntdom) available by sending email to
1731 email(listproc@samba.anu.edu.au)
1733 label(domainadminusers)
1734 dit(bf(domain admin users)
1736 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1737 Samba NT Domain Controller Code. It may be removed in a later release.
1738 To work with the latest code builds that may have more support for
1739 Samba NT Domain Controller functionality please subscibe to the
1740 mailing list bf(Samba-ntdom) available by sending email to
1741 email(listproc@samba.anu.edu.au)
1743 label(domain controller)
1744 dit(bf(domain controller (G)))
1746 This is a bf(DEPRECATED) parameter. It is currently not used within
1747 the Samba source and should be removed from all current smb.conf
1748 files. It is left behind for compatibility reasons.
1751 dit(bf(domain groups (G)))
1753 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1754 Samba NT Domain Controller Code. It may be removed in a later release.
1755 To work with the latest code builds that may have more support for
1756 Samba NT Domain Controller functionality please subscibe to the
1757 mailing list bf(Samba-ntdom) available by sending email to
1758 email(listproc@samba.anu.edu.au)
1760 label(domainguestgroup)
1761 dit(bf(domain guest group (G)))
1763 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1764 Samba NT Domain Controller Code. It may be removed in a later release.
1765 To work with the latest code builds that may have more support for
1766 Samba NT Domain Controller functionality please subscibe to the
1767 mailing list bf(Samba-ntdom) available by sending email to
1768 email(listproc@samba.anu.edu.au)
1770 label(domainguestusers)
1771 dit(bf(domain guest users (G)))
1773 This is an bf(EXPERIMENTAL) parameter that is part of the unfinished
1774 Samba NT Domain Controller Code. It may be removed in a later release.
1775 To work with the latest code builds that may have more support for
1776 Samba NT Domain Controller functionality please subscibe to the
1777 mailing list bf(Samba-ntdom) available by sending email to
1778 email(listproc@samba.anu.edu.au)
1781 dit(bf(domain logons (G)))
1783 If set to true, the Samba server will serve Windows 95/98 Domain
1784 logons for the link(bf(workgroup))(workgroup) it is in. For more
1785 details on setting up this feature see the file DOMAINS.txt in the
1786 Samba documentation directory tt(docs/) shipped with the source code.
1788 Note that Win95/98 Domain logons are em(NOT) the same as Windows
1789 NT Domain logons. NT Domain logons require a Primary Domain Controller
1790 (PDC) for the Domain. It is inteded that in a future release Samba
1791 will be able to provide this functionality for Windows NT clients
1798 dit(bf(domain master (G)))
1800 Tell link(bf(nmbd))(nmbd.8.html) to enable WAN-wide browse list
1801 collation.Setting this option causes link(bf(nmbd))(nmbd.8.html) to
1802 claim a special domain specific NetBIOS name that identifies it as a
1803 domain master browser for its given
1804 link(bf(workgroup))(workgroup). Local master browsers in the same
1805 link(bf(workgroup))(workgroup) on broadcast-isolated subnets will give
1806 this link(bf(nmbd))(nmbd.8.html) their local browse lists, and then
1807 ask link(bf(smbd))(smbd.8.html) for a complete copy of the browse list
1808 for the whole wide area network. Browser clients will then contact
1809 their local master browser, and will receive the domain-wide browse
1810 list, instead of just the list for their broadcast-isolated subnet.
1812 Note that Windows NT Primary Domain Controllers expect to be able to
1813 claim this link(bf(workgroup))(workgroup) specific special NetBIOS
1814 name that identifies them as domain master browsers for that
1815 link(bf(workgroup))(workgroup) by default (ie. there is no way to
1816 prevent a Windows NT PDC from attempting to do this). This means that
1817 if this parameter is set and link(bf(nmbd))(nmbd.8.html) claims the
1818 special name for a link(bf(workgroup))(workgroup) before a Windows NT
1819 PDC is able to do so then cross subnet browsing will behave strangely
1827 dit(bf(dont descend (S)))
1829 There are certain directories on some systems (eg., the tt(/proc) tree
1830 under Linux) that are either not of interest to clients or are
1831 infinitely deep (recursive). This parameter allows you to specify a
1832 comma-delimited list of directories that the server should always show
1835 Note that Samba can be very fussy about the exact format of the "dont
1836 descend" entries. For example you may need tt("./proc") instead of
1837 just tt("/proc"). Experimentation is the best policy :-)
1840 none (i.e., all directories are OK to descend)
1843 dont descend = /proc,/dev
1845 label(dosfiletimeresolution)
1846 dit(bf(dos filetime resolution (S)))
1848 Under the DOS and Windows FAT filesystem, the finest granulatity on
1849 time resolution is two seconds. Setting this parameter for a share
1850 causes Samba to round the reported time down to the nearest two second
1851 boundary when a query call that requires one second resolution is made
1852 to link(bf(smbd))(smbd.8.html).
1854 This option is mainly used as a compatibility option for Visual C++
1855 when used against Samba shares. If oplocks are enabled on a share,
1856 Visual C++ uses two different time reading calls to check if a file
1857 has changed since it was last read. One of these calls uses a
1858 one-second granularity, the other uses a two second granularity. As
1859 the two second call rounds any odd second down, then if the file has a
1860 timestamp of an odd number of seconds then the two timestamps will not
1861 match and Visual C++ will keep reporting the file has changed. Setting
1862 this option causes the two timestamps to match, and Visual C++ is
1866 dos filetime resolution = False
1869 dos filetime resolution = True
1871 label(dos filetimes)
1872 dit(bf(dos filetimes (S)))
1874 Under DOS and Windows, if a user can write to a file they can change
1875 the timestamp on it. Under POSIX semantics, only the owner of the file
1876 or root may change the timestamp. By default, Samba runs with POSIX
1877 semantics and refuses to change the timestamp on a file if the user
1878 smbd is acting on behalf of is not the file owner. Setting this option
1879 to True allows DOS semantics and smbd will change the file timstamp as
1883 dos filetimes = False
1886 dos filetimes = True
1888 label(encryptpasswords)
1889 dit(bf(encrypt passwords (G)))
1891 This boolean controls whether encrypted passwords will be negotiated
1892 with the client. Note that Windows NT 4.0 SP3 and above and also
1893 Windows 98 will by default expect encrypted passwords unless a
1894 registry entry is changed. To use encrypted passwords in Samba see the
1895 file ENCRYPTION.txt in the Samba documentation directory tt(docs/)
1896 shipped with the source code.
1898 In order for encrypted passwords to work correctly
1899 link(bf(smbd))(smbd.8.html) must either have access to a local
1900 link(bf(smbpasswd (5)))(smbpasswd.5.html) file (see the
1901 link(bf(smbpasswd (8)))(smbpasswd.8.html) program for information on
1902 how to set up and maintain this file), or set the
1903 link(bf(security=))(security) parameter to either em("server") or
1904 em("domain") which causes link(bf(smbd))(smbd.8.html) to authenticate
1905 against another server.
1910 This is a synonym for link(bf(preexec))(preexec).
1913 label(fake directory create times)
1914 dit(bf(fake directory create times (S)))
1916 NTFS and Windows VFAT file systems keep a create time for all files
1917 and directories. This is not the same as the ctime - status change
1918 time - that Unix keeps, so Samba by default reports the earliest of
1919 the various times Unix does keep. Setting this parameter for a share
1920 causes Samba to always report midnight 1-1-1980 as the create time for
1923 This option is mainly used as a compatibility option for Visual C++
1924 when used against Samba shares. Visual C++ generated makefiles have
1925 the object directory as a dependency for each object file, and a make
1926 rule to create the directory. Also, when NMAKE compares timestamps it
1927 uses the creation time when examining a directory. Thus the object
1928 directory will be created if it does not exist, but once it does exist
1929 it will always have an earlier timestamp than the object files it
1932 However, Unix time semantics mean that the create time reported by
1933 Samba will be updated whenever a file is created or deleted in the
1934 directory. NMAKE therefore finds all object files in the object
1935 directory bar the last one built are out of date compared to the
1936 directory and rebuilds them. Enabling this option ensures directories
1937 always predate their contents and an NMAKE build will proceed as
1941 fake directory create times = False
1944 fake directory create times = True
1947 dit(bf(fake oplocks (S)))
1949 Oplocks are the way that SMB clients get permission from a server to
1950 locally cache file operations. If a server grants an oplock
1951 (opportunistic lock) then the client is free to assume that it is the
1952 only one accessing the file and it will aggressively cache file
1953 data. With some oplock types the client may even cache file open/close
1954 operations. This can give enormous performance benefits.
1956 When you set tt("fake oplocks = yes") link(bf(smbd))(smbd.8.html) will
1957 always grant oplock requests no matter how many clients are using the
1960 It is generally much better to use the real link(bf(oplock))(oplock)
1961 support rather than this parameter.
1963 If you enable this option on all read-only shares or shares that you
1964 know will only be accessed from one client at a time such as
1965 physically read-only media like CDROMs, you will see a big performance
1966 improvement on many operations. If you enable this option on shares
1967 where multiple clients may be accessing the files read-write at the
1968 same time you can get data corruption. Use this option carefully!
1970 This option is disabled by default.
1972 label(followsymlinks)
1973 dit(bf(follow symlinks (S)))
1975 This parameter allows the Samba administrator to stop
1976 link(bf(smbd))(smbd.8.html) from following symbolic links in a
1977 particular share. Setting this parameter to em("No") prevents any file
1978 or directory that is a symbolic link from being followed (the user
1979 will get an error). This option is very useful to stop users from
1980 adding a symbolic link to tt(/etc/pasword) in their home directory for
1981 instance. However it will slow filename lookups down slightly.
1983 This option is enabled (ie. link(bf(smbd))(smbd.8.html) will follow
1984 symbolic links) by default.
1986 label(forcecreatemode)
1987 dit(bf(force create mode (S)))
1989 This parameter specifies a set of UNIX mode bit permissions that will
1990 em(*always*) be set on a file created by Samba. This is done by
1991 bitwise 'OR'ing these bits onto the mode bits of a file that is being
1992 created. The default for this parameter is (in octel) 000. The modes
1993 in this parameter are bitwise 'OR'ed onto the file mode after the mask
1994 set in the link(bf("create mask"))(createmark) parameter is applied.
1996 See also the parameter link(bf("create mask"))(createmask) for details
1997 on masking mode bits on created files.
2000 force create mode = 000
2003 force create mode = 0755
2005 would force all created files to have read and execute permissions set
2006 for 'group' and 'other' as well as the read/write/execute bits set for
2009 label(forcedirectorymode)
2010 dit(bf(force directory mode (S)))
2012 This parameter specifies a set of UNIX mode bit permissions that will
2013 em(*always*) be set on a directory created by Samba. This is done by
2014 bitwise 'OR'ing these bits onto the mode bits of a directory that is
2015 being created. The default for this parameter is (in octel) 0000 which
2016 will not add any extra permission bits to a created directory. This
2017 operation is done after the mode mask in the parameter
2018 link(bf("directory mask"))(directorymask) is applied.
2020 See also the parameter link(bf("directory mask"))(directorymask) for
2021 details on masking mode bits on created directories.
2024 force directory mode = 000
2027 force directory mode = 0755
2029 would force all created directories to have read and execute
2030 permissions set for 'group' and 'other' as well as the
2031 read/write/execute bits set for the 'user'.
2034 dit(bf(force group (S)))
2036 This specifies a UNIX group name that will be assigned as the default
2037 primary group for all users connecting to this service. This is useful
2038 for sharing files by ensuring that all access to files on service will
2039 use the named group for their permissions checking. Thus, by assigning
2040 permissions for this group to the files and directories within this
2041 service the Samba administrator can restrict or allow sharing of these
2048 force group = agroup
2051 dit(bf(force user (S)))
2053 This specifies a UNIX user name that will be assigned as the default
2054 user for all users connecting to this service. This is useful for
2055 sharing files. You should also use it carefully as using it
2056 incorrectly can cause security problems.
2058 This user name only gets used once a connection is established. Thus
2059 clients still need to connect as a valid user and supply a valid
2060 password. Once connected, all file operations will be performed as the
2061 tt("forced user"), no matter what username the client connected as.
2063 This can be very useful
2073 This parameter allows the administrator to configure the string that
2074 specifies the type of filesystem a share is using that is reported by
2075 link(bf(smbd))(smbd.8.html) when a client queries the filesystem type
2076 for a share. The default type is bf("NTFS") for compatibility with
2077 Windows NT but this can be changed to other strings such as "Samba" or
2087 dit(bf(getwd cache (G)))
2089 This is a tuning option. When this is enabled a cacheing algorithm
2090 will be used to reduce the time taken for getwd() calls. This can have
2091 a significant impact on performance, especially when the
2092 link(bf(widelinks))(widelinks) parameter is set to False.
2103 Synonym for link(bf("force group"))(forcegroup).
2106 dit(bf(guest account (S)))
2108 This is a username which will be used for access to services which are
2109 specified as link(bf('guest ok'))(guestok) (see below). Whatever
2110 privileges this user has will be available to any client connecting to
2111 the guest service. Typically this user will exist in the password
2112 file, but will not have a valid login. The user account bf("ftp") is
2113 often a good choice for this parameter. If a username is specified in
2114 a given service, the specified username overrides this one.
2116 One some systems the default guest account "nobody" may not be able to
2117 print. Use another account in this case. You should test this by
2118 trying to log in as your guest user (perhaps by using the tt("su -")
2119 command) and trying to print using the system print command such as
2120 bf(lpr (1)) or bf(lp (1)).
2123 specified at compile time, usually "nobody"
2129 dit(bf(guest ok (S)))
2131 If this parameter is em('yes') for a service, then no password is
2132 required to connect to the service. Privileges will be those of the
2133 link(bf(guest account))(guestaccount).
2135 See the section below on link(bf(security))(security) for more
2136 information about this option.
2145 dit(bf(guest only (S)))
2147 If this parameter is em('yes') for a service, then only guest
2148 connections to the service are permitted. This parameter will have no
2149 affect if link(bf("guest ok"))(guestok) or link(bf("public"))(public)
2150 is not set for the service.
2152 See the section below on link(bf(security))(security) for more
2153 information about this option.
2161 .SS hide dot files (S)
2162 This is a boolean parameter that controls whether files starting with
2163 a dot appear as hidden files.
2166 hide dot files = yes
2173 This is a list of files or directories that are not visible but are
2174 accessible. The DOS 'hidden' attribute is applied to any files or
2175 directories that match.
2177 Each entry in the list must be separated by a "/", which allows spaces
2178 to be included in the entry. '*' and '?' can be used to specify multiple
2179 files or directories as in DOS wildcards.
2181 Each entry must be a unix path, not a DOS path and must not include the
2182 unix directory separator "/".
2184 Note that the case sensitivity option is applicable in hiding files.
2186 Setting this parameter will affect the performance of Samba, as
2187 it will be forced to check all files and directories for a match
2188 as they are scanned.
2190 See also "hide dot files", "veto files" and "case sensitive"
2193 No files or directories are hidden by this option (dot files are
2194 hidden by default because of the "hide dot files" option).
2197 hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/
2199 The above example is based on files that the Macintosh client (DAVE)
2200 creates for internal use, and also still hides all files beginning with
2204 If "nis homedir" is true, this parameter specifies the NIS (or YP) map
2205 from which the server for the user's home directory should be extracted.
2206 At present, only the Sun auto.home map format is understood. The form of
2209 username server:/some/file/system
2211 and the program will extract the servername from before the first ':'.
2212 There should probably be a better parsing system that copes with different
2213 map formats and also Amd (another automounter) maps.
2215 NB: The -DNETGROUP option is required in the Makefile for option to work
2216 and on some architectures the line -lrpcsvc needs to be added to the
2217 LIBSM variable. This is required for Solaris 2, FreeBSD and HPUX.
2219 See also "nis homedir"
2222 homedir map = auto.home
2225 homedir map = amd.homedir
2234 If this global parameter is a non-null string, it specifies the name of
2235 a file to read for the names of hosts and users who will be allowed access
2236 without specifying a password.
2238 This is not be confused with
2240 which is about hosts access to services and is more useful for guest services.
2242 may be useful for NT clients which will not supply passwords to samba.
2244 NOTE: The use of hosts.equiv can be a major security hole. This is
2245 because you are trusting the PC to supply the correct username. It is
2246 very easy to get a PC to supply a false username. I recommend that the
2247 hosts.equiv option be only used if you really know what you are doing,
2248 or perhaps on a home network where you trust your wife and kids :-)
2251 No host equivalences
2254 hosts equiv = /etc/hosts.equiv
2258 This allows you to include one config file inside another. The file is
2259 included literally, as though typed in place.
2261 It takes the standard substitutions, except %u, %P and %S
2265 This option allows you to setup multiple network interfaces, so that
2266 Samba can properly handle browsing on all interfaces.
2268 The option takes a list of ip/netmask pairs. The netmask may either be
2269 a bitmask, or a bitlength.
2271 For example, the following line:
2273 interfaces = 192.168.2.10/24 192.168.3.10/24
2275 would configure two network interfaces with IP addresses 192.168.2.10
2276 and 192.168.3.10. The netmasks of both interfaces would be set to
2279 You could produce an equivalent result by using:
2281 interfaces = 192.168.2.10/255.255.255.0 192.168.3.10/255.255.255.0
2283 if you prefer that format.
2285 If this option is not set then Samba will attempt to find a primary
2286 interface, but won't attempt to configure more than one interface.
2288 .SS invalid users (S)
2289 This is a list of users that should not be allowed to login to this
2290 service. This is really a "paranoid" check to absolutely ensure an
2291 improper setting does not breach your security.
2293 A name starting with @ is interpreted as a yp netgroup first (if this
2294 has been compiled into Samba), and then as a UNIX group if the name
2295 was not found in the yp netgroup database.
2297 A name starting with + is interpreted only by looking in the UNIX
2298 group database. A name starting with & is interpreted only by looking
2299 in the yp netgroup database (this has no effect if Samba is compiled
2300 without netgroup support).
2302 The current servicename is substituted for %S. This is useful in the
2305 See also "valid users"
2311 invalid users = root fred admin @wheel
2314 The value of the parameter (an integer) represents the number of seconds
2315 between 'keepalive' packets. If this parameter is zero, no keepalive packets
2316 will be sent. Keepalive packets, if sent, allow the server to tell whether a
2317 client is still present and responding.
2319 Keepalives should, in general, not be needed if the socket being used
2320 has the SO_KEEPALIVE attribute set on it (see "socket
2321 options"). Basically you should only use this option if you strike
2332 This parameter determines if Samba will produce Lanman announce
2333 broadcasts that are needed by OS/2 clients in order for them to
2334 see the Samba server in their browse list. This parameter can
2335 have three values, true, false, or auto. The default is auto.
2336 If set to False Samba will never produce these broadcasts. If
2337 set to true Samba will produce Lanman announce broadcasts at
2338 a frequency set by the parameter 'lm interval'. If set to auto
2339 Samba will not send Lanman announce broadcasts by default but
2340 will listen for them. If it hears such a broadcast on the wire
2341 it will then start sending them at a frequency set by the parameter
2344 See also "lm interval".
2354 If Samba is set to produce Lanman announce broadcasts needed
2355 by OS/2 clients (see the "lm announce" parameter) this parameter
2356 defines the frequency in seconds with which they will be made.
2357 If this is set to zero then no Lanman announcements will be
2358 made despite the setting of the "lm announce" parameter.
2360 See also "lm announce".
2368 .SS load printers (G)
2369 A boolean variable that controls whether all printers in the printcap
2370 will be loaded for browsing by default.
2378 .SS local master (G)
2379 This option allows the nmbd to become a local master browser on a
2380 subnet. If set to False then nmbd will not attempt to become a local
2381 master browser on a subnet and will also lose in all browsing elections.
2382 By default this value is set to true. Setting this value to true doesn't
2383 mean that Samba will become the local master browser on a subnet, just
2384 that the nmbd will participate in elections for local master browser.
2389 .SS lock directory (G)
2390 This option specifies the directory where lock files will be placed.
2391 The lock files are used to implement the "max connections" option.
2394 lock directory = /tmp/samba
2397 lock directory = /usr/local/samba/var/locks
2400 This controls whether or not locking will be performed by the server in
2401 response to lock requests from the client.
2403 If "locking = no", all lock and unlock requests will appear to succeed and
2404 all lock queries will indicate that the queried lock is clear.
2406 If "locking = yes", real locking will be performed by the server.
2408 This option may be particularly useful for read-only filesystems which
2409 do not need locking (such as cdrom drives).
2411 Be careful about disabling locking either globally or in a specific
2412 service, as lack of locking may result in data corruption.
2422 This options allows you to override the name of the Samba log file
2423 (also known as the debug file).
2425 This option takes the standard substitutions, allowing you to have
2426 separate log files for each user or machine.
2429 log file = /usr/local/samba/var/log.%m
2436 This parameter specifies the local path to which the home directory
2437 will be connected (see "logon home") and is only used by NT Workstations.
2444 This parameter specifies the home directory location when a Win95 or
2445 NT Workstation logs into a Samba PDC. It allows you to do "NET USE
2446 H: /HOME" from a command prompt, for example.
2449 This option takes the standard substitutions, allowing you to have
2450 separate logon scripts for each user or machine.
2453 logon home = "\\\\remote_smb_server\\%U"
2456 logon home = "\\\\%N\\%U"
2460 This parameter specifies the home directory where roaming profiles
2461 (USER.DAT / USER.MAN files for Windows 95) are stored.
2463 This option takes the standard substitutions, allowing you to have
2464 separate logon scripts for each user or machine. It also specifies
2465 the directory from which the "desktop", "start menu", "nethood" and
2466 "programs" folders, and their contents, are loaded and displayed
2467 on your Windows 95 client.
2469 The share and the path must be readable by the user for the preferences
2470 and directories to be loaded onto the Windows 95 client. The share
2471 must be writeable when the logs in for the first time, in order that
2472 the Windows 95 client can create the user.dat and other directories.
2474 Thereafter, the directories and any of contents can, if required,
2475 be made read-only. It is not adviseable that the USER.DAT file be made
2476 read-only - rename it to USER.MAN to achieve the desired effect
2477 (a MANdatory profile).
2479 Windows clients can sometimes maintain a connection to the [homes]
2480 share, even though there is no user logged in. Therefore, it is
2481 vital that the logon path does not include a reference to the
2482 homes share (i.e \\\\%N\\HOMES\profile_path will cause problems).
2485 This option takes the standard substitutions, allowing you to have
2486 separate logon scripts for each user or machine.
2489 logon path = \\\\%N\\%U\\profile
2492 logon path = \\\\PROFILESERVER\\HOME_DIR\\%U\\PROFILE
2494 .SS logon script (G)
2496 This parameter specifies the batch file (.bat) or NT command file (.cmd)
2497 to be downloaded and run on a machine when a user successfully logs in.
2498 The file must contain the DOS style cr/lf line endings. Using a DOS-style
2499 editor to create the file is recommended.
2501 The script must be a relative path to the [netlogon] service. If the
2502 [netlogon] service specifies a path of /usr/local/samba/netlogon, and
2503 logon script = STARTUP.BAT, then file that will be downloaded is:
2505 .B /usr/local/samba/netlogon/STARTUP.BAT
2507 The contents of the batch file is entirely your choice. A suggested
2508 command would be to add NET TIME \\\\SERVER /SET /YES, to force every
2509 machine to synchronise clocks with the same time server. Another use
2510 would be to add NET USE U: \\\\SERVER\\UTILS for commonly used utilities,
2511 or NET USE Q: \\\\SERVER\\ISO9001_QA.
2513 Note that it is particularly important not to allow write access to
2514 the [netlogon] share, or to grant users write permission on the
2515 batch files in a secure environment, as this would allow the batch
2516 files to be arbitrarily modified.
2519 This option takes the standard substitutions, allowing you to have
2520 separate logon scripts for each user or machine.
2523 logon script = scripts\\%U.bat
2525 .SS lppause command (S)
2526 This parameter specifies the command to be executed on the server host in
2527 order to stop printing or spooling a specific print job.
2529 This command should be a program or script which takes a printer name and
2530 job number to pause the print job. Currently I don't know of any print
2531 spooler system that can do this with a simple option, except for the PPR
2532 system from Trinity College (ppr\-dist.trincoll.edu/pub/ppr). One way
2533 of implementing this is by using job priorities, where jobs having a too
2534 low priority won't be sent to the printer. See also the
2538 If a %p is given then the printername is put in its place. A %j is
2539 replaced with the job number (an integer).
2540 On HPUX (see printing=hpux), if the -p%p option is added to the lpq
2541 command, the job will show up with the correct status, i.e. if the job
2542 priority is lower than the set fence priority it will have the PAUSED
2543 status, whereas if the priority is equal or higher it will have the
2544 SPOOLED or PRINTING status.
2546 Note that it is good practice to include the absolute path in the lppause
2547 command as the PATH may not be available to the server.
2550 Currently no default value is given to this string
2552 .B Example for HPUX:
2553 lppause command = /usr/bin/lpalt %p-%j -p0
2555 .SS lpq cache time (G)
2557 This controls how long lpq info will be cached for to prevent the lpq
2558 command being called too often. A separate cache is kept for each
2559 variation of the lpq command used by the system, so if you use
2560 different lpq commands for different users then they won't share cache
2563 The cache files are stored in /tmp/lpq.xxxx where xxxx is a hash
2564 of the lpq command in use.
2566 The default is 10 seconds, meaning that the cached results of a
2567 previous identical lpq command will be used if the cached data is less
2568 than 10 seconds old. A large value may be advisable if your lpq
2569 command is very slow.
2571 A value of 0 will disable cacheing completely.
2580 This parameter specifies the command to be executed on the server host in
2581 order to obtain "lpq"-style printer status information.
2583 This command should be a program or script which takes a printer name
2584 as its only parameter and outputs printer status information.
2586 Currently six styles of printer status information are supported; BSD,
2587 SYSV, AIX, HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You
2588 control which type is expected using the "printing =" option.
2590 Some clients (notably Windows for Workgroups) may not correctly send the
2591 connection number for the printer they are requesting status information
2592 about. To get around this, the server reports on the first printer service
2593 connected to by the client. This only happens if the connection number sent
2596 If a %p is given then the printername is put in its place. Otherwise
2597 it is placed at the end of the command.
2599 Note that it is good practice to include the absolute path in the lpq
2600 command as the PATH may not be available to the server.
2603 depends on the setting of "printing ="
2606 lpq command = /usr/bin/lpq %p
2608 .SS lpresume command (S)
2609 This parameter specifies the command to be executed on the server host in
2610 order to restart or continue printing or spooling a specific print job.
2612 This command should be a program or script which takes a printer name and
2613 job number to resume the print job. See also the lppause command.
2615 If a %p is given then the printername is put in its place. A %j is
2616 replaced with the job number (an integer).
2618 Note that it is good practice to include the absolute path in the lpresume
2619 command as the PATH may not be available to the server.
2622 Currently no default value is given to this string
2624 .B Example for HPUX:
2625 lpresume command = /usr/bin/lpalt %p-%j -p2
2627 .SS lprm command (S)
2628 This parameter specifies the command to be executed on the server host in
2629 order to delete a print job.
2631 This command should be a program or script which takes a printer name
2632 and job number, and deletes the print job.
2634 Currently seven styles of printer control are supported; BSD, SYSV, AIX
2635 HPUX, QNX, LPRNG and PLP. This covers most UNIX systems. You control
2636 which type is expected using the "printing =" option.
2638 If a %p is given then the printername is put in its place. A %j is
2639 replaced with the job number (an integer).
2641 Note that it is good practice to include the absolute path in the lprm
2642 command as the PATH may not be available to the server.
2645 depends on the setting of "printing ="
2648 lprm command = /usr/bin/lprm -P%p %j
2651 lprm command = /usr/bin/cancel %p-%j
2653 .SS magic output (S)
2654 This parameter specifies the name of a file which will contain output
2655 created by a magic script (see
2659 Warning: If two clients use the same magic script in the same directory the
2660 output file content is undefined.
2662 magic output = <magic script name>.out
2665 magic output = myfile.txt
2666 .SS magic script (S)
2667 This parameter specifies the name of a file which, if opened, will be
2668 executed by the server when the file is closed. This allows a UNIX script
2669 to be sent to the Samba host and executed on behalf of the connected user.
2671 Scripts executed in this way will be deleted upon completion, permissions
2674 If the script generates output, output will be sent to the file specified by
2677 parameter (see above).
2679 Note that some shells are unable to interpret scripts containing
2680 carriage-return-linefeed instead of linefeed as the end-of-line
2681 marker. Magic scripts must be executable "as is" on the host, which
2682 for some hosts and some shells will require filtering at the DOS end.
2684 Magic scripts are EXPERIMENTAL and should NOT be relied upon.
2687 None. Magic scripts disabled.
2690 magic script = user.csh
2694 See the section on "NAME MANGLING"
2697 This is for those who want to directly map UNIX file names which are
2698 not representable on DOS. The mangling of names is not always what is
2699 needed. In particular you may have documents with file extensions
2700 that differ between DOS and UNIX. For example, under UNIX it is common
2701 to use .html for HTML files, whereas under DOS .htm is more commonly
2704 So to map 'html' to 'htm' you put:
2706 mangled map = (*.html *.htm)
2708 One very useful case is to remove the annoying ;1 off the ends of
2709 filenames on some CDROMS (only visible under some UNIXes). To do this
2710 use a map of (*;1 *)
2716 mangled map = (*;1 *)
2718 .SS mangled names (S)
2719 This controls whether non-DOS names under UNIX should be mapped to
2720 DOS-compatible names ("mangled") and made visible, or whether non-DOS names
2721 should simply be ignored.
2723 See the section on "NAME MANGLING" for details on how to control the
2726 If mangling is used then the mangling algorithm is as follows:
2728 - the first (up to) five alphanumeric characters before the rightmost dot of
2729 the filename are preserved, forced to upper case, and appear as the first (up
2730 to) five characters of the mangled name.
2732 - a tilde ("~") is appended to the first part of the mangled name, followed
2733 by a two-character unique sequence, based on the original root name
2734 (i.e., the original filename minus its final extension). The final
2735 extension is included in the hash calculation only if it contains any upper
2736 case characters or is longer than three characters.
2738 Note that the character to use may be specified using the "mangling
2739 char" option, if you don't like ~.
2741 - the first three alphanumeric characters of the final extension are preserved,
2742 forced to upper case and appear as the extension of the mangled name. The
2743 final extension is defined as that part of the original filename after the
2744 rightmost dot. If there are no dots in the filename, the mangled name will
2745 have no extension (except in the case of hidden files - see below).
2747 - files whose UNIX name begins with a dot will be presented as DOS hidden
2748 files. The mangled name will be created as for other filenames, but with the
2749 leading dot removed and "___" as its extension regardless of actual original
2750 extension (that's three underscores).
2753 The two-digit hash value consists of upper case alphanumeric characters.
2755 This algorithm can cause name collisions only if files in a directory share
2756 the same first five alphanumeric characters. The probability of such a clash
2759 The name mangling (if enabled) allows a file to be copied between UNIX
2760 directories from DOS while retaining the long UNIX filename. UNIX files can
2761 be renamed to a new extension from DOS and will retain the same basename.
2762 Mangled names do not change between sessions.
2769 .SS mangling char (S)
2770 This controls what character is used as the "magic" character in name
2771 mangling. The default is a ~ but this may interfere with some
2772 software. Use this option to set it to whatever you prefer.
2780 .SS mangled stack (G)
2781 This parameter controls the number of mangled names that should be cached in
2784 This stack is a list of recently mangled base names (extensions are only
2785 maintained if they are longer than 3 characters or contains upper case
2788 The larger this value, the more likely it is that mangled names can be
2789 successfully converted to correct long UNIX names. However, large stack
2790 sizes will slow most directory access. Smaller stacks save memory in the
2791 server (each stack element costs 256 bytes).
2793 It is not possible to absolutely guarantee correct long file names, so
2794 be prepared for some surprises!
2803 This controls whether the DOS archive attribute should be mapped to the
2804 UNIX owner execute bit. The DOS archive bit is set when a file has been modified
2805 since its last backup. One motivation for this option it to keep Samba/your
2806 PC from making any file it touches from becoming executable under UNIX.
2807 This can be quite annoying for shared source code, documents, etc...
2809 Note that this requires the 'create mask' to be set such that owner
2810 execute bit is not masked out (ie. it must include 100). See the
2811 parameter "create mask" for details.
2820 This controls whether DOS style hidden files should be mapped to the
2821 UNIX world execute bit.
2823 Note that this requires the 'create mask' to be set such that the world
2824 execute bit is not masked out (ie. it must include 001).
2825 See the parameter "create mask" for details.
2833 This controls whether DOS style system files should be mapped to the
2834 UNIX group execute bit.
2836 Note that this requires the 'create mask' to be set such that the group
2837 execute bit is not masked out (ie. it must include 010). See the parameter
2838 "create mask" for details.
2845 .SS max connections (S)
2846 This option allows the number of simultaneous connections to a
2847 service to be limited. If "max connections" is greater than 0 then
2848 connections will be refused if this number of connections to the
2849 service are already open. A value of zero mean an unlimited number of
2850 connections may be made.
2852 Record lock files are used to implement this feature. The lock files
2853 will be stored in the directory specified by the "lock directory" option.
2859 max connections = 10
2861 .SS max disk size (G)
2862 This option allows you to put an upper limit on the apparent size of
2863 disks. If you set this option to 100 then all shares will appear to be
2864 not larger than 100 MB in size.
2866 Note that this option does not limit the amount of data you can put on
2867 the disk. In the above case you could still store much more than 100
2868 MB on the disk, but if a client ever asks for the amount of free disk
2869 space or the total disk size then the result will be bounded by the
2870 amount specified in "max disk size".
2872 This option is primarily useful to work around bugs in some pieces of
2873 software that can't handle very large disks, particularly disks over
2876 A "max disk size" of 0 means no limit.
2882 max disk size = 1000
2884 .SS max log size (G)
2886 This option (an integer in kilobytes) specifies the max size the log
2887 file should grow to. Samba periodically checks the size and if it is
2888 exceeded it will rename the file, adding a .old extension.
2890 A size of 0 means no limit.
2900 This option controls the maximum number of outstanding simultaneous SMB
2901 operations that samba tells the client it will allow. You should never need
2902 to set this parameter.
2909 A synonym for this parameter is 'packet size'.
2913 This option tells nmbd what the default 'time to live' of NetBIOS
2914 names should be (in seconds) when nmbd is requesting a name using
2915 either a broadcast or from a WINS server. You should never need to
2916 change this parameter.
2921 .SS max wins ttl (G)
2923 This option tells nmbd when acting as a WINS server (wins support = true)
2924 what the maximum 'time to live' of NetBIOS names that nmbd will grant will
2925 be (in seconds). You should never need to change this parameter.
2926 The default is 3 days (259200 seconds).
2929 max wins ttl = 259200
2933 This option controls the maximum packet size that will be negotiated
2934 by Samba. The default is 65535, which is the maximum. In some cases
2935 you may find you get better performance with a smaller value. A value
2936 below 2048 is likely to cause problems.
2944 .SS message command (G)
2946 This specifies what command to run when the server receives a WinPopup
2949 This would normally be a command that would deliver the message
2950 somehow. How this is to be done is up to your imagination.
2954 message command = csh -c 'xedit %s;rm %s' &
2956 This delivers the message using xedit, then removes it
2957 afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN
2958 IMMEDIATELY. That's why I have the & on the end. If it doesn't return
2959 immediately then your PCs may freeze when sending messages (they
2960 should recover after 30secs, hopefully).
2962 All messages are delivered as the global guest user. The command takes
2963 the standard substitutions, although %u won't work (%U may be better
2966 Apart from the standard substitutions, some additional ones apply. In
2969 %s = the filename containing the message
2971 %t = the destination that the message was sent to (probably the server
2974 %f = who the message is from
2976 You could make this command send mail, or whatever else takes your
2977 fancy. Please let me know of any really interesting ideas you have.
2979 Here's a way of sending the messages as mail to root:
2981 message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
2983 If you don't have a message command then the message won't be
2984 delivered and Samba will tell the sender there was an
2985 error. Unfortunately WfWg totally ignores the error code and carries
2986 on regardless, saying that the message was delivered.
2988 If you want to silently delete it then try "message command = rm %s".
2990 For the really adventurous, try something like this:
2992 message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \e
2995 this would execute the command as a script on the server, then give
2996 them the result in a WinPopup message. Note that this could cause a
2997 loop if you send a message from the server using smbclient! You better
2998 wrap the above in a script that checks for this :-)
3004 message command = csh -c 'xedit %s;rm %s' &
3006 .SS min print space (S)
3008 This sets the minimum amount of free disk space that must be available
3009 before a user will be able to spool a print job. It is specified in
3010 kilobytes. The default is 0, which means no limit.
3016 min print space = 2000
3018 .SS min wins ttl (G)
3020 This option tells nmbd when acting as a WINS server (wins support = true)
3021 what the minimum 'time to live' of NetBIOS names that nmbd will grant will
3022 be (in seconds). You should never need to change this parameter.
3023 The default is 6 hours (21600 seconds).
3026 min wins ttl = 21600
3028 .SS name resolve order (G)
3030 This option is used by the programs smbd, nmbd and smbclient to determine
3031 what naming services and in what order to resolve host names to IP addresses.
3032 This option is most useful in smbclient. The option takes a space separated
3033 string of different name resolution options. These are "lmhosts", "host",
3034 "wins" and "bcast". They cause names to be resolved as follows :
3036 lmhosts : Lookup an IP address in the Samba lmhosts file.
3037 host : Do a standard host name to IP address resolution, using the
3038 system /etc/hosts, NIS, or DNS lookups. This method of name
3039 resolution is operating system depended (for instance on Solaris
3040 this may be controlled by the /etc/nsswitch.conf file).
3041 wins : Query a name with the IP address listed in the "wins server ="
3042 parameter. If no WINS server has been specified this method will
3044 bcast : Do a broadcast on each of the known local interfaces listed in
3045 the "interfaces =" parameter. This is the least reliable of the
3046 name resolution methods as it depends on the target host being
3047 on a locally connected subnet.
3049 The default order is lmhosts, host, wins, bcast and these name resolution
3050 methods will be attempted in this order.
3052 This option was first introduced in Samba 1.9.18p4.
3055 name resolve order = lmhosts host wins bcast
3058 name resolve order = lmhosts bcast host
3060 This will cause the local lmhosts file to be examined first, followed
3061 by a broadcast attempt, followed by a normal system hostname lookup.
3063 .SS netbios aliases (G)
3065 This is a list of names that nmbd will advertise as additional
3066 names by which the Samba server is known. This allows one machine
3067 to appear in browse lists under multiple names. If a machine is
3068 acting as a browse server or logon server none of these names
3069 will be advertised as either browse server or logon servers, only
3070 the primary name of the machine will be advertised with these
3073 See also 'netbios name'.
3076 netbios aliases = TEST TEST1 TEST2
3078 .SS netbios name (G)
3080 This sets the NetBIOS name by which a Samba server is known. By
3081 default it is the same as the first component of the host's DNS name.
3082 If a machine is a browse server or logon server this name (or the
3083 first component of the hosts DNS name) will be the name that these
3084 services are advertised under.
3086 See also 'netbios aliases'.
3089 netbios name = MYNAME
3092 Get the home share server from a NIS (or YP) map. For unix systems that
3093 use an automounter, the user's home directory will often be mounted on
3094 a workstation on demand from a remote server. When the Samba logon server
3095 is not the actual home directory server, two network hops are required
3096 to access the home directory and this can be very slow especially with
3097 writing via Samba to an NFS mounted directory. This option allows samba
3098 to return the home share as being on a different server to the logon
3099 server and as long as a samba daemon is running on the home directory
3100 server, it will be mounted on the Samba client directly from the directory
3101 server. When Samba is returning the home share to the client, it will
3102 consult the NIS (or YP) map specified in "homedir map" and return the
3103 server listed there.
3111 .SS networkstation user login (G)
3112 This global parameter (new for 1.9.18p3) affects server level security.
3113 With this set (recommended) samba will do a full NetWkstaUserLogon to
3114 confirm that the client really should have login rights. This can cause
3115 problems with machines in trust relationships in which case you can
3116 disable it here, but be warned, we have heard that some NT machines
3117 will then allow anyone in with any password! Make sure you test it.
3119 In Samba 1.9.18p5 this parameter is of limited use, as smbd now
3120 explicitly tests for this NT bug and will refuse to use a password
3121 server that has the problem. The parameter now defaults to off,
3122 and it should not be neccessary to set this parameter to on. It will
3123 be removed in a future Samba release.
3126 networkstation user login = no
3129 networkstation user login = yes
3131 .SS null passwords (G)
3132 Allow or disallow access to accounts that have null passwords.
3138 null passwords = yes
3140 .SS ole locking compatibility (G)
3142 This parameter allows an administrator to turn off the byte range
3143 lock manipulation that is done within Samba to give compatibility
3144 for OLE applications. Windows OLE applications use byte range locking
3145 as a form of inter-process communication, by locking ranges of bytes
3146 around the 2^32 region of a file range. This can cause certain UNIX
3147 lock managers to crash or otherwise cause problems. Setting this
3148 parameter to "no" means you trust your UNIX lock manager to handle
3149 such cases correctly.
3152 ole locking compatibility = yes
3155 ole locking compatibility = no
3159 A synonym for this command is 'guest only'.
3162 This is a boolean option that controls whether connections with
3163 usernames not in the user= list will be allowed. By default this
3164 option is disabled so a client can supply a username to be used by
3167 Note that this also means Samba won't try to deduce usernames from the
3168 service name. This can be annoying for the [homes] section. To get
3169 around this you could use "user = %S" which means your "user" list
3170 will be just the service name, which for home directories is the name
3180 This boolean option tells smbd whether to issue oplocks (opportunistic
3181 locks) to file open requests on this share. The oplock code was introduced in
3182 Samba 1.9.18 and can dramatically (approx 30% or more) improve the speed
3183 of access to files on Samba servers. It allows the clients to agressively
3184 cache files locally and you may want to disable this option for unreliable
3185 network environments (it is turned on by default in Windows NT Servers).
3186 For more information see the file Speed.txt in the Samba docs/ directory.
3188 Oplocks may be selectively turned off on certain files on a per share basis.
3189 See the 'veto oplock files' parameter.
3199 This integer value controls what level Samba advertises itself as for
3200 browse elections. See BROWSING.txt for details.
3203 The maximum transmit packet size during a raw read. This option is no
3204 longer implemented as of version 1.7.00, and is kept only so old
3205 configuration files do not become invalid.
3208 This string controls the "chat" conversation that takes places
3209 between smbd and the local password changing program to change the
3210 users password. The string describes a sequence of response-receive
3211 pairs that smbd uses to determine what to send to the passwd program
3212 and what to expect back. If the expected output is not received then
3213 the password is not changed.
3215 This chat sequence is often quite site specific, depending on what
3216 local methods are used for password control (such as NIS+ etc).
3218 The string can contain the macros %o and %n which are substituted for
3219 the old and new passwords respectively. It can also contain the
3220 standard macros \en \er \et and \es to give line-feed, carriage-return,
3223 The string can also contain a * which matches any sequence of
3226 Double quotes can be used to collect strings with spaces in them into
3229 If the send string in any part of the chat sequence is a fullstop "."
3230 then no string is sent. Similarly, is the expect string is a fullstop
3231 then no string is expected.
3233 Note that if the 'unix password sync' parameter is set to true,
3234 then this sequence is called *AS ROOT* when the SMB password in the
3235 smbpasswd file is being changed, without access to the old password
3236 cleartext. In this case the old password cleartext is set to ""
3239 See also 'unix password sync' and 'passwd chat debug'
3242 passwd chat = "*Enter OLD password*" %o\en "*Enter NEW password*" %n\en \e
3243 "*Reenter NEW password*" %n\en "*Password changed*"
3247 passwd chat = *old*password* %o\en *new*password* %n\en *new*password* %n\en *changed*
3249 .SS passwd chat debug (G)
3251 This boolean specifies if the passwd chat script parameter is run
3252 in 'debug' mode. In this mode the strings passed to and received
3253 from the passwd chat are printed in the smbd log with a debug level
3254 of 100. This is a dangerous option as it will allow plaintext passwords
3255 to be seen in the smbd log. It is available to help Samba admins
3256 debug their passwd chat scripts and should be turned off after
3257 this has been done. This parameter is off by default.
3260 passwd chat debug = True
3263 passwd chat debug = False
3265 .SS passwd program (G)
3266 The name of a program that can be used to set user passwords.
3268 This is only available if you have enabled remote password changing at
3269 compile time (see the comments in the Makefile for details). Any occurrences
3270 of %u will be replaced with the user name. The user name is checked
3271 for existance before calling the password changing program.
3273 Also note that many passwd programs insist in "reasonable" passwords,
3274 such as a minimum length, or the inclusion of mixed case chars and
3275 digits. This can pose a problem as some clients (such as Windows for
3276 Workgroups) uppercase the password before sending it.
3278 Note that if the 'unix password sync' parameter is set to true,
3279 then this sequence is called *AS ROOT* when the SMB password in the
3280 smbpasswd file is being changed. If the 'unix passwd sync' parameter
3281 is set this parameter MUST USE ABSOLUTE PATHS for ALL programs called,
3282 and must be examined for security implications. Note that by default
3283 'unix password sync' is set to False.
3285 See also 'unix password sync'
3288 passwd program = /bin/passwd
3291 passwd program = /sbin/passwd %u
3293 .SS password level (G)
3294 Some client/server combinations have difficulty with mixed-case passwords.
3295 One offending client is Windows for Workgroups, which for some reason forces
3296 passwords to upper case when using the LANMAN1 protocol, but leaves them alone
3297 when using COREPLUS!
3299 This parameter defines the maximum number of characters that may be upper case
3302 For example, say the password given was "FRED". If
3304 is set to 1 (one), the following combinations would be tried if "FRED" failed:
3305 "Fred", "fred", "fRed", "frEd", "freD". If
3306 .B password level was set to 2 (two), the following combinations would also be
3307 tried: "FRed", "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
3309 The higher value this parameter is set to the more likely it is that a mixed
3310 case password will be matched against a single case password. However, you
3311 should be aware that use of this parameter reduces security and increases the
3312 time taken to process a new connection.
3314 A value of zero will cause only two attempts to be made - the password as is
3315 and the password in all-lower case.
3317 If you find the connections are taking too long with this option then
3318 you probably have a slow crypt() routine. Samba now comes with a fast
3319 "ufc crypt" that you can select in the Makefile. You should also make
3320 sure the PASSWORD_LENGTH option is correct for your system in local.h
3321 and includes.h. On most systems only the first 8 chars of a password
3322 are significant so PASSWORD_LENGTH should be 8, but on some longer
3323 passwords are significant. The includes.h file tries to select the
3324 right length for your system.
3332 .SS password server (G)
3334 By specifying the name of another SMB server (such as a WinNT box)
3335 with this option, and using "security = server" you can get Samba to
3336 do all its username/password validation via a remote server.
3338 This options sets the name of the password server to use. It must be a
3339 netbios name, so if the machine's netbios name is different from its
3340 internet name then you may have to add its netbios name to
3343 Note that with Samba 1.9.18p4 and above the name of the password
3344 server is looked up using the parameter "name resolve order=" and
3345 so may resolved by any method and order described in that parameter.
3347 The password server much be a machine capable of using the "LM1.2X002"
3348 or the "LM NT 0.12" protocol, and it must be in user level security
3351 NOTE: Using a password server means your UNIX box (running Samba) is
3352 only as secure as your password server. DO NOT CHOOSE A PASSWORD
3353 SERVER THAT YOU DON'T COMPLETELY TRUST.
3355 Never point a Samba server at itself for password serving. This will
3356 cause a loop and could lock up your Samba server!
3358 The name of the password server takes the standard substitutions, but
3359 probably the only useful one is %m, which means the Samba server will
3360 use the incoming client as the password server. If you use this then
3361 you better trust your clients, and you better restrict them with hosts
3364 If you list several hosts in the "password server" option then smbd
3365 will try each in turn till it finds one that responds. This is useful
3366 in case your primary server goes down.
3368 If you are using a WindowsNT server as your password server then you
3369 will have to ensure that your users are able to login from the Samba
3370 server, as the network logon will appear to come from there rather
3371 than from the users workstation.
3374 A synonym for this parameter is 'directory'.
3376 This parameter specifies a directory to which the user of the service is to
3377 be given access. In the case of printable services, this is where print data
3378 will spool prior to being submitted to the host for printing.
3380 For a printable service offering guest access, the service should be readonly
3381 and the path should be world-writable and have the sticky bit set. This is not
3382 mandatory of course, but you probably won't get the results you expect if you
3385 Any occurrences of %u in the path will be replaced with the username
3386 that the client is connecting as. Any occurrences of %m will be
3387 replaced by the name of the machine they are connecting from. These
3388 replacements are very useful for setting up pseudo home directories
3391 Note that this path will be based on 'root dir' if one was specified.
3400 This option specifies a command to be run whenever the service is
3401 disconnected. It takes the usual substitutions. The command may be run
3402 as the root on some systems.
3404 An interesting example may be do unmount server resources:
3406 postexec = /etc/umount /cdrom
3411 none (no command executed)
3414 postexec = echo \e"%u disconnected from %S from %m (%I)\e" >> /tmp/log
3417 This parameter forces a printer to interpret the print files as
3418 postscript. This is done by adding a %! to the start of print output.
3420 This is most useful when you have lots of PCs that persist in putting
3421 a control-D at the start of print jobs, which then confuses your
3432 This option specifies a command to be run whenever the service is
3433 connected to. It takes the usual substitutions.
3435 An interesting example is to send the users a welcome message every
3436 time they log in. Maybe a message of the day? Here is an example:
3438 preexec = csh -c 'echo \e"Welcome to %S!\e" | \e
3439 /usr/local/samba/bin/smbclient -M %m -I %I' &
3441 Of course, this could get annoying after a while :-)
3446 none (no command executed)
3449 preexec = echo \e"%u connected to %S from %m (%I)\e" >> /tmp/log
3451 .SS preferred master (G)
3452 This boolean parameter controls if Samba is a preferred master browser
3454 If this is set to true, on startup, samba will force an election,
3455 and it will have a slight advantage in winning the election.
3456 It is recommended that this parameter is used in conjunction
3457 with domain master = yes, so that samba can guarantee becoming
3460 Use this option with caution, because if there are several hosts
3461 (whether samba servers, Windows 95 or NT) that are preferred master
3462 browsers on the same subnet, they will each periodically and continuously
3463 attempt to become the local master browser. This will result in
3464 unnecessary broadcast traffic and reduced browsing capabilities.
3470 preferred master = no
3473 This is an alias for "auto services"
3475 .SS preserve case (S)
3477 This controls if new filenames are created with the case that the
3478 client passes, or if they are forced to be the "default" case.
3483 See the section on "NAME MANGLING" for a fuller discussion.
3485 .SS print command (S)
3486 After a print job has finished spooling to a service, this command will be
3487 used via a system() call to process the spool file. Typically the command
3488 specified will submit the spool file to the host's printing subsystem, but
3489 there is no requirement that this be the case. The server will not remove the
3490 spool file, so whatever command you specify should remove the spool file when
3491 it has been processed, otherwise you will need to manually remove old spool
3494 The print command is simply a text string. It will be used verbatim,
3495 with two exceptions: All occurrences of "%s" will be replaced by the
3496 appropriate spool file name, and all occurrences of "%p" will be
3497 replaced by the appropriate printer name. The spool file name is
3498 generated automatically by the server, the printer name is discussed
3501 The full path name will be used for the filename if %s is not preceded
3502 by a /. If you don't like this (it can stuff up some lpq output) then
3503 use %f instead. Any occurrences of %f get replaced by the spool
3504 filename without the full path at the front.
3506 The print command MUST contain at least one occurrence of "%s" or %f -
3507 the "%p" is optional. At the time a job is submitted, if no printer
3508 name is supplied the "%p" will be silently removed from the printer
3511 If specified in the [global] section, the print command given will be used
3512 for any printable service that does not have its own print command specified.
3514 If there is neither a specified print command for a printable service nor a
3515 global print command, spool files will be created but not processed and (most
3516 importantly) not removed.
3518 Note that printing may fail on some UNIXes from the "nobody"
3519 account. If this happens then create an alternative guest account that
3520 can print and set the "guest account" in the [global] section.
3522 You can form quite complex print commands by realising that they are
3523 just passed to a shell. For example the following will log a print
3524 job, print the file, then remove it. Note that ; is the usual
3525 separator for command in shell scripts.
3527 print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
3529 You may have to vary this command considerably depending on how you
3530 normally print files on your system.
3533 print command = lpr -r -P %p %s
3536 print command = /usr/local/samba/bin/myprintscript %p %s
3541 A synonym for this parameter is 'print ok'.
3543 If this parameter is 'yes', then clients may open, write to and submit spool
3544 files on the directory specified for the service.
3546 Note that a printable service will ALWAYS allow writing to the service path
3547 (user privileges permitting) via the spooling of print data. The 'read only'
3548 parameter controls only non-printing access to the resource.
3556 .SS printcap name (G)
3557 This parameter may be used to override the compiled-in default printcap
3558 name used by the server (usually /etc/printcap). See the discussion of the
3559 [printers] section above for reasons why you might want to do this.
3561 On SystemV systems that use lpstat to list available printers you
3562 can use "printcap name = lpstat" to automatically obtain lists of
3563 available printers. This is the default for systems that define
3564 SYSV at compile time in Samba (this includes most SystemV based
3565 systems). If "printcap name" is set to lpstat on these systems then
3566 Samba will launch "lpstat -v" and attempt to parse the output to
3567 obtain a printer list.
3569 A minimal printcap file would look something like this:
3581 where the | separates aliases of a printer. The fact that the second
3582 alias has a space in it gives a hint to Samba that it's a comment.
3584 NOTE: Under AIX the default printcap name is "/etc/qconfig". Samba
3585 will assume the file is in AIX "qconfig" format if the string
3586 "/qconfig" appears in the printcap filename.
3589 printcap name = /etc/printcap
3592 printcap name = /etc/myprintcap
3595 A synonym for this parameter is 'printer name'.
3597 This parameter specifies the name of the printer to which print jobs spooled
3598 through a printable service will be sent.
3600 If specified in the [global] section, the printer name given will be used
3601 for any printable service that does not have its own printer name specified.
3604 none (but may be 'lp' on many systems)
3607 printer name = laserwriter
3609 .SS printer driver (S)
3610 This option allows you to control the string that clients receive when
3611 they ask the server for the printer driver associated with a
3612 printer. If you are using Windows95 or WindowsNT then you can use this
3613 to automate the setup of printers on your system.
3615 You need to set this parameter to the exact string (case sensitive)
3616 that describes the appropriate printer driver for your system.
3617 If you don't know the exact string to use then you should first try
3618 with no "printer driver" option set and the client will give you a
3619 list of printer drivers. The appropriate strings are shown in a
3620 scrollbox after you have chosen the printer manufacturer.
3623 printer driver = HP LaserJet 4L
3625 .SS printer name (S)
3629 .SS printer driver file (G)
3630 This parameter tells Samba where the printer driver definition file,
3631 used when serving drivers to Windows 95 clients, is to be found. If
3632 this is not set, the default is :
3634 SAMBA_INSTALL_DIRECTORY/lib/printers.def
3636 This file is created from Windows 95 'msprint.def' files found on the
3637 Windows 95 client system. For more details on setting up serving of
3638 printer drivers to Windows 95 clients, see the documentation file
3639 docs/PRINTER_DRIVER.txt.
3642 None (set in compile).
3645 printer driver file = /usr/local/samba/printers/drivers.def
3648 .B printer driver location
3650 .SS printer driver location (S)
3651 This parameter tells clients of a particular printer share where
3652 to find the printer driver files for the automatic installation
3653 of drivers for Windows 95 machines. If Samba is set up to serve
3654 printer drivers to Windows 95 machines, this should be set to
3656 \e\eMACHINE\ePRINTER$
3658 Where MACHINE is the NetBIOS name of your Samba server, and PRINTER$
3659 is a share you set up for serving printer driver files. For more
3660 details on setting this up see the documentation file
3661 docs/PRINTER_DRIVER.txt.
3667 printer driver location = \e\eMACHINE\ePRINTER$
3670 .B printer driver file
3674 This parameters controls how printer status information is interpreted
3675 on your system, and also affects the default values for the "print
3676 command", "lpq command" and "lprm command".
3678 Currently six printing styles are supported. They are "printing =
3679 bsd", "printing = sysv", "printing = hpux", "printing = aix",
3680 "printing = qnx" and "printing = plp".
3682 To see what the defaults are for the other print commands when using
3683 these three options use the "testparm" program.
3685 As of version 1.9.18 of Samba this option can be set on a per printer basis
3688 The value of the parameter (a string) is the highest protocol level that will
3689 be supported by the server.
3691 Possible values are CORE, COREPLUS, LANMAN1, LANMAN2 and NT1. The relative
3692 merits of each are discussed in the README file.
3694 Normally this option should not be set as the automatic negotiation
3695 phase in the SMB protocol takes care of choosing the appropriate protocol.
3704 A synonym for this parameter is 'guest ok'.
3706 .SS queuepause command (S)
3707 This parameter specifies the command to be executed on the server host in
3708 order to pause the printerqueue.
3710 This command should be a program or script which takes a printer name
3711 as its only parameter and stops the printerqueue, such that no longer
3712 jobs are submitted to the printer.
3714 This command is not supported by Windows for Workgroups, but can be
3715 issued from the Printer's window under Windows 95 & NT.
3717 If a %p is given then the printername is put in its place. Otherwise
3718 it is placed at the end of the command.
3720 Note that it is good practice to include the absolute path in the
3721 command as the PATH may not be available to the server.
3724 depends on the setting of "printing ="
3727 queuepause command = disable %p
3729 .SS queueresume command (S)
3730 This parameter specifies the command to be executed on the server host in
3731 order to resume the printerqueue. It is the command to undo the behaviour
3732 that is caused by the previous parameter (queuepause command).
3734 This command should be a program or script which takes a printer name
3735 as its only parameter and resumes the printerqueue, such that queued
3736 jobs are resubmitted to the printer.
3738 This command is not supported by Windows for Workgroups, but can be
3739 issued from the Printer's window under Windows 95 & NT.
3741 If a %p is given then the printername is put in its place. Otherwise
3742 it is placed at the end of the command.
3744 Note that it is good practice to include the absolute path in the
3745 command as the PATH may not be available to the server.
3748 depends on the setting of "printing ="
3751 queuepause command = enable %p
3754 This is a list of users that are given read-only access to a
3755 service. If the connecting user is in this list then they will
3756 not be given write access, no matter what the "read only" option
3757 is set to. The list can include group names using the @group syntax.
3759 See also the "write list" option
3765 read list = mary, @students
3772 Note that this is an inverted synonym for writable and write ok.
3773 .SS read prediction (G)
3774 This options enables or disables the read prediction code used to
3775 speed up reads from the server. When enabled the server will try to
3776 pre-read data from the last accessed file that was opened read-only
3777 while waiting for packets.
3780 read prediction = False
3783 read prediction = True
3785 This parameter controls whether or not the server will support raw reads when
3786 transferring data to clients.
3788 If enabled, raw reads allow reads of 65535 bytes in one packet. This
3789 typically provides a major performance benefit.
3791 However, some clients either negotiate the allowable block size incorrectly
3792 or are incapable of supporting larger block sizes, and for these clients you
3793 may need to disable raw reads.
3795 In general this parameter should be viewed as a system tuning tool and left
3796 severely alone. See also
3806 The option "read size" affects the overlap of disk reads/writes with
3807 network reads/writes. If the amount of data being transferred in
3808 several of the SMB commands (currently SMBwrite, SMBwriteX and
3809 SMBreadbraw) is larger than this value then the server begins writing
3810 the data before it has received the whole packet from the network, or
3811 in the case of SMBreadbraw, it begins writing to the network before
3812 all the data has been read from disk.
3814 This overlapping works best when the speeds of disk and network access
3815 are similar, having very little effect when the speed of one is much
3816 greater than the other.
3818 The default value is 2048, but very little experimentation has been
3819 done yet to determine the optimal value, and it is likely that the best
3820 value will vary greatly between systems anyway. A value over 65536 is
3821 pointless and will cause you to allocate memory unnecessarily.
3829 .SS remote announce (G)
3831 This option allows you to setup nmbd to periodically announce itself
3832 to arbitrary IP addresses with an arbitrary workgroup name.
3834 This is useful if you want your Samba server to appear in a remote
3835 workgroup for which the normal browse propagation rules don't
3836 work. The remote workgroup can be anywhere that you can send IP
3841 remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF
3843 the above line would cause nmbd to announce itself to the two given IP
3844 addresses using the given workgroup names. If you leave out the
3845 workgroup name then the one given in the "workgroup" option is used
3848 The IP addresses you choose would normally be the broadcast addresses
3849 of the remote networks, but can also be the IP addresses of known
3850 browse masters if your network config is that stable.
3852 This option replaces similar functionality from the nmbd lmhosts file.
3854 .SS remote browse sync (G)
3856 This option allows you to setup nmbd to periodically request synchronisation
3857 of browse lists with the master browser of a samba server that is on a remote
3858 segment. This option will allow you to gain browse lists for multiple
3859 workgroups across routed networks. This is done in a manner that does not work
3860 with any non-samba servers.
3862 This is useful if you want your Samba server and all local clients
3863 to appear in a remote workgroup for which the normal browse propagation
3864 rules don't work. The remote workgroup can be anywhere that you can send IP
3869 remote browse sync = 192.168.2.255 192.168.4.255
3871 the above line would cause nmbd to request the master browser on the
3872 specified subnets or addresses to synchronise their browse lists with
3875 The IP addresses you choose would normally be the broadcast addresses
3876 of the remote networks, but can also be the IP addresses of known
3877 browse masters if your network config is that stable. If a machine IP
3878 address is given Samba makes NO attempt to validate that the remote
3879 machine is available, is listening, nor that it is in fact the browse
3880 master on it's segment.
3885 This option controls whether Samba will allow a previously validated
3886 username/password pair to be used to attach to a share. Thus if you
3887 connect to \e\eserver\eshare1 then to \e\eserver\eshare2 it won't
3888 automatically allow the client to request connection to the second
3889 share as the same username as the first without a password.
3891 Note that this option only works with security=share and will
3892 be ignored if this is not the case.
3894 If "revalidate" is True then the client will be denied automatic
3895 access as the same username.
3909 .SS root directory (G)
3910 Synonyms for this parameter are 'root dir' and 'root'.
3912 The server will chroot() to this directory on startup. This is not
3913 strictly necessary for secure operation. Even without it the server
3914 will deny access to files not in one of the service entries. It may
3915 also check for, and deny access to, soft links to other parts of the
3916 filesystem, or attempts to use .. in file names to access other
3917 directories (depending on the setting of the "wide links" parameter).
3919 Adding a "root dir" entry other than "/" adds an extra level of security,
3920 but at a price. It absolutely ensures that no access is given to files not
3921 in the sub-tree specified in the "root dir" option, *including* some files
3922 needed for complete operation of the server. To maintain full operability
3923 of the server you will need to mirror some system files into the "root dir"
3924 tree. In particular you will need to mirror /etc/passwd (or a subset of it),
3925 and any binaries or configuration files needed for printing (if required).
3926 The set of files that must be mirrored is operating system dependent.
3932 root directory = /homes/smb
3933 .SS root postexec (S)
3935 This is the same as postexec except that the command is run as
3936 root. This is useful for unmounting filesystems (such as cdroms) after
3937 a connection is closed.
3939 .SS root preexec (S)
3941 This is the same as preexec except that the command is run as
3942 root. This is useful for mounting filesystems (such as cdroms) before
3943 a connection is finalised.
3946 This option affects how clients respond to Samba.
3948 The option sets the "security mode bit" in replies to protocol negotiations
3949 to turn share level security on or off. Clients decide based on this bit
3950 whether (and how) to transfer user and password information to the server.
3952 The default is "security=SHARE", mainly because that was the only
3953 option at one stage.
3955 The alternatives are "security = user" or "security = server".
3957 If your PCs use usernames that are the same as their usernames on the
3958 UNIX machine then you will want to use "security = user". If you
3959 mostly use usernames that don't exist on the UNIX box then use
3962 There is a bug in WfWg that may affect your decision. When in user
3963 level security a WfWg client will totally ignore the password you type
3964 in the "connect drive" dialog box. This makes it very difficult (if
3965 not impossible) to connect to a Samba service as anyone except the
3966 user that you are logged into WfWg as.
3968 If you use "security = server" then Samba will try to validate the
3969 username/password by passing it to another SMB server, such as an NT
3970 box. If this fails it will revert to "security = USER", but note that
3971 if encrypted passwords have been negotiated then Samba cannot revert
3972 back to checking the UNIX password file, it must have a valid
3973 smbpasswd file to check users against. See the documentation
3974 docs/ENCRYPTION.txt for details on how to set this up.
3976 See the "password server" option for more details.
3983 .SS server string (G)
3984 This controls what string will show up in the printer comment box in
3985 print manager and next to the IPC connection in "net view". It can be
3986 any string that you wish to show to your users.
3988 It also sets what will appear in browse lists next to the machine name.
3990 A %v will be replaced with the Samba version number.
3992 A %h will be replaced with the hostname.
3995 server string = Samba %v
3998 server string = University of GNUs Samba Server
4000 .SS set directory (S)
4001 If 'set directory = no', then users of the service may not use the setdir
4002 command to change directory.
4004 The setdir command is only implemented in the Digital Pathworks client. See the
4005 Pathworks documentation for details.
4013 .SS shared file entries (G)
4014 This parameter has been removed (as of Samba 1.9.18 and above). The new
4015 System V shared memory code prohibits the user from allocating the
4016 share hash bucket size directly.
4018 .SS shared mem size (G)
4019 This parameter is only useful when Samba has been compiled with FAST_SHARE_MODES.
4020 It specifies the size of the shared memory (in bytes) to use between smbd
4021 processes. You should never change this parameter unless you have studied
4022 the source and know what you are doing. This parameter defaults to 1024
4023 multiplied by the setting of the maximum number of open files in the
4024 file local.h in the Samba source code. MAX_OPEN_FILES is normally set
4025 to 100, so this parameter defaults to 102400 bytes.
4028 shared mem size = 102400
4030 .SS smb passwd file (G)
4031 This option sets the path to the encrypted smbpasswd file. This is a *VERY
4032 DANGEROUS OPTION* if the smb.conf is user writable. By default the path
4033 to the smbpasswd file is compiled into Samba.
4036 This sets the full path to the smbrun binary. This defaults to the
4037 value in the Makefile.
4039 You must get this path right for many services to work correctly.
4045 smbrun = /usr/local/samba/bin/smbrun
4049 This enables or disables the honouring of the "share modes" during a
4050 file open. These modes are used by clients to gain exclusive read or
4051 write access to a file.
4053 These open modes are not directly supported by UNIX, so they are
4054 simulated using lock files in the "lock directory". The "lock
4055 directory" specified in smb.conf must be readable by all users.
4057 The share modes that are enabled by this option are DENY_DOS,
4058 DENY_ALL, DENY_READ, DENY_WRITE, DENY_NONE and DENY_FCB.
4060 Enabling this option gives full share compatibility but may cost a bit
4061 of processing time on the UNIX server. They are enabled by default.
4069 .SS short preserve case (S)
4071 This controls if new short filenames are created with the case that
4072 the client passes, or if they are forced to be the "default" case.
4075 short preserve case = no
4077 See the section on "NAME MANGLING" for a fuller discussion.
4079 .SS socket address (G)
4081 This option allows you to control what address Samba will listen for
4082 connections on. This is used to support multiple virtual interfaces on
4083 the one server, each with a different configuration.
4085 By default samba will accept connections on any address.
4088 socket address = 192.168.2.20
4090 .SS socket options (G)
4091 This option (which can also be invoked with the -O command line
4092 option) allows you to set socket options to be used when talking with
4095 Socket options are controls on the networking layer of the operating
4096 systems which allow the connection to be tuned.
4098 This option will typically be used to tune your Samba server for
4099 optimal performance for your local network. There is no way that Samba
4100 can know what the optimal parameters are for your net, so you must
4101 experiment and choose them yourself. I strongly suggest you read the
4102 appropriate documentation for your operating system first (perhaps
4103 "man setsockopt" will help).
4105 You may find that on some systems Samba will say "Unknown socket
4106 option" when you supply an option. This means you either mis-typed it
4107 or you need to add an include file to includes.h for your OS. If the
4108 latter is the case please send the patch to me
4109 (samba-bugs@samba.anu.edu.au).
4111 Any of the supported socket options may be combined in any way you
4112 like, as long as your OS allows it.
4114 This is the list of socket options currently settable using this
4137 Those marked with a * take an integer argument. The others can
4138 optionally take a 1 or 0 argument to enable or disable the option, by
4139 default they will be enabled if you don't specify 1 or 0.
4141 To specify an argument use the syntax SOME_OPTION=VALUE for example
4142 SO_SNDBUF=8192. Note that you must not have any spaces before or after
4145 If you are on a local network then a sensible option might be
4147 socket options = IPTOS_LOWDELAY
4149 If you have an almost unloaded local network and you don't mind a lot
4150 of extra CPU usage in the server then you could try
4152 socket options = IPTOS_LOWDELAY TCP_NODELAY
4154 If you are on a wide area network then perhaps try setting
4157 Note that several of the options may cause your Samba server to fail
4158 completely. Use these options with caution!
4164 socket options = IPTOS_LOWDELAY
4170 This enables or disables logging of connections to a status file that
4176 won't be able to tell you what
4177 connections are active.
4185 .SS strict locking (S)
4186 This is a boolean that controls the handling of file locking in the
4187 server. When this is set to yes the server will check every read and
4188 write access for file locks, and deny access if locks exist. This can
4189 be slow on some systems.
4191 When strict locking is "no" the server does file lock checks only when
4192 the client explicitly asks for them.
4194 Well behaved clients always ask for lock checks when it is important,
4195 so in the vast majority of cases "strict locking = no" is preferable.
4201 strict locking = yes
4204 Many Windows applications (including the Windows 98 explorer
4205 shell) seem to confuse flushing buffer contents to disk with
4206 doing a sync to disk. Under UNIX, a sync call forces the process
4207 to be suspended until the kernel has ensured that all outstanding
4208 data in kernel disk buffers has been safely stored onto stable
4209 storate. This is very slow and should only be done rarely. Setting
4210 this parameter to "no" (the default) means that smbd ignores the
4211 Windows applications requests for a sync call. There is only a
4212 possibility of losing data if the operating system itself that
4213 Samba is running on crashes, so there is little danger in this
4214 default setting. In addition, this fixes many performace problems
4215 that people have reported with the new Windows98 explorer shell
4218 See also the "sync always" parameter.
4228 This is a boolean that controls whether to strip trailing dots off
4229 UNIX filenames. This helps with some CDROMs that have filenames ending in a
4239 This parameter maps how Samba debug messages are logged onto the
4240 system syslog logging levels. Samba debug level zero maps onto
4241 syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug
4242 level two maps to LOG_NOTICE, debug level three maps onto LOG_INFO.
4243 The paramter sets the threshold for doing the mapping, all Samba
4244 debug messages above this threashold are mapped to syslog LOG_DEBUG
4252 If this parameter is set then Samba debug messages are logged into
4253 the system syslog only, and not to the debug log files.
4260 This is a boolean parameter that controls whether writes will always
4261 be written to stable storage before the write call returns. If this is
4262 false then the server will be guided by the client's request in each
4263 write call (clients can set a bit indicating that a particular write
4264 should be synchronous). If this is true then every write will be
4265 followed by a fsync() call to ensure the data is written to disk.
4266 Note that the "strict sync" parameter must be set to "yes" in
4267 order for this parameter to have any affect.
4269 See also the "strict sync" parameter.
4278 This parameter is a setting in minutes to add to the normal GMT to
4279 local time conversion. This is useful if you are serving a lot of PCs
4280 that have incorrect daylight saving time handling.
4289 This parameter determines if nmbd advertises itself as a time server
4290 to Windows clients. The default is False.
4298 .SS unix password sync (G)
4299 This boolean parameter controlls whether Samba attempts to synchronise
4300 the UNIX password with the SMB password when the encrypted SMB password
4301 in the smbpasswd file is changed. If this is set to true the 'passwd program'
4302 program is called *AS ROOT* - to allow the new UNIX password to be set
4303 without access to the old UNIX password (as the SMB password has change
4304 code has no access to the old password cleartext, only the new). By
4305 default this is set to false.
4307 See also 'passwd program', 'passwd chat'
4310 unix password sync = False
4313 unix password sync = True
4315 .SS unix realname (G)
4316 This boolean parameter when set causes samba to supply the real name field
4317 from the unix password file to the client. This is useful for setting up
4318 mail clients and WWW browsers on systems used by more than one person.
4326 .SS update encrypted (G)
4327 This boolean parameter allows a user logging on with a plaintext
4328 password to have their encrypted (hashed) password in the smbpasswd
4329 file to be updated automatically as they log on. This option allows
4330 a site to migrate from plaintext password authentication (users
4331 authenticate with plaintext password over the wire, and are checked
4332 against a UNIX account database) to encrypted password authentication
4333 (the SMB challenge/response authentication mechanism) without forcing
4334 all users to re-enter their passwords via smbpasswd at the time the change
4335 is made. This is a convenience option to allow the change over to
4336 encrypted passwords to be made over a longer period. Once all users
4337 have encrypted representations of their passwords in the smbpasswd
4338 file this parameter should be set to "off".
4340 In order for this parameter to work correctly the "encrypt passwords"
4341 must be set to "no" when this parameter is set to "yes".
4343 Note that even when this parameter is set a user authenticating to
4344 smbd must still enter a valid password in order to connect correctly,
4345 and to update their hashed (smbpasswd) passwords.
4348 update encrypted = no
4351 update encrypted = yes
4357 A synonym for this parameter is 'user'.
4359 Multiple users may be specified in a comma-delimited list, in which case the
4360 supplied password will be tested against each username in turn (left to right).
4362 The username= line is needed only when the PC is unable to supply its own
4363 username. This is the case for the coreplus protocol or where your
4364 users have different WfWg usernames to UNIX usernames. In both these
4365 cases you may also be better using the \e\eserver\eshare%user syntax
4368 The username= line is not a great solution in many cases as it means Samba
4369 will try to validate the supplied password against each of the
4370 usernames in the username= line in turn. This is slow and a bad idea for
4371 lots of users in case of duplicate passwords. You may get timeouts or
4372 security breaches using this parameter unwisely.
4374 Samba relies on the underlying UNIX security. This parameter does not
4375 restrict who can login, it just offers hints to the Samba server as to
4376 what usernames might correspond to the supplied password. Users can
4377 login as whoever they please and they will be able to do no more
4378 damage than if they started a telnet session. The daemon runs as the
4379 user that they log in as, so they cannot do anything that user cannot
4382 To restrict a service to a particular set of users you can use the
4383 "valid users=" line.
4385 If any of the usernames begin with a @ then the name will be looked up
4386 first in the yp netgroups list (if Samba is compiled with netgroup support),
4387 followed by a lookup in the UNIX groups database and will expand to a list of
4388 all users in the group of that name.
4390 If any of the usernames begin with a + then the name will be looked up only
4391 in the UNIX groups database and will expand to a list of all users in the
4394 If any of the usernames begin with a & then the name will be looked up only
4395 in the yp netgroups database (if Samba is compiled with netgroup support) and
4396 will expand to a list of all users in the netgroup group of that name.
4398 Note that searching though a groups database can take quite
4399 some time, and some clients may time out during the search.
4401 See the section below on username/password validation for more information
4402 on how this parameter determines access to the services.
4405 The guest account if a guest service, else the name of the service.
4409 username = fred, mary, jack, jane, @users, @pcgroup
4411 .SS username level (G)
4413 This option helps Samba to try and 'guess' at the real UNIX username,
4414 as many DOS clients send an all-uppercase username. By default Samba
4415 tries all lowercase, followed by the username with the first letter
4416 capitalized, and fails if the username is not found on the UNIX machine.
4418 If this parameter is set to non-zero the behaviour changes. This
4419 parameter is a number that specifies the number of uppercase combinations
4420 to try whilst trying to determine the UNIX user name. The higher the number
4421 the more combinations will be tried, but the slower the discovery
4422 of usernames will be. Use this parameter when you have strange
4423 usernames on your UNIX machine, such as 'AstrangeUser'.
4431 .SS username map (G)
4433 This option allows you to to specify a file containing a mapping of
4434 usernames from the clients to the server. This can be used for several
4435 purposes. The most common is to map usernames that users use on DOS or
4436 Windows machines to those that the UNIX box uses. The other is to map
4437 multiple users to a single username so that they can more easily share
4440 The map file is parsed line by line. Each line should contain a single
4441 UNIX username on the left then a '=' followed by a list of usernames
4442 on the right. The list of usernames on the right may contain names of
4443 the form @group in which case they will match any UNIX username in
4444 that group. The special client name '*' is a wildcard and matches any
4445 name. Each line of the map file may be up to 1023 characters long.
4447 The file is processed on each line by taking the supplied username and
4448 comparing it with each username on the right hand side of the '='
4449 signs. If the supplied name matches any of the names on the right
4450 hand side then it is replaced with the name on the left. Processing
4451 then continues with the next line.
4453 If any line begins with a '#' or a ';' then it is ignored
4455 If any line begins with an ! then the processing will stop after that
4456 line if a mapping was done by the line. Otherwise mapping continues
4457 with every line being processed. Using ! is most useful when you have
4458 a wildcard mapping line later in the file.
4460 For example to map from the name "admin" or "administrator" to the UNIX
4461 name "root" you would use
4463 root = admin administrator
4465 Or to map anyone in the UNIX group "system" to the UNIX name "sys" you
4470 You can have as many mappings as you like in a username map file.
4472 If Samba has been compiled with the -DNETGROUP compile option
4473 then the netgroup database is checked before the /etc/group
4474 database for matching groups.
4476 You can map Windows usernames that have spaces in them by using double
4477 quotes around the name. For example:
4479 tridge = "Andrew Tridgell"
4481 would map the windows username "Andrew Tridgell" to the unix username
4484 The following example would map mary and fred to the unix user sys,
4485 and map the rest to guest. Note the use of the ! to tell Samba to stop
4486 processing if it gets a match on that line.
4492 Note that the remapping is applied to all occurrences of
4493 usernames. Thus if you connect to "\e\eserver\efred" and "fred" is
4494 remapped to "mary" then you will actually be connecting to
4495 "\e\eserver\emary" and will need to supply a password suitable for
4496 "mary" not "fred". The only exception to this is the username passed
4497 to the "password server" (if you have one). The password server will
4498 receive whatever username the client supplies without modification.
4500 Also note that no reverse mapping is done. The main effect this has is
4501 with printing. Users who have been mapped may have trouble deleting
4502 print jobs as PrintManager under WfWg will think they don't own the
4509 username map = /usr/local/samba/lib/users.map
4513 The option allows you to specify additional characters that should be
4514 considered valid by the server in filenames. This is particularly
4515 useful for national character sets, such as adding u-umlaut or a-ring.
4517 The option takes a list of characters in either integer or character
4518 form with spaces between them. If you give two characters with a colon
4519 between them then it will be taken as an lowercase:uppercase pair.
4521 If you have an editor capable of entering the characters into the
4522 config file then it is probably easiest to use this method. Otherwise
4523 you can specify the characters in octal, decimal or hexadecimal form
4524 using the usual C notation.
4526 For example to add the single character 'Z' to the charset (which is a
4527 pointless thing to do as it's already there) you could do one of the
4532 valid chars = 0132:0172
4534 The last two examples above actually add two characters, and alter
4535 the uppercase and lowercase mappings appropriately.
4537 Note that you MUST specify this parameter after the "client code page"
4538 parameter if you have both set. If "client code page" is set after
4539 the "valid chars" parameter the "valid chars" settings will be
4542 See also the "client code page" parameter.
4546 Samba defaults to using a reasonable set of valid characters
4551 valid chars = 0345:0305 0366:0326 0344:0304
4553 The above example allows filenames to have the swedish characters in
4556 NOTE: It is actually quite difficult to correctly produce a "valid
4557 chars" line for a particular system. To automate the process
4558 tino@augsburg.net has written a package called "validchars" which will
4559 automatically produce a complete "valid chars" line for a given client
4560 system. Look in the examples subdirectory for this package.
4563 This is a list of users that should be allowed to login to this
4564 service. A name starting with @ is interpreted as a UNIX group.
4566 If this is empty (the default) then any user can login. If a username
4567 is in both this list and the "invalid users" list then access is
4568 denied for that user.
4570 The current servicename is substituted for %S. This is useful in the
4573 See also "invalid users"
4576 No valid users list. (anyone can login)
4579 valid users = greg, @pcusers
4583 This is a list of files and directories that are neither visible nor
4584 accessible. Each entry in the list must be separated by a "/", which
4585 allows spaces to be included in the entry. '*' and '?' can be used to
4586 specify multiple files or directories as in DOS wildcards.
4588 Each entry must be a unix path, not a DOS path and must not include the
4589 unix directory separator "/".
4591 Note that the case sensitivity option is applicable in vetoing files.
4593 One feature of the veto files parameter that it is important to be
4594 aware of, is that if a directory contains nothing but files that
4595 match the veto files parameter (which means that Windows/DOS clients
4596 cannot ever see them) is deleted, the veto files within that directory
4597 *are automatically deleted* along with it, if the user has UNIX permissions
4600 Setting this parameter will affect the performance of Samba, as
4601 it will be forced to check all files and directories for a match
4602 as they are scanned.
4604 See also "hide files" and "case sensitive"
4607 No files or directories are vetoed.
4611 Veto any files containing the word Security,
4612 any ending in .tmp, and any directory containing the
4615 veto files = /*Security*/*.tmp/*root*/
4618 Veto the Apple specific files that a NetAtalk server
4621 veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/
4623 .SS veto oplock files (S)
4624 This parameter is only valid when the 'oplocks' parameter is turned on
4625 for a share. It allows the Samba administrator to selectively turn off
4626 the granting of oplocks on selected files that match a wildcarded list,
4627 similar to the wildcarded list used in the 'veto files' parameter.
4630 No files are vetoed for oplock grants.
4633 You might want to do this on files that you know will be heavily
4634 contended for by clients. A good example of this is in the NetBench
4635 SMB benchmark program, which causes heavy client contention for files
4636 ending in .SEM. To cause Samba not to grant oplocks on these files
4637 you would use the line (either in the [global] section or in the section
4638 for the particular NetBench share :
4640 veto oplock files = /*.SEM/
4643 This allows you to override the volume label returned for a
4644 share. Useful for CDROMs with installation programs that insist on a
4645 particular volume label.
4647 The default is the name of the share
4650 This parameter controls whether or not links in the UNIX file system may be
4651 followed by the server. Links that point to areas within the directory tree
4652 exported by the server are always allowed; this parameter controls access
4653 only to areas that are outside the directory tree being exported.
4663 This is a boolean that controls if nmbd will respond to broadcast name
4664 queries on behalf of other hosts. You may need to set this to no for
4671 This specifies the DNS name (or IP address) of the WINS server that Samba
4672 should register with. If you have a WINS server on your network then you
4673 should set this to the WINS servers name.
4675 You should point this at your WINS server if you have a multi-subnetted
4680 .SS wins support (G)
4682 This boolean controls if the nmbd process in Samba will act as a WINS server.
4683 You should not set this to true unless you have a multi-subnetted network and
4684 you wish a particular nmbd to be your WINS server. Note that you
4685 should *NEVER* set this to true on more than one machine in your
4693 This controls what workgroup your server will appear to be in when
4703 A synonym for this parameter is 'write ok'. An inverted synonym is 'read only'.
4705 If this parameter is 'no', then users of a service may not create or modify
4706 files in the service's directory.
4708 Note that a printable service ('printable = yes') will ALWAYS allow
4709 writing to the directory (user privileges permitting), but only via
4710 spooling operations.
4720 This is a list of users that are given read-write access to a
4721 service. If the connecting user is in this list then they will be
4722 given write access, no matter what the "read only" option is set
4723 to. The list can include group names using the @group syntax.
4725 Note that if a user is in both the read list and the write list then
4726 they will be given write access.
4728 See also the "read list" option
4734 write list = admin, root, @staff
4742 This parameter controls whether or not the server will support raw writes when
4743 transferring data from clients.
4751 .SH NOTE ABOUT USERNAME/PASSWORD VALIDATION
4752 There are a number of ways in which a user can connect to a
4753 service. The server follows the following steps in determining if it
4754 will allow a connection to a specified service. If all the steps fail
4755 then the connection request is rejected. If one of the steps pass then
4756 the following steps are not checked.
4758 If the service is marked "guest only = yes" then steps 1 to 5 are skipped
4760 Step 1: If the client has passed a username/password pair and that
4761 username/password pair is validated by the UNIX system's password
4762 programs then the connection is made as that username. Note that this
4763 includes the \e\eserver\eservice%username method of passing a username.
4765 Step 2: If the client has previously registered a username with the
4766 system and now supplies a correct password for that username then the
4767 connection is allowed.
4769 Step 3: The client's netbios name and any previously used user names
4770 are checked against the supplied password, if they match then the
4771 connection is allowed as the corresponding user.
4773 Step 4: If the client has previously validated a username/password
4774 pair with the server and the client has passed the validation token
4775 then that username is used. This step is skipped if "revalidate = yes"
4778 Step 5: If a "user = " field is given in the smb.conf file for the
4779 service and the client has supplied a password, and that password
4780 matches (according to the UNIX system's password checking) with one of
4781 the usernames from the user= field then the connection is made as the
4782 username in the "user=" line. If one of the username in the user= list
4783 begins with a @ then that name expands to a list of names in the group
4786 Step 6: If the service is a guest service then a connection is made as
4787 the username given in the "guest account =" for the service,
4788 irrespective of the supplied password.
4790 Although the configuration file permits service names to contain spaces,
4791 your client software may not. Spaces will be ignored in comparisons anyway,
4792 so it shouldn't be a problem - but be aware of the possibility.
4794 On a similar note, many clients - especially DOS clients - limit service
4795 names to eight characters. Smbd has no such limitation, but attempts
4796 to connect from such clients will fail if they truncate the service names.
4797 For this reason you should probably keep your service names down to eight
4798 characters in length.
4800 Use of the [homes] and [printers] special sections make life for an
4801 administrator easy, but the various combinations of default attributes can be
4802 tricky. Take extreme care when designing these sections. In particular,
4803 ensure that the permissions on spool directories are correct.
4805 This man page is (mostly) correct for version 1.9.18 of the Samba suite, plus some
4806 of the recent patches to it. These notes will necessarily lag behind
4807 development of the software, so it is possible that your version of
4808 the server has extensions or parameter semantics that differ from or are not
4809 covered by this man page. Please notify these to the address below for
4812 Prior to version 1.5.21 of the Samba suite, the configuration file was
4813 radically different (more primitive). If you are using a version earlier than
4814 1.8.05, it is STRONGLY recommended that you upgrade.
4819 .SH ENVIRONMENT VARIABLES
4828 .BR hosts_access (5)
4830 [This section under construction]
4832 Most diagnostics issued by the server are logged in a specified log file. The
4833 log file name is specified at compile time, but may be overridden on the
4834 smbd command line (see
4837 The number and nature of diagnostics available depends on the debug level used
4838 by the server. If you have problems, set the debug level to 3 and peruse the
4841 Most messages are reasonably self-explanatory. Unfortunately, at time of
4842 creation of this man page the source code is still too fluid to warrant
4843 describing each and every diagnostic. At this stage your best bet is still
4844 to grep the source code and inspect the conditions that gave rise to the
4845 diagnostics you are seeing.
4849 Please send bug reports, comments and so on to:
4852 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)
4855 or to the mailing list:
4858 .B samba@listproc.anu.edu.au
4861 You may also like to subscribe to the announcement channel:
4864 .B samba-announce@listproc.anu.edu.au
4867 To subscribe to these lists send a message to
4868 listproc@listproc.anu.edu.au with a body of "subscribe samba Your
4869 Name" or "subscribe samba-announce Your Name".
4871 Errors or suggestions for improvements to the Samba man pages should be
4875 .B samba-bugs@samba.anu.edu.au (Andrew Tridgell)