Samba PDF
Samba PDF
Samba PDF
conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Name
smb.conf The configuration file for the Samba suite
SYNOPSIS
The smb.conf file is a configuration file for the Samba suite. smb.conf contains runtime configuration information for the Samba programs. The smb.conf file is designed to be configured and administered by the swat(8) program. The complete description of the file format and possible parameters held within are here for reference purposes.
FILE FORMAT
The file consists of sections and parameters. A section begins with the name of the section in square brackets and continues until the next section begins. Sections contain parameters of the form:
name = value
The file is line-based - that is, each newline-terminated line represents either a comment, a section name or a parameter. Section and parameter names are not case sensitive. Only the first equals sign in a parameter is significant. Whitespace before or after the first equals sign is discarded. Leading, trailing and internal whitespace in section and parameter names is irrelevant. Leading and trailing whitespace in a parameter value is discarded. Internal whitespace within a parameter value is retained verbatim. Any line beginning with a semicolon (;) or a hash (#) character is ignored, as are lines containing only whitespace. Any line ending in a \ is continued on the next line in the customary UNIX fashion. The values following the equals sign in parameters are all either a string (no quotes needed) or a boolean, which may be given as yes/no, 1/0 or true/false. Case is not significant in boolean values, but is preserved in string values. Some items such as create masks are numeric.
SECTION DESCRIPTIONS
Each section in the configuration file (except for the [global] section) describes a shared resource (known as a share). The section name is the name of the shared resource and the parameters within the section define the shares attributes. There are three special sections, [global], [homes] and [printers], which are described under special sections. The following notes apply to ordinary section descriptions. A share consists of a directory to which access is being given plus a description of the access rights which are granted to the user of the service. Some housekeeping options are also specifiable. Sections are either file share services (used by the client as an extension of their native file systems) or
1 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
printable services (used by the client to access print services on the host running the server). Sections may be designated guest services, in which case no password is required to access them. A specified UNIX guest account is used to define access privileges in this case. Sections other than guest services will require a password to access them. The client provides the username. As older clients only provide passwords and not usernames, you may specify a list of usernames to check against the password using the user = option in the share definition. For modern clients such as Windows 95/98/ME/NT/2000, this should not be necessary. The access rights granted by the server are masked by the access rights granted to the specified or guest UNIX user by the host system. The server does not grant more access than the host system grants. The following sample section defines a file space share. The user has write access to the path /home/bar. The share is accessed via the share name foo:
[foo] path = /home/bar read only = no
The following sample section defines a printable share. The share is read-only, but printable. That is, the only write access permitted is via calls to open, write to and close a spool file. The guest ok parameter means access will be permitted as the default guest user (specified elsewhere):
[aprinter] path = /usr/spool/public read only = yes printable = yes guest ok = yes
2 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
If you decide to use a path = line in your [homes] section, it may be useful to use the %S macro. For example:
path = /data/pchome/%S
is useful if you have different home directories for your PCs than for UNIX access. This is a fast and simple way to give a large number of clients access to their home directories with a minimum of fuss. A similar process occurs if the requested section name is homes, except that the share name is not changed to that of the requesting user. This method of using the [homes] section works well if different users share a client PC. The [homes] section can specify all the parameters a normal service section can specify, though some make more sense than others. The following is a typical and suitable [homes] section:
[homes] read only = no
An important point is that if guest access is specified in the [homes] section, all home directories will be visible to all clients without a password. In the very unlikely event that this is actually desirable, it is wise to also specify read only access. The browseable flag for auto home directories will be inherited from the global browseable flag, not the [homes] browseable flag. This is useful as it means setting browseable = no in the [homes] section will hide the [homes] share but make any auto home directories visible.
3 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Typically the path specified is that of a world-writeable spool directory with the sticky bit set on it. A typical [printers] entry looks like this:
[printers] path = /usr/spool/public guest ok = yes printable = yes
All aliases given for a printer in the printcap file are legitimate printer names as far as the server is concerned. If your printing subsystem doesn't work like that, you will have to set up a pseudo-printcap. This is a file consisting of one or more lines like this:
alias|alias|alias|alias...
Each alias should be an acceptable printer name for your printing subsystem. In the [global] section, specify the new file as your printcap. The server will only recognize names found in your pseudo-printcap, which of course can contain whatever aliases you like. The same technique could be used simply to limit access to a subset of your local printers. An alias, by the way, is defined as any component of the first entry of a printcap record. Records are separated by newlines, components (if there are more than one) are separated by vertical bar symbols (|).
Note
On SYSV systems which use lpstat to determine what printers are defined on the system you may be able to use printcap name = lpstat to automatically obtain a list of printers. See the printcap name option for more details.
USERSHARES
Starting with Samba version 3.0.23 the capability for non-root users to add, modify, and delete their own share definitions has been added. This capability is called usershares and is controlled by a set of parameters in the [global] section of the smb.conf. The relevant parameters are : usershare allow guests Controls if usershares can permit guest access. usershare max shares Maximum number of user defined shares allowed. usershare owner only If set only directories owned by the sharing user can be shared. usershare path Points to the directory containing the user defined share definitions. The filesystem permissions on this directory control who can create user defined shares. usershare prefix allow list
4 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Comma-separated list of absolute pathnames restricting what directories can be shared. Only directories below the pathnames in this list are permitted. usershare prefix deny list Comma-separated list of absolute pathnames restricting what directories can be shared. Directories below the pathnames in this list are prohibited. usershare template share Names a pre-existing share used as a template for creating new usershares. All other share parameters not specified in the user defined share definition are copied from this named share. To allow members of the UNIX group foo to create user defined shares, create the directory to contain the share definitions as follows: Become root:
mkdir /usr/local/samba/lib/usershares chgrp foo /usr/local/samba/lib/usershares chmod 1770 /usr/local/samba/lib/usershares
to the global section of your smb.conf. Members of the group foo may then manipulate the user defined shares using the following commands. net usershare add sharename path [comment] [acl] [guest_ok=[y|n]] To create or modify (overwrite) a user defined share. net usershare delete sharename To delete a user defined share. net usershare list wildcard-sharename To list user defined shares. net usershare info wildcard-sharename To print information about user defined shares.
PARAMETERS
Parameters define the specific attributes of sections. Some parameters are specific to the [global] section (e.g., security). Some parameters are usable in all sections (e.g., create mask). All others are permissible only in normal sections. For the purposes of the following descriptions the [homes] and [printers] sections will be considered normal. The letter G in parentheses indicates that a parameter is specific to the [global] section. The letter S indicates that a
5 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
parameter can be specified in a service specific section. All S parameters can also be specified in the [global] section - in which case they will define the default behavior for all services. Parameters are arranged here in alphabetical order - this may not create best bedfellows, but at least you can find them! Where there are synonyms, the preferred synonym is described, others refer to the preferred synonym.
VARIABLE SUBSTITUTIONS
Many of the strings that are settable in the config file can take substitutions. For example the option path = /tmp/%u is interpreted as path = /tmp/john if the user connected with the username john. These substitutions are mostly noted in the descriptions below, but there are some general substitutions which apply whenever they might be relevant. These are: %U session username (the username that the client wanted, not necessarily the same as the one they got). %G primary group name of %U. %h the Internet hostname that Samba is running on. %m the NetBIOS name of the client machine (very useful). This parameter is not available when Samba listens on port 445, as clients no longer send this information. If you use this macro in an include statement on a domain that has a Samba domain controller be sure to set in the [global] section smb ports = 139. This will cause Samba to not listen on port 445 and will permit include functionality to function as it did with Samba 2.x. %L the NetBIOS name of the server. This allows you to change your config based on what the client calls you. Your server can have a dual personality. %M the Internet name of the client machine. %R the selected protocol level after protocol negotiation. It can be one of CORE, COREPLUS, LANMAN1, LANMAN2, NT1, SMB2_02, SMB2_10, SMB2_22, SMB2_24, SMB3_00 or SMB2_FF.
6 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
%d the process id of the current server process. %a The architecture of the remote machine. It currently recognizes Samba (Samba), the Linux CIFS file system (CIFSFS), OS/2, (OS2), Mac OS X (OSX), Windows for Workgroups (WfWg), Windows 9x/ME (Win95), Windows NT (WinNT), Windows 2000 (Win2K), Windows XP (WinXP), Windows XP 64-bit(WinXP64), Windows 2003 including 2003R2 (Win2K3), and Windows Vista (Vista). Anything else will be known as UNKNOWN. %I the IP address of the client machine. Before 4.0.0 it could contain IPv4 mapped IPv6 addresses, now it only contains IPv4 or IPv6 addresses. %i the local IP address to which a client connected. Before 4.0.0 it could contain IPv4 mapped IPv6 addresses, now it only contains IPv4 or IPv6 addresses. %T the current date and time. %D name of the domain or workgroup of the current user. %w the winbind separator. %$(envvar) the value of the environment variable envar. The following substitutes apply only to some configuration options (only those that are used when a connection has been established): %S the name of the current service, if any. %P the root directory of the current service, if any. %u
7 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
username of the current service, if any. %g primary group name of %u. %H the home directory of the user given by %u. %N the name of your NIS home directory server. This is obtained from your NIS auto.map entry. If you have not compiled Samba with the --with-automount option, this value will be the same as %L. %p the path of the service's home directory, obtained from your NIS auto.map entry. The NIS auto.map entry is split up as %N:%p. There are some quite creative things that can be done with these substitutions and other smb.conf options.
NAME MANGLING
Samba supports name mangling so that DOS and Windows clients can use files that don't conform to the 8.3 format. It can also be set to adjust the case of 8.3 format filenames. There are several options that control the way mangling is performed, and they are grouped here rather than listed separately. For the defaults look at the output of the testparm program. These options can be set separately for each service. The options are: case sensitive = yes/no/auto controls whether filenames are case sensitive. If they aren't, Samba must do a filename search and match on passed names. The default setting of auto allows clients that support case sensitive filenames (Linux CIFSVFS and smbclient 3.0.5 and above currently) to tell the Samba server on a per-packet basis that they wish to access the file system in a case-sensitive manner (to support UNIX case sensitive semantics). No Windows or DOS system supports case-sensitive filename so setting this option to auto is that same as setting it to no for them. Default auto. default case = upper/lower controls what the default case is for new filenames (ie. files that don't currently exist in the filesystem). Default lower. IMPORTANT NOTE: As part of the optimizations for directories containing large numbers of files, the following special case applies. If the options case sensitive = yes, preserve case = No, and short preserve case = No are set, then the case of all incoming client filenames, not just new filenames, will be modified. See additional notes below.
8 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
preserve case = yes/no controls whether new files (ie. files that don't currently exist in the filesystem) are created with the case that the client passes, or if they are forced to be the default case. Default yes. short preserve case = yes/no controls if new files (ie. files that don't currently exist in the filesystem) which conform to 8.3 syntax, that is all in upper case and of suitable length, are created upper case, or if they are forced to be the default case. This option can be used with preserve case = yes to permit long filenames to retain their case, while short names are lowercased. Default yes. By default, Samba 3.0 has the same semantics as a Windows NT server, in that it is case insensitive but case preserving. As a special case for directories with large numbers of files, if the case options are set as follows, "case sensitive = yes", "case preserve = no", "short preserve case = no" then the "default case" option will be applied and will modify all filenames sent from the client when accessing this share.
REGISTRY-BASED CONFIGURATION
Starting with Samba version 3.2.0, the capability to store Samba configuration in the registry is available. The configuration is stored in the registry key HKLM\Software\Samba\smbconf. There are two levels of registry configuration: 1. Share definitions stored in registry are used. This is triggered by setting the global parameter registry shares to yes in smb.conf. The registry shares are loaded not at startup but on demand at runtime by smbd. Shares defined in smb.conf take priority over shares of the same name defined in registry. 2. Global smb.conf options stored in registry are used. This can be activated in two different ways: Firstly, a registry only configuration is triggered by setting config backend = registry in the [global] section of smb.conf. This resets everything that has been read from config files to this point and reads the content of the global configuration section from the registry. This is the recommended method of using registry based configuration. Secondly, a mixed configuration can be activated by a special new meaning of the parameter include = registry in the [global] section of smb.conf. This reads the global options from registry with the same priorities as for an include of a text file. This may be especially useful in cases where an initial configuration is needed to access the registry. Activation of global registry options automatically activates registry shares. So in the registry only case, shares are loaded on demand only. Note: To make registry-based configurations foolproof at least to a certain extent, the use of lock directory and config backend inside the registry configuration has been disabled: Especially by changing the lock directory inside the registry configuration, one would create a broken setup where the daemons do not see the configuration they loaded once it is active. The registry configuration can be accessed with tools like regedit or net (rpc) registry in the key HKLM\Software\Samba\smbconf. More conveniently, the conf subcommand of the net(8) utility offers a
9 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
dedicated interface to read and write the registry based configuration locally, i.e. directly accessing the database file, circumventing the server.
= "" = /sbin/shutdown
-c
Example: abort
shutdown script
= no
10 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Windows explorer refresh. This is an extremely advanced protocol option which should not need to be changed. This parameter was introduced in its final form in 3.0.21, an earlier version with slightly different semantics was introduced in 3.0.20. That older version is not documented here. Default: acl
check permissions
= True
= no
= True
11 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
must print the numeric gid of the created group on stdout. Default: add
group script
= = /usr/sbin/groupadd
%g
Example: add
group script
= = /usr/sbin/adduser
-n -g machines -c Machine -d /var/lib/nobody
Example: add
machine script
-s /bin/false %u
= = /etc/samba/scripts/addport.sh
Example: addport
command
printer name
12 sur 143
18/10/2013 16:45
smb.conf
share name port name driver name location Windows 9x driver location
http://www.samba.org/samba/docs/man/manpages-3/smb...
All parameters are filled in from the PRINTER_INFO_2 structure sent by the Windows NT/2000 client with one exception. The "Windows 9x driver location" parameter is included for backwards compatibility only. The remaining fields in the structure are generated from answers to the APW questions. Once the addprinter command has been executed, smbd will reparse the smb.conf to determine if the share defined by the APW exists. If the sharename is still invalid, then smbd will return an ACCESS_DENIED error to the client. The addprinter command program can output a single line of text, which Samba will set as the port the new printer is connected to. If this line isn't output, Samba won't reload its printer shares. Default: addprinter
command
= = /usr/bin/addprinter
Example: addprinter
command
- comment string to associate with the new share. Number of maximum simultaneous connections to this share.
max connections
This parameter is only used to add file shares. To add printer shares, see the addprinter command. Default: add
share command
= = /usr/local/bin/addshare
Example: add
share command
13 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= = /usr/local/samba/bin/add_user
%u
Example: add
user script
= = /usr/sbin/adduser
%u %g
Example: add
14 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: administrative
share
= no
= = jason
Example: admin
users
= no
= 604800
= = %[email protected]
Example: afs
username map
15 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
value. Note that it happens only for non-chained and non-chaining reads and when not using write cache. Current implementation of asynchronous I/O in Samba 3.0 does support only up to 10 outstanding asynchronous requests, read and write combined. Related command: write cache size Related command: aio write size Default: aio
read size
=0 = 16384
# Use asynchronous I/O for reads bigger than 16KB request size
Example: aio
read size
= = /*.tmp/
Example: aio
write behind
=0 = 16384
# Use asynchronous I/O for writes bigger than 16KB request
Example: aio
size
write size
16 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Setting this option to a larger value could be useful to sites transitioning from WinNT and Win2k, as existing user and group rids would otherwise clash with system users etc. All UIDs and GIDs must be able to be resolved into SIDs for the correct operation of ACLs on the server. As such the algorithmic mapping can't be 'turned off', but pushing it 'out of the way' should resolve the issues. Users and groups can then be assigned 'low' RIDs in arbitrary-rid supporting backends. Default: algorithmic
rid base
= 1000 = 100000
Example: algorithmic
rid base
= 1048576 =0
# (to disable roundups)
Example: allocation
roundup size
= secure
only
Example: allow
dns updates
= disabled
17 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
configurations this would be considered a security hole and setting this parameter is not recommended. This option was added at the request of sites who had deliberately set Samba up in this way and needed to continue supporting this functionality without having to patch the Samba code. Default: allow
insecure wide links
= no
= yes
= no
18 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example: auth
methods
= guest
sam winbind
available (S)
This parameter lets you "turn off" a service. If available service will fail. Such failures are logged. Default: available = yes
= no,
= no
19 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= yes
= 1024 = 4096
Example: block
size
browsable
This parameter is a synonym for browseable.
browseable (S)
This controls whether this share is seen in the list of available shares in a net view and in the browse list. Default: browseable = yes
= yes
20 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= ${prefix}/var/locks = /var/run/samba/locks/cache
Example: cache
directory
casesignames
This parameter is a synonym for case sensitive.
= auto
= yes
21 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
max connections
This parameter is only used to modify existing file share definitions. To modify printer shares, use the "Printers..." folder as seen when browsing the Samba host. Default: change
share command
= = /usr/local/bin/changeshare
Example: change
share command
= Disabled = /usr/local/sbin/crackcheck
Example: check
password script
= 389 = 3389
Example: cldap
port
option.
lanman auth
= no
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The client ldap sasl wrapping defines whether ldap traffic will be signed or signed and encrypted (sealed). Possible values are plain, sign and seal. The values sign and seal are only available if Samba has been compiled against a modern OpenLDAP version (2.3.x or higher). This option is needed in the case of Domain Controllers enforcing the usage of signed LDAP connections (e.g. Windows 2000 SP3 or higher). LDAP sign and seal can be controlled with the registry key "HKLM\System\CurrentControlSet\Services\ NTDS\Parameters\LDAPServerIntegrity" on the Windows server side. Depending on the used KRB5 library (MIT and older Heimdal versions) it is possible that the message "integrity only" is not supported. In this case, sign is just an alias for seal. The default value is plain which is not irritable to KRB5 clock skew errors. That implies synchronizing the time with the KDC in the case of using sign or seal. Default: client
ldap sasl wrapping
= plain
Earliest version. No concept of user names. Slight improvements on CORE for efficiency.
First modern version of the protocol. Long filename support. Updates to Lanman1 protocol.
Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available.
SMB2_02: SMB2_10: SMB2_22: SMB2_24:
SMB2:
The earliest SMB2 version. Windows 7 SMB2 version. Early Windows 8 SMB2 version. Windows 8 beta SMB2 version.
The same as SMB2. Used by Windows 8. SMB3 has sub protocols available.
SMB3_00:
23 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
By default SMB3 selects the SMB3_00 variant. Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol. Default: client
max protocol
= SMB3 = LANMAN1
Example: client
max protocol
= CORE = NT1
Example: client
min protocol
authentication will
If disabled, an NTLM response (and possibly a LANMAN response) will be sent by the client, depending on the value of client lanman auth. Note that Windows Vista and later versions already use NTLMv2 by default, and some sites (particularly those following 'best practice' security polices) only allow NTLMv2 responses, and not the weaker LM or NTLM. Default: client
NTLMv2 auth
= yes
= no
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
schannel = no does not offer the schannel, client schannel = auto offers the schannel but does not enforce it, and client schannel = yes denies access if the server is not able to speak netlogon schannel. Default: client
schannel
= auto = yes
Example: client
schannel
= auto
= no
= yes
25 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: cluster
addresses
= = 10.0.0.1
10.0.0.2 10.0.0.3
Example: cluster
addresses
clustering (G)
This parameter specifies whether Samba should contact ctdb for accessing its tdb files and use ctdb as a backend for its messaging backend. Set this parameter to yes only if you have a cluster setup with ctdb running. Default: clustering = no
comment (S)
This is a text field that is seen next to a share when a client does a queries the server, either via the network neighborhood or via net view to list what shares are available. If you want to set the string that is displayed next to the machine name then see the server string parameter. Default: comment = #
No comment Files
= file = registry
Example: config
backend
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= /usr/local/samba/lib/smb.conf.%m
copy (S)
This parameter allows you to "clone" service entries. The specified service is simply duplicated under the current service's name. Any parameters specified in the current section will override those in the section being copied. This feature lets you set up a 'template' service and create similar services easily. Note that the service being copied must occur earlier in the configuration file than the service doing the copying. Default: copy = Example: copy = otherservice
= yes
create mode
This parameter is a synonym for create mask.
= 0744
27 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example: create
mask
= 0775
= manual = programs
Example: csc
policy
= = /tmp/ctdb.socket
Example: ctdbd
socket
=0
28 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
the cluster might be valid. Setting it too short will degrade the service your cluster presents, setting it too long might make the cluster itself not recover from something severely broken for too long. Be aware that if you set this parameter, this needs to be in the file smb.conf, it is not really helpful to put this into a registry configuration (typical on a cluster), because to access the registry contact to ctdb is required. Setting ctdb timeout to n makes any process waiting longer than n seconds for a reply by the cluster panic. Setting it to 0 (the default) makes Samba block forever, which is the highly recommended default. Default: ctdb
timeout
=0
= 30 = 60
Example: cups
connection timeout
= "no"
29 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
{convs,types}.
Default: cups
options
= "" = "raw
media=a4"
Example: cups
options
server server
= rpcecho = epmapper
wkssvc rpcecho samr netlogon lsarpc spoolss
Example: dcerpc
endpoint servers
deadtime (G)
The value of the parameter (a decimal integer) represents the number of minutes of inactivity before a connection is considered dead, and it is disconnected. The deadtime only takes effect if the number of open files is zero. This is useful to stop a server's resources being exhausted by a large number of inactive connections. Most clients have an auto-reconnect feature when a connection is broken so in most cases this parameter should be transparent to users. Using this parameter with a timeout of a few minutes is recommended for most systems. A deadtime of zero indicates that no auto-disconnection should be performed. Default: deadtime = 0 Example: deadtime = 15
30 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
= yes
= no
= no
timestamp logs
This parameter is a synonym for debug timestamp.
31 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: debug
timestamp
= yes
= no
= = /usr/local/etc/krb5.keytab
Example: dedicated
keytab file
= lower
= yes
32 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
default
This parameter is a synonym for default service.
= = pub
Example: default
service
= True
33 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
With the introduction of MS-RPC based printer support for Windows NT/2000 clients in Samba 2.2, it is now possible to delete a printer at run time by issuing the DeletePrinter() RPC call. For a Samba host this means that the printer must be physically deleted from the underlying printing system. The deleteprinter command defines a script to be run which will perform the necessary operations for removing the printer from the print system and from smb.conf. The deleteprinter command is automatically called with only one parameter: printer name. Once the deleteprinter command has been executed, smbd will reparse the smb.conf to check that the associated printer no longer exists. If the sharename is still valid, then smbd will return an ACCESS_DENIED error to the client. Default: deleteprinter
command
= = /usr/bin/removeprinter
Example: deleteprinter
command
= no
This parameter is only used to remove file shares. To delete printer shares, see the deleteprinter command. Default: delete
share command
= = /usr/local/bin/delshare
Example: delete
share command
34 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Full path to the script that will be called when a user is removed from a group using the Windows NT domain administration tools. It will be run by smbd(8) AS ROOT. Any %g will be replaced with the group name and any %u will be replaced with the user name. Default: delete
user from group script
= = /usr/sbin/deluser
%u %g
Example: delete
= = /usr/local/samba/bin/del_user
%u
Example: delete
user script
= no
35 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
By default this parameter is zero, meaning no caching will be done. No default Example: dfree
cache time
= 60
Note that you may have to replace the command names with full path names on some systems. By default internal routines for determining the disk capacity and remaining space will be used. No default Example: dfree
command
= /usr/local/samba/bin/dfree
36 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: dgram
port
= 138
directory mode
This parameter is a synonym for directory mask.
= 0755 = 0775
Example: directory
mask
= 100
Note
Clients that only support netbios won't be able to see your samba server when netbios
37 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
netbios
= no
= no
= = 192.168.0.1
Example: dns
forwarder
38 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Note that the maximum length for a NetBIOS name is 15 characters, so the DNS name (or DNS alias) can likewise only be 15 characters, maximum.
nmbd spawns a second copy of itself to do the DNS name lookup requests, as doing a name lookup is a blocking action.
Default: dns
proxy
= yes
= $prefix/sbin/samba_dnsupdate = /usr/local/sbin/dnsupdate
Example: dns
update command
= no
39 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: domain
master
= auto
= = /proc,/dev
Example: dont
descend
= no
40 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
check if a file has changed since it was last read. One of these calls uses a one-second granularity, the other uses a two second granularity. As the two second call rounds any odd second down, then if the file has a timestamp of an odd number of seconds then the two timestamps will not match and Visual C++ will keep reporting the file has changed. Setting this option causes the two timestamps to match, and Visual C++ is happy. Default: dos
filetime resolution
= no
= yes
= yes
ea support (S)
This boolean parameter controls whether smbd(8) will allow clients to attempt to store OS/2 style Extended attributes on a share. In order to enable this parameter the underlying filesystem exported by the share must support extended attributes (such as provided on XFS and EXT3 on Linux, with the correct kernel patches). On Linux the filesystem must have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel. Default: ea
support
= no
41 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The has been the default behavior in smbd for many years. However, certain Microsoft applications such as the Print Migrator tool require that the remote server support an [ADMIN$] file share. Disabling this parameter allows for creating an [ADMIN$] file share in smb.conf. Default: enable
asu support
= no
= yes = no
Example: enable
core files
= yes
= yes
42 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The use of plain text passwords is NOT advised as support for this feature is no longer maintained in Microsoft Windows products. If you want to use plain text passwords you must set this parameter to no. In order for encrypted passwords to work correctly smbd(8) must either have access to a local smbpasswd(5) file (see the smbpasswd(8) program for information on how to set up and maintain this file), or set the security = [domain|ads] parameter which causes smbd to authenticate against another server. Default: encrypt
passwords
= yes
= yes
= = /usr/bin/listports
Example: enumports
command
43 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The administrator must use an external process to parse the normal Unix logs such as /var/log /messages and write then entries to the eventlog tdb files. Refer to the eventlogadm(8) utility for how to write eventlog entries. Default: eventlog
list
= = Security
Application Syslog Apache
Example: eventlog
list
= no
It is generally much better to use the real oplocks support rather than this parameter. If you enable this option on all read-only shares or shares that you know will only be accessed from one client at a time such as physically read-only media like CDROMs, you will see a big performance improvement on many operations. If you enable this option on shares where multiple clients may be accessing the files read-write at the same time you can get data corruption. Use this option carefully!
44 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: fake
oplocks
= no
= yes
= 000 = 0755
Example: force
create mode
= 000 = 0755
Example: force
directory mode
group
45 sur 143 18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= = agroup
Example: force
group
= no
46 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
= = auser
Example: force
user
fstype (S)
This parameter allows the administrator to configure the string that specifies the type of filesystem a share is using that is reported by smbd(8) when a client queries the filesystem type for a share. The default type is NTFS for compatibility with Windows NT but this can be changed to other strings such as Samba or FAT if required. Default: fstype = NTFS
47 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
48 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example: get
quota command
= /usr/local/sbin/query_quota
= yes
= nobody = ftp
Example: guest
account
public
This parameter is a synonym for guest ok.
guest ok (S)
If this parameter is yes for a service, then no password is required to connect to the service. Privileges will be those of the guest account. This parameter nullifies the benefits of setting restrict anonymous = 2 See the section below on security for more information about this option. Default: guest
ok
= no
only guest
This parameter is a synonym for guest only.
49 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
If this parameter is yes for a service, then only guest connections to the service are permitted. This parameter will have no effect if guest ok is not set for the service. See the section below on security for more information about this option. Default: guest
only
= no
= yes
Default: hide
files
=#
= no
= no
50 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
and the program will extract the servername from before the first ':'. There should probably be a better parsing system that copes with different map formats and also Amd (another automounter) maps.
Note
A working NIS client is required on the system for this option to work. Default: homedir = = amd.homedir
map
Example: homedir
map
= yes
= no = yes
Example: hostname
lookups
allow hosts
51 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example 4: allow only hosts in NIS netgroup "foonet", but deny access from one particular host
hosts allow = @foonet hosts deny = pirate
Note
Note that access still requires suitable user-level passwords. See testparm(1) for a way of testing your host access to see if it does what you expect. Default: hosts
allow
=#
Example: hosts
allow
= 150.203.5.
deny hosts
52 sur 143 18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
=#
Example: hosts
deny
= 150.203.4.
= tdb
= 604800
(one week)
53 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This specifies the name of the idmap plugin to use as the SID/uid/gid backend for this domain. The standard backends are tdb (idmap_tdb(8)), tdb2 (idmap_tdb2(8)), ldap (idmap_ldap(8)), , rid (idmap_rid(8)), , hash (idmap_hash(8)), , autorid (idmap_autorid(8)), , ad (idmap_ad(8)), , and nss. (idmap_nss(8)), The corresponding manual pages contain the details, but here is a summary. The first three of these create mappings of their own using internal unixid counters and store the mappings in a database. These are suitable for use in the default idmap configuration. The rid and hash backends use a pure algorithmic calculation to determine the unixid for a SID. The autorid module is a mixture of the tdb and rid backend. It creates ranges for each domain encountered and then uses the rid algorithm for each of these automatically configured domains individually. The ad backend usees unix IDs stored in Active Directory via the standard schema extensions. The nss backend reverses the standard winbindd setup and gets the unixids via names from nsswitch which can be useful in an ldap setup. range = low - high Defines the available matching uid and gid range for which the backend is authoritative. For allocating backends, this also defines the start and the end of the range for allocating new unique IDs. winbind uses this parameter to find the backend that is authoritative for a unix ID to SID mapping, so it must be set for each individually configured domain and for the default configuration. The configured ranges must be mutually disjoint. read only = yes|no This option can be used to turn the writing backends tdb, tdb2, and ldap into read only mode. This can be useful e.g. in cases where a pre-filled database exists that should not be extended automatically. The following example illustrates how to configure the idmap_ad(8) backend for the CORP domain and the idmap_tdb(8) backend for all other domains. This configuration assumes that the admin of CORP assigns unix ids below 1000000 via the SFU extensions, and winbind is supposed to use the next million entries for its own mappings from trusted domains and for local groups for example.
idmap config * : backend = tdb idmap config * : range = 1000000-1999999 idmap config CORP : backend = ad idmap config CORP : range = 1000-999999
No default
winbind gid
This parameter is a synonym for idmap gid.
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The idmap gid parameter specifies the range of group ids for the default idmap configuration. It is now deprecated in favour of idmap config * : range. See the idmap config option. Default: idmap
gid
= = 10000-20000
Example: idmap
gid
= 120
winbind uid
This parameter is a synonym for idmap uid.
= = 10000-20000
Example: idmap
uid
include (G)
This allows you to include one config file inside another. The file is included literally, as though typed in place. It takes the standard substitutions, except %u, %P and %S. The parameter include = registry has a special meaning: It does not include a file named registry from the current working directory, but instead reads the global configuration options from the registry. See the section on registry-based configuration for details. Note that this option automatically activates registry shares. Default: include = Example: include = /usr/local/samba/lib/admin_smb.conf
55 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
always honored when creating a new file or subdirectory in these parent directories. The default behavior is to use the unix mode specified when creating the directory. Enabling this option sets the unix mode to 0777, thus guaranteeing that default directory acls are propagated. Note that using the VFS modules acl_xattr or acl_tdb which store native Windows as meta-data will automatically turn this option on for any share for which they are loaded, as they require this option to emulate Windows ACLs correctly. Default: inherit
acls
= no
= no
= no
= = 150.203.5.
myhost.mynet.de
Example: init
56 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= 100
interfaces (G)
This option allows you to override the default network interfaces list that Samba will use for browsing, name registration and other NetBIOS over TCP/IP (NBT) traffic. By default Samba will query the kernel for the list of all active interfaces and use any interfaces except 127.0.0.1 that are broadcast capable. The option takes a list of interface strings. Each string can be in any of the following forms: a network interface name (such as eth0). This may include shell-like wildcards so eth* will match any interface starting with the substring "eth" an IP address. In this case the netmask is determined from the list of interfaces obtained from the kernel an IP/mask pair. a broadcast/mask pair. The "mask" parameters can either be a bit length (such as 24 for a C class network) or a full netmask in dotted decimal form. The "IP" parameters above can either be a full dotted decimal IP address or a hostname which will be looked up via the OS's normal hostname resolution mechanisms. By default Samba enables all active interfaces that are broadcast capable except the loopback adaptor (IP address 127.0.0.1). The example below configures three network interfaces corresponding to the eth0 device and IP addresses 192.168.2.10 and 192.168.3.10. The netmasks of the latter two interfaces would be set to 255.255.255.0. Default: interfaces = Example: interfaces = eth0
192.168.2.10/24 192.168.3.10/255.255.255.0
57 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
A name starting with '+' is interpreted only by looking in the UNIX group database via the NSS getgrnam() interface. A name starting with '&' is interpreted only by looking in the NIS netgroup database (this requires NIS to be working on your system). The characters '+' and '&' may be used at the start of the name in either order so the value +&group means check the UNIX group database, followed by the NIS netgroup database, and the value &+group means check the NIS netgroup database, followed by the UNIX group database (the same as the '@' prefix). The current servicename is substituted for %S. This is useful in the [homes] section. Default: invalid
users
=#
Example: invalid
users
= root
= "" = MYCUPSSERVER
Example: iprint
server
keepalive (G)
The value of the parameter (an integer) represents the number of seconds between keepalive packets. If this parameter is zero, no keepalive packets will be sent. Keepalive packets, if sent, allow the server to tell whether a client is still present and responding. Keepalives should, in general, not be needed if the socket has the SO_KEEPALIVE attribute set on it by default. (see socket options). Basically you should only use this option if you strike difficulties. Please note this option only applies to SMB1 client connections, and has no effect on SMB2 clients. Default: keepalive = 300 Example: keepalive = 600
58 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
dedicated keytab - use a dedicated keytab for ticket verification secrets and keytab - use the secrets.tdb first, then the system keytab The major difference between "system keytab" and "dedicated keytab" is that the latter method relies on kerberos to find the correct keytab entry instead of filtering based on expected principals. When the kerberos method is in "dedicated keytab" mode, dedicated keytab file must be set to specify the location of the keytab file. Default: kerberos
method
= secrets
only
= yes
= no
59 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter defaults to yes and is translated to a no-op on systems that do not have the necessary kernel flock support. Default: kernel
share modes
= yes
= 464
= 88
= no
= yes
60 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
=2
=0 =1
Example: ldap
debug level
= 10 =5
Example: ldap
debug threshold
61 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter specifies whether a delete operation in the ldapsam deletes the complete entry or only the attributes specific to Samba. Default: ldap
delete dn
= no
= auto = searching
Example: ldap
deref
= auto = off
Example: ldap
follow referral
= = ou=Groups
Example: ldap
group suffix
= = ou=Idmap
Example: ldap
idmap suffix
62 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
value of ldap suffix will be used instead. The suffix string is pre-pended to the ldap suffix string so use a partial DN. Default: ldap
machine suffix
= = ou=Computers
Example: ldap
machine suffix
= 1024 = 512
Example: ldap
page size
= Try to update the LDAP, NT and LM passwords and update the pwdLastSet time.
= Update NT and LM passwords and update the pwdLastSet time. = Only update the LDAP password and let the LDAP server do the rest.
passwd sync
Only
Default: ldap
= no
63 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The value is specified in milliseconds, the maximum value is 5000 (5 seconds). Default: ldap
replication sleep
= 1000
ldapsam:editposix (G)
Editposix is an option that leverages ldapsam:trusted to make it simpler to manage a domain controller eliminating the need to set up custom scripts to add and manage the posix users and groups. This option will instead directly manipulate the ldap tree to create, remove and modify user and group entries. This option also requires a running winbindd as it is used to allocate new uids/gids on user/group creation. The allocation range must be therefore configured. To use this option, a basic ldap tree must be provided and the ldap suffix parameters must be properly configured. On virgin servers the default users and groups (Administrator, Guest, Domain Users, Domain Admins, Domain Guests) can be precreated with the command net sam provision. To run this command the ldap server must be running, Winbindd must be running and the smb.conf ldap options must be properly configured. The typical ldap setup used with the ldapsam:trusted = yes option is usually sufficient to use ldapsam:editposix = yes as well. An example configuration can be the following:
encrypt passwords = true passdb backend = ldapsam ldapsam:trusted=yes ldapsam:editposix=yes ldap ldap ldap ldap ldap ldap ldap admin dn = cn=admin,dc=samba,dc=org delete dn = yes group suffix = ou=groups idmap suffix = ou=idmap machine suffix = ou=computers user suffix = ou=users suffix = dc=samba,dc=org
This configuration assumes a directory layout like described in the following ldif:
dn: dc=samba,dc=org objectClass: top objectClass: dcObject objectClass: organization o: samba.org dc: samba dn: cn=admin,dc=samba,dc=org objectClass: simpleSecurityObject objectClass: organizationalRole cn: admin description: LDAP administrator userPassword: secret dn: ou=users,dc=samba,dc=org objectClass: top objectClass: organizationalUnit ou: users
64 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
dn: ou=groups,dc=samba,dc=org objectClass: top objectClass: organizationalUnit ou: groups dn: ou=idmap,dc=samba,dc=org objectClass: top objectClass: organizationalUnit ou: idmap dn: ou=computers,dc=samba,dc=org objectClass: top objectClass: organizationalUnit ou: computers
Default: ldapsam:editposix = no
ldapsam:trusted (G)
By default, Samba as a Domain Controller with an LDAP backend needs to use the Unix-style NSS subsystem to access user and group information. Due to the way Unix stores user information in /etc/passwd and /etc/group this inevitably leads to inefficiencies. One important question a user needs to know is the list of groups he is member of. The plain UNIX model involves a complete enumeration of the file /etc/group and its NSS counterparts in LDAP. UNIX has optimized functions to enumerate group membership. Sadly, other functions that are used to deal with user and group attributes lack such optimization. To make Samba scale well in large environments, the ldapsam:trusted = yes option assumes that the complete user and group database that is relevant to Samba is stored in LDAP with the standard posixAccount/posixGroup attributes. It further assumes that the Samba auxiliary object classes are stored together with the POSIX data in the same LDAP object. If these assumptions are met, ldapsam:trusted = yes can be activated and Samba can bypass the NSS system to query user group memberships. Optimized LDAP queries can greatly speed up domain logon and administration tasks. Depending on the size of the LDAP database a factor of 100 or more for common queries is easily achieved. Default: ldapsam:trusted = no
= no
65 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
the --with-ssl option to the configure script. LDAP connections should be secured where possible. This may be done setting either this parameter to Start_tls or by specifying ldaps:// in the URL argument of passdb backend. The ldap ssl can be set to one of two values:
Off
start tls
= Use the LDAPv3 StartTLS extended operation (RFC2830) for communicating with the directory server.
Please note that this parameter does only affect rpc methods. To enable the LDAPv3 StartTLS extended operation (RFC2830) for ads, set ldap ssl = yes and ldap ssl ads = yes. See smb.conf(5) for more information on ldap ssl ads. Default: ldap
ssl
= start
tls
= = dc=samba,dc=org
Example: ldap
suffix
= 15
= = ou=people
Example: ldap
user suffix
66 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Level2, or read-only oplocks allow Windows NT clients that have an oplock on a file to downgrade from a read-write oplock to a read-only oplock once a second client opens the file (instead of releasing all oplocks on a second open, as in traditional, exclusive oplocks). This allows all openers of the file that support level2 oplocks to cache the file for read-ahead only (ie. they may not cache writes or lock requests) and increases performance for many accesses of files that are not commonly written (such as application .EXE files). Once one of the clients which have a read-only oplock writes to the file all clients are notified (no reply is needed or waited for) and told to break their oplocks to "none" and delete any read-ahead caches. It is recommended that this parameter be turned on to speed access to shared executables. For more discussions on level2 oplocks see the CIFS spec. Currently, if kernel oplocks are supported then level2 oplocks are not granted (even if this parameter is set to yes). Note also, the oplocks parameter must be set to yes on this share in order for this parameter to have any effect. Default: level2
oplocks
= yes
lm announce (G)
This parameter determines if nmbd(8) will produce Lanman announce broadcasts that are needed by OS/2 clients in order for them to see the Samba server in their browse list. This parameter can have three values, yes, no, or auto. The default is auto. If set to no Samba will never produce these broadcasts. If set to yes Samba will produce Lanman announce broadcasts at a frequency set by the parameter lm interval. If set to auto Samba will not send Lanman announce broadcasts by default but will listen for them. If it hears such a broadcast on the wire it will then start sending them at a frequency set by the parameter lm interval. Default: lm
announce
= auto = yes
Example: lm
announce
lm interval (G)
If Samba is set to produce Lanman announce broadcasts needed by OS/2 clients (see the lm announce parameter) then this parameter defines the frequency in seconds with which they will be made. If this is set to zero then no Lanman announcements will be made despite the setting of the lm announce parameter. Default: lm
interval
= 60 = 120
Example: lm
interval
67 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: load
printers
= yes
= yes
lock dir
This parameter is a synonym for lock directory.
= ${prefix}/var/locks = /var/run/samba/locks
Example: lock
directory
locking (S)
This controls whether or not locking will be performed by the server in response to lock requests from the client. If locking = no, all lock and unlock requests will appear to succeed and all lock queries will report that the file in question is available for locking. If locking
= yes,
This option may be useful for read-only filesystems which may not need locking (such as CDROM drives), although setting this parameter of no is not really recommended even in this case. Be careful about disabling locking either globally or in a specific service, as lack of locking may result in data corruption. You should never need to set this parameter. No default
68 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The time in milliseconds that smbd should keep waiting to see if a failed lock request can be granted. This parameter has changed in default value from Samba 3.0.23 from 10 to 200. The associated lock spin count parameter is no longer used in Samba 3.0.24. You should not need to change the value of this parameter. Default: lock
spin time
= 200
= /usr/local/samba/var/log.%m
debuglevel
This parameter is a synonym for log level.
69 sur 143
18/10/2013 16:45
smb.conf
idmap quota acls locking msdfs dmapi registry
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: log
level
=0 =3
passdb:5 auth:10 winbind:2
Example: log
level
= = h:
Example: logon
drive
from a command prompt, for example. This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine. This parameter can be used with Win9X workstations to ensure that roaming profiles are stored in a subdirectory of the user's home directory. This is done in the following way:
logon home = \\%N\%U\profile
This tells Samba to return the above string, with substitutions made when a client requests the
70 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
info, generally in a NetUserGetInfo request. Win9X clients truncate the info to \\server\share when a user does net use /home but use the whole string when dealing with profiles. Note that in prior versions of Samba, the logon path was returned rather than logon home. This broke net use /home but allowed profiles outside the home directory. The current implementation is correct, and can be used for profiles if you use the above trick. Disable this feature by setting logon home = "" - using the empty string. This option is only useful if Samba is set up as a logon server. Default: logon
home
= \\%N\%U = \\remote_smb_server\%U
Example: logon
home
Warning
Do not quote the value. Setting this as \\%N\profile\%U will break profile handling. Where the tdbsam or ldapsam passdb backend is used, at the time the user account is created the value configured for this parameter is written to the passdb backend and that value will over-ride the parameter value present in the smb.conf file. Any error present in the passdb backend account record must be editted using the appropriate tool (pdbedit on the command-line, or any other locally provided system tool).
71 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Note that this option is only useful if Samba is set up as a domain controller. Disable the use of roaming profiles by setting the value of this parameter to the empty string. For example, logon path = "". Take note that even if the default setting in the smb.conf file is the empty string, any value specified in the user account settings in the passdb backend will over-ride the effect of setting this parameter to null. Disabling of all roaming profile use requires that the user account settings must also be blank. An example of use is:
logon path = \\PROFILESERVER\PROFILE\%U
Default: logon
path
= \\%N\%U\profile
The contents of the batch file are entirely your choice. A suggested command would be to add NET TIME \\SERVER /SET /YES, to force every machine to synchronize clocks with the same time server. Another use would be to add NET USE U: \\SERVER\UTILS for commonly used utilities, or
NET USE Q: \\SERVER\ISO9001_QA
for example. Note that it is particularly important not to allow write access to the [netlogon] share, or to grant users write permission on the batch files in a secure environment, as this would allow the batch files to be arbitrarily modified and security to be breached. This option takes the standard substitutions, allowing you to have separate logon scripts for each user or machine. This option is only useful if Samba is set up as a logon server. Default: logon
script
= = scripts\%U.bat
Example: logon
script
72 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Windows application requested. Setting this option to "yes" makes smbd log with a level 0 message a list of all files that have been opened for writing when the network connection died. Those are the files that are potentially corrupted. It is meant as an aid for the administrator to give him a list of files to do consistency checks on. Default: log
writeable files on exit
= no
Default: lppause
Example: lppause
command
= /usr/bin/lpalt
%p-%j -p0
= 30 = 10
Example: lpq
cache time
73 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter specifies the command to be executed on the server host in order to obtain lpq -style printer status information. This command should be a program or script which takes a printer name as its only parameter and outputs printer status information. Currently nine styles of printer status information are supported; BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, CUPS, and SOFTQ. This covers most UNIX systems. You control which type is expected using the printing = option. Some clients (notably Windows for Workgroups) may not correctly send the connection number for the printer they are requesting status information about. To get around this, the server reports on the first printer service connected to by the client. This only happens if the connection number sent is invalid. If a %p is given then the printer name is put in its place. Otherwise it is placed at the end of the command. Note that it is good practice to include the absolute path in the lpq command as the $PATH may not be available to the server. When compiled with the CUPS libraries, no lpq command is needed because smbd will make a library call to obtain the print queue listing. Default: lpq
command
= = /usr/bin/lpq
-P%p
Example: lpq
command
as the PATH
or if the value of the printing parameter is SOFTQ, then the default is:
qstat -s -j%j -r
No default
74 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example: lpresume
command
= /usr/bin/lpalt
%p-%j -p2
Default: lprm
command
= determined
by printing parameter
= 604800
Warning
If two clients use the same magic undefined. Default: magic = <magic
script
output
script name>.out
Example: magic
75 sur 143
output
= myfile.txt
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= = user.csh
Example: magic
script
76 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The name mangling (if enabled) allows a file to be copied between UNIX directories from Windows/DOS while retaining the long UNIX filename. UNIX files can be renamed to a new extension from Windows/DOS and will retain the same basename. Mangled names do not change between sessions. Default: mangled
names
= yes
=1 =4
Example: mangle
prefix
=~ =^
Example: mangling
char
= hash2 = hash
Example: mangling
method
77 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: map
acl inherit
= no
= yes
- The read only DOS attribute is mapped to the inverse of the user or owner write bit in the unix permission mode set. If the owner write bit is not set, the read only attribute is reported as being set on the file. If the read only DOS attribute is set, Samba sets the owner, group and others write bits to zero. Write bits set in an ACL are ignored by Samba. If the read only DOS attribute is unset, Samba simply sets the write bit of the owner to one. - The read only DOS attribute is mapped to the effective permissions of the connecting user, as evaluated by smbd(8) by reading the unix permissions and POSIX ACL (if present). If the connecting user does not have permission to modify the file, the read only attribute is reported as being set on the file.
Permissions
- The read only DOS attribute is unaffected by permissions, and can only be set by the store dos attributes method. This may be useful for exporting mounted CDs.
No
Default: map
readonly
= yes
78 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
- Means user login requests with an invalid password are rejected. This is the default.
- Means user logins with an invalid password are rejected, unless the username does not exist, in which case it is treated as a guest login and mapped into the guest account.
Bad User Bad Password
- Means user logins with an invalid password are treated as a guest login and mapped into the guest account. Note that this can cause problems as it means that any user incorrectly typing their password will be silently logged on as "guest" - and will not know the reason they cannot access files they think they should - there will have been no message given to them that they got their password wrong. Helpdesk services will hate you if you set the map to guest parameter this way :-).
- Is only applicable when Samba is configured in some type of domain mode security (security = {domain|ads}) and means that user logins which are successfully authenticated but which have no valid Unix user account (and smbd is unable to create one) should be mapped to the defined guest account. This was the default behavior of Samba 2.x releases. Note that if a member server is running winbindd, this option should never be required because the nss_winbind library will export the Windows domain users and groups to the underlying OS via the Name Service Switch interface.
Bad Uid
Note that this parameter is needed to set up "Guest" share services. This is because in these modes the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client so the server cannot make authentication decisions at the correct time (connection to the share) for "Guest" shares. Default: map
to guest
= Never = Bad
User
Example: map
to guest
79 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
the case where smbd is acting as a PDC this will be DOMAIN\user. In the case where smbd is acting as a domain member server or a standalone server this will be WORKSTATION\user. In previous versions of Samba (pre 3.4), if smbd was acting as a domain member server, the BOGUS domain name would instead be replaced by the primary domain which smbd was a member of. In this case authentication would be deferred off to a DC using the credentials DOMAIN\user. When this parameter is set to yes smbd provides the legacy behavior of mapping untrusted domain names to the primary domain. When smbd is not acting as a domain member server, this parameter has no effect. Default: map
untrusted to domain
= no
=0 = 10
Example: max
connections
Default: max
disk size
Example: max
disk size
80 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
periodically checks the size and if it is exceeded it will rename the file, adding a .old extension. A size of 0 means no limit. Default: max
log size
= 5000 = 1000
Example: max
log size
= 50
= 16404
= 1000 = 5000
Example: max
print jobs
=0 = 1000
Example: max
81 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
system and is intended as a stopgap to prevent degrading service to clients in the event that the server has insufficient resources to handle more than this number of connections. Remember that under normal operating conditions, each user will have an smbd(8) associated with him or her to handle connections to all shares from a given host. Default: max
smbd processes
=0 = 1000
Example: max
smbd processes
= 256 = 100
Example: max
= 259200
= 518400
= 16644 = 8192
Example: max
xmit
82 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This would normally be a command that would deliver the message somehow. How this is to be done is up to your imagination. An example is:
message command = csh -c 'xedit %s;rm %s' &
This delivers the message using xedit, then removes it afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COMMAND RETURN IMMEDIATELY. That's why I have the '&' on the end. If it doesn't return immediately then your PCs may freeze when sending messages (they should recover after 30 seconds, hopefully). All messages are delivered as the global guest user. The command takes the standard substitutions, although %u won't work (%U may be better in this case). Apart from the standard substitutions, some additional ones apply. In particular:
%s %t %f
= the filename containing the message. = the destination that the message was sent to (probably the server name). = who the message is from.
You could make this command send mail, or whatever else takes your fancy. Please let us know of any really interesting ideas you have. Here's a way of sending the messages as mail to root:
message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s
If you don't have a message command then the message won't be delivered and Samba will tell the sender there was an error. Unfortunately WfWg totally ignores the error code and carries on regardless, saying that the message was delivered. If you want to silently delete it then try:
message command = rm %s
Default: message
command
= = csh
-c 'xedit %s; rm %s' &
Example: message
command
=0 = 2000
Example: min
print space
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This option changes the behavior of smbd(8) when processing SMBwriteX calls. Any incoming SMBwriteX call on a non-signed SMB/CIFS connection greater than this value will not be processed in the normal way but will be passed to any underlying kernel recvfile or splice system call (if there is no such call Samba will emulate in user space). This allows zero-copy writes directly from network socket buffers into the filesystem buffer cache, if available. It may improve performance but user testing is recommended. If set to zero Samba processes SMBwriteX calls in the normal way. To enable POSIX large write support (SMB/CIFS writes up to 16Mb) this option must be nonzero. The maximum value is 128k. Values greater than 128k will be silently set to 128k. Note this option will have NO EFFECT if set on a SMB signed connection. The default is zero, which disables this option. Default: min
receivefile size
=0
= 21600
= \otherserver\someshare
= no
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= yes
= 660 =0
Example: name
cache timeout
: Do a standard host name to IP address resolution, using the system /etc/hosts , NIS, or DNS lookups. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf file. Note that this method is used only if the NetBIOS name type being queried is the 0x20 (server) name type or 0x1c (domain controllers). The latter case is only useful for active directory domains and results in a DNS query for the SRV RR entry matching _ldap._tcp.domain.
host
: Query a name with the IP address listed in the WINSSERVER parameter. If no WINS server has been specified this method will be ignored.
wins
: Do a broadcast on each of the known local interfaces listed in the interfaces parameter. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet.
bcast
The example below will cause the local lmhosts file to be examined first, followed by a broadcast attempt, followed by a normal system hostname lookup. When Samba is functioning in ADS security mode (security settings for name resolve order:
name resolve order = wins bcast = ads)
DC lookups will still be done via DNS, but fallbacks to netbios names will not inundate your DNS servers with needless querys for DOMAIN<0x1c> lookups.
85 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: name
resolve order
= lmhosts
Example: name
resolve order
= lmhosts
socket address
This parameter is a synonym for nbt client socket address.
= 0.0.0.0 = 192.168.2.20
Example: nbt
= 137
= ${prefix}/var/ncalrpc = /var/run/samba/ncalrpc
Example: ncalrpc
dir
86 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: netbios
aliases
=#
Example: netbios
aliases
= TEST
=#
Example: netbios
name
= MYNAME
= no
87 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
is needed to make nmbd work correctly in combination with the socket address option. You should not need to unset this option. Default: nmbd
bind explicit broadcast
= yes
= $prefix/sbin/nsupdate
-g
= yes
= yes
= yes
= $prefix/run/samba/ntp_signd
88 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= yes
= unixuid
default
= no
= no
= no
89 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Warning
DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE. Default: oplock =0
Warning
DO NOT CHANGE THIS PARAMETER UNLESS YOU HAVE READ AND UNDERSTOOD THE SAMBA OPLOCK CODE. Default: oplock =2
contention limit
oplocks (S)
This boolean option tells smbd whether to issue oplocks (opportunistic locks) to file open requests on this share. The oplock code can dramatically (approx. 30% or more) improve the speed of access to files on Samba servers. It allows the clients to aggressively cache files locally and you may want to disable this option for unreliable network environments (it is turned on by default in Windows NT Servers). Oplocks may be selectively turned off on certain files with a share. See the veto oplock files parameter. On some systems oplocks are recognized by the underlying operating system. This allows data synchronization between all access to oplocked files, whether it be via Samba or NFS or a local UNIX process. See the kernel oplocks parameter for details. Default: oplocks = yes
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The parameter is used to define the absolute path to a file containing a mapping of Windows NT printer driver names to OS/2 printer driver names. The format is: <nt driver name> = <os2 driver name>.<device name> For example, a valid entry using the HP LaserJet 5 printer driver would appear as HP = LASERJET.HP LaserJet 5L.
LaserJet 5L
The need for the file is due to the printer driver namespace problem described in the chapter on Classical Printing in the Samba3-HOWTO book. For more details on OS/2 clients, please refer to chapter on other clients in the Samba3-HOWTO book. Default: os2
driver map
os level (G)
This integer value controls what level Samba advertises itself as for browse elections. The value of this parameter determines whether nmbd(8) has a chance of becoming a local master browser for the workgroup in the local broadcast area. Note: By default, Samba will win a local master browsing election over all Microsoft operating systems except a Windows NT 4.0/2000 Domain Controller. This means that a misconfigured Samba host can effectively isolate a subnet for browsing purposes. This parameter is largely auto-configured in the Samba-3 release series and it is seldom necessary to manually override the default setting. Please refer to the chapter on Network Browsing in the Samba-3 HOWTO document for further information regarding the use of this parameter. Note: The maximum value for this parameter is 255. If you use higher values, counting will start at 0! Default: os
level
= 20 = 65
Example: os
level
= no
= = "/bin/sleep
90000"
Example: panic
action
91 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
- The old plaintext passdb backend. Some Samba features will not work if this passdb backend is used. Takes a path to the smbpasswd file as an optional argument. - The TDB based password storage backend. Takes a path to the TDB as an optional argument (defaults to passdb.tdb in the private dir directory.
tdbsam
- The LDAP based passdb backend. Takes an LDAP URL as an optional argument (defaults to ldap://localhost)
ldapsam
LDAP connections should be secured where possible. This may be done using either Start-TLS (see ldap ssl) or by specifying ldaps:// in the URL argument. Multiple servers may also be specified in double-quotes. Whether multiple servers are supported or not and the exact syntax depends on the LDAP library you use. Examples of use are:
passdb backend = tdbsam:/etc/samba/private/passdb.tdb or multi server LDAP URL with OpenLDAP library: passdb backend = ldapsam:"ldap://ldap-1.example.com ldap://ldap-2.example.com" or multi server LDAP URL with Netscape based LDAP library: passdb backend = ldapsam:"ldap://ldap-1.example.com ldap-2.example.com"
Default: passdb
backend
= tdbsam
= no
92 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
debug level of 100. This is a dangerous option as it will allow plaintext passwords to be seen in the smbd log. It is available to help Samba admins debug their passwd chat scripts when calling the passwd program and should be turned off after this has been done. This option has no effect if the pam password change parameter is set. This parameter is off by default. Default: passwd
chat debug
= no
=2
= *new*password* = "*Enter
Example: passwd
changed*"
chat
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The name of a program that can be used to set UNIX user passwords. Any occurrences of %u will be replaced with the user name. The user name is checked for existence before calling the password changing program. Also note that many passwd programs insist in reasonable passwords, such as a minimum length, or the inclusion of mixed case chars and digits. This can pose a problem as some clients (such as Windows for Workgroups) uppercase the password before sending it. Note that if the unix password sync parameter is set to yes then this program is called AS ROOT before the SMB password in the smbpasswd file is changed. If this UNIX password change fails, then smbd will fail to change the SMB password also (this is by design). If the unix password sync parameter is set this parameter MUST USE ABSOLUTE PATHS for ALL programs called, and must be examined for security implications. Note that by default unix password sync is set to no. Default: passwd
program
= = /bin/passwd
%u
Example: passwd
program
"FRed", "FrEd", "FreD", "fREd", "fReD", "frED", .. And so on. The higher value this parameter is set to the more likely it is that a mixed case password will be matched against a single case password. However, you should be aware that use of this parameter reduces security and increases the time taken to process a new connection. A value of zero will cause only two attempts to be made - the password as is and the password in all-lower case. This parameter is used only when using plain-text passwords. It is not at all used when encrypted passwords as in use (that is the default since samba-3.0.0). Use this only when
94 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
=0 =4
Example: password
level
=* = NT-PDC,
NT-BDC1, NT-BDC2, * 192.168.1.101 *
server server
= windc.mydomain.com:389
directory
This parameter is a synonym for path.
path (S)
This parameter specifies a directory to which the user of the service is to be given access. In the case of printable services, this is where print data will spool prior to being submitted to the host for printing. For a printable service offering guest access, the service should be readonly and the path should be world-writeable and have the sticky bit set. This is not mandatory of course, but you probably won't get the results you expect if you do otherwise.
95 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Any occurrences of %u in the path will be replaced with the UNIX username that the client is using on this connection. Any occurrences of %m will be replaced by the NetBIOS name of the machine they are connecting from. These replacements are very useful for setting up pseudo home directories for users. Note that this path will be based on root dir if one was specified. Default: path = Example: path = /home/fred
= ${prefix}/var/locks = /var/run/
Example: pid
directory
= yes
postexec (S)
This option specifies a command to be run whenever the service is disconnected. It takes the usual substitutions. The command may be run as the root on some systems. An interesting example may be to unmount server resources:
postexec = /etc/umount /cdrom
96 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
exec
This parameter is a synonym for preexec.
preexec (S)
This option specifies a command to be run whenever the service is connected to. It takes the usual substitutions. An interesting example is to send the users a welcome message every time they log in. Maybe a message of the day? Here is an example:
preexec = csh -c 'echo \"Welcome to %S!\" | /usr/local/samba/bin/smbclient -M %m -I %I' &
Of course, this could get annoying after a while :-) See also preexec close and postexec. Default: preexec = Example: preexec = echo
\"%u connected to %S from %m (%I)\" >> /tmp/log
prefered master
This parameter is a synonym for preferred master.
= auto
97 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This is a list of paths to modules that should be loaded into smbd before a client connects. This improves the speed of smbd when reacting to new connections somewhat. Default: preload
modules
= = /usr/lib/samba/passdb/mysql.so
Example: preload
modules
auto services
This parameter is a synonym for preload.
preload (G)
This is a list of services that you want to be automatically added to the browse lists. This is most useful for homes and printers services that would otherwise not be visible. Note that if you just want all printers in your printcap file loaded then the load printers option is easier. Default: preload = Example: preload = fred
lp colorlp
= yes
print ok
This parameter is a synonym for printable.
printable (S)
If this parameter is yes, then clients may open, write to and submit spool files on the directory specified for the service. Note that a printable service will ALWAYS allow writing to the service path (user privileges permitting) via the spooling of print data. The read only parameter controls only non-printing access to the resource. Default: printable = no
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
known printers. Setting this parameter to 0 disables any rescanning for new or removed printers after the initial startup. Default: printcap
cache time
= 750 = 600
Example: printcap
cache time
printcap
This parameter is a synonym for printcap name.
where the '|' separates aliases of a printer. The fact that the second alias has a space in it gives a hint to Samba that it's a comment.
Note
Under AIX the default printcap name is /etc/qconfig. Samba will assume the file is in AIX qconfig format if the string qconfig appears in the printcap filename. Default: printcap = /etc/printcap = /etc/myprintcap
name
Example: printcap
name
99 sur 143
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
After a print job has finished spooling to a service, this command will be used via a system() call to process the spool file. Typically the command specified will submit the spool file to the host's printing subsystem, but there is no requirement that this be the case. The server will not remove the spool file, so whatever command you specify should remove the spool file when it has been processed, otherwise you will need to manually remove old spool files. The print command is simply a text string. It will be used verbatim after macro substitutions have been made: %s, %f - the path to the spool file name %p - the appropriate printer name %J - the job name as transmitted by the client. %c - The number of printed pages of the spooled job (if known). %z - the size of the spooled print job (in bytes) The print command MUST contain at least one occurrence of %s or %f - the %p is optional. At the time a job is submitted, if no printer name is supplied the %p will be silently removed from the printer command. If specified in the [global] section, the print command given will be used for any printable service that does not have its own print command specified. If there is neither a specified print command for a printable service nor a global print command, spool files will be created but not processed and (most importantly) not removed. Note that printing may fail on some UNIXes from the nobody account. If this happens then create an alternative guest account that can print and set the guest account in the [global] section. You can form quite complex print commands by realizing that they are just passed to a shell. For example the following will log a print job, print the file, then remove it. Note that ';' is the usual separator for command in shell scripts.
print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s
You may have to vary this command considerably depending on how you normally print files on your system. The default for the parameter varies depending on the setting of the printing parameter. Default: For printing
= BSD, AIX, QNX, LPRNG or PLP :
For printing
= SYSV or HPUX :
For printing
= SOFTQ :
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
For printing = CUPS : If SAMBA is compiled against libcups, then printcap = cups uses the CUPS API to submit jobs, etc. Otherwise it maps to the System V commands with the -oraw option for printing, i.e. it uses lp -c -d%p -oraw; rm %s. With printing = cups, and if SAMBA is compiled against libcups, any manually set print command will be ignored. No default Example: print
command
= /usr/local/samba/bin/myprintscript
%p %s
printer
This parameter is a synonym for printer name.
= none = laserwriter
Example: printer
name
printing (S)
This parameters controls how printer status information is interpreted on your system. It also affects the default values for the print command, lpq command, lppause command , lpresume command, and lprm command if specified in the [global] section. Currently nine printing styles are supported. They are BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX, SOFTQ, CUPS and IPRINT. Be aware that CUPS and IPRINT are only available if the CUPS development library was available at the time Samba was compiled or packaged. To see what the defaults are for the other print commands when using the various options use the testparm(1) program. This option can be set on a per printer basis. Please be aware however, that you must place any of the various printing commands (e.g. print command, lpq command, etc...) after defining the value for the printing option since it will reset the printing commands to default values. See also the discussion in the [printers] section. Default: printing = Depends
on the operating system, see testparm -v.
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= %U = %D\%U
Example: printjob
username
= yes
private directory
This parameter is a synonym for private dir.
= ${prefix}/private
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
profile directory (named after the user) is created by the workstation profile code and has an ACL restricting entry to the directory tree to the owning user. Note that this parameter should be set to yes on dedicated profile shares only. On other shares, it might cause incorrect file ownerships. Default: profile
acls
= no
= disable
%p
= = enable
%p
Example: queueresume
command
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= = mary,
@students
Example: read
list
write ok
This parameter is a synonym for read only.
= yes
= yes
realm (G)
This option specifies the kerberos realm to use. The realm is used as the ADS equivalent of the NT4 domain. It is usually set to the DNS name of the kerberos server. Default: realm = Example: realm = mysambabox.mycompany.com
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
is set to registry.
= no = yes
Example: registry
shares
the above line would cause nmbd to announce itself to the two given IP addresses using the given workgroup names. If you leave out the workgroup name, then the one given in the workgroup parameter is used instead. The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable. See the chapter on Network Browsing in the Samba-HOWTO book. Default: remote
announce
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
the above line would cause nmbd to request the master browser on the specified subnets or addresses to synchronize their browse lists with the local server. The IP addresses you choose would normally be the broadcast addresses of the remote networks, but can also be the IP addresses of known browse masters if your network config is that stable. If a machine IP address is given Samba makes NO attempt to validate that the remote machine is available, is listening, nor that it is in fact the browse master on its segment. The remote browse sync may be used on networks where there is no WINS server, and may be used on disjoint networks where each network has its own WINS server. Default: remote
browse sync
Note
The script has all responsibility to rename all the necessary data that is accessible in this posix method. This can mean different requirements for different backends. The tdbsam and smbpasswd backends will take care of the contents of their respective files, so the script is responsible only for changing the POSIX username, and other data that may required for your circumstances, such as home directory. Please also consider whether or not you need to rename the actual home directories themselves. The ldapsam backend will not make any changes, because of the potential issues with renaming the LDAP naming attribute. In this case the script is responsible for changing the attribute that samba uses (uid) for locating users, as well as any data that needs to change for other applications using the same directory. Default: rename = no
user script
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: reset
on zero vc
= no
registry key in Windows 2000 and Windows NT. When set to 0, user and group list information is returned to anyone who asks. When set to 1, only an authenticated user can retrieve user and group list information. For the value 2, supported by Windows 2000/XP and Samba, no anonymous connections are allowed at all. This can break third party and Microsoft applications which expect to be allowed to perform operations anonymously. The security advantage of using restrict anonymous = 1 is dubious, as user and group list information can be obtained using other means.
Note
The security advantage of using restrict anonymous = 2 is removed by setting guest ok = yes on any share. Default: restrict =0
anonymous
= /usr/sbin/rndc = /usr/local/bind9/sbin/rndc
Example: rndc
command
root
This parameter is a synonym for root directory.
root dir
This parameter is a synonym for root directory.
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
the filesystem, or attempts to use ".." in file names to access other directories (depending on the setting of the wide smbconfoptions parameter). Adding a root directory entry other than "/" adds an extra level of security, but at a price. It absolutely ensures that no access is given to files not in the sub-tree specified in the root directory option, including some files needed for complete operation of the server. To maintain full operability of the server you will need to mirror some system files into the root directory tree. In particular you will need to mirror /etc/passwd (or a subset of it), and any binaries or configuration files needed for printing (if required). The set of files that must be mirrored is operating system dependent. Default: root
directory
=/ = /homes/smb
Example: root
directory
= no
= False
rpc_daemon:DAEMON (G)
Defines whether to use the embedded code or start a separate daemon for the defined rpc services. The rpc_daemon prefix must be followed by the server name, and a value.
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Two possible values are currently supported: disabled fork The classic method is to run rpc services as internal daemons embedded in smbd, therefore the external daemons are disabled by default. Choosing the fork option will cause samba to fork a separate proces for each daemon configured this way. Each daemon may in turn fork a number of children used to handle requests from multiple smbds and direct tcp/ip connections (if the Endpoint Mapper is enabled). Communication with smbd happens over named pipes and require that said pipes are forward to the external daemon (see rpc_server). Forked RPC Daemons support dynamically forking children to handle connections. The heuristics about how many children to keep around and how fast to allow them to fork and also how many clients each child is allowed to handle concurrently is defined by parametrical options named after the daemon. Five options are currently supported: prefork_min_children prefork_max_children prefork_spawn_rate prefork_max_allowed_clients prefork_child_min_life To set one of these options use the follwing syntax:
damonname:prefork_min_children = 5
Samba includes separate daemons for spoolss and the lsarpc/lsass, netlogon and samr pipes. Currently three daemons are available and they are called: epmd lsasd spoolssd Example:
rpc_daemon:spoolssd = fork
rpc_server:SERVER (G)
With this option you can define if a rpc service should be running internal/embedded in smbd or should be redirected to an external daemon like Samba4, the endpoint mapper daemon, the spoolss daemon or the new LSA service daemon. The rpc_server prefix must be followed by the pipe name, and a value. This option can be set for each available rpc service in Samba. The following list shows all available pipe names services you can modify with this option. epmapper - Endpoint Mapper winreg - Remote Registry Service srvsvc - Remote Server Services lsarpc - Local Security Authority samr - Security Account Management netlogon - Netlogon Remote Protocol netdfs - Settings for Distributed File System
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
dssetup - Active Directory Setup wkssvc - Workstation Services spoolss - Network Printing Spooler svcctl - Service Control ntsvcs - Plug and Play Services eventlog - Event Logger initshutdown - Init Shutdown Service Three possible values currently supported are: embedded external disabled The classic method is to run every pipe as an internal function embedded in smbd. The defaults may vary depending on the service. Choosing the external option allows to run a separate daemon or even a completely independent (3rd party) server capable of interfacing with samba via the MS-RPC interface over named pipes. Currently in Samba3 we support three daemons, spoolssd, epmd and lsasd. These daemons can be enabled using the rpc_daemon option. For spoolssd you have to to enable the daemon and proxy the named pipe with: Examples:
rpc_daemon:lsasd = fork rpc_server:lsarpc = external rpc_server:samr = external rpc_server:netlogon = external rpc_server:spoolss = external rpc_server:epmapper = disabled
There is one special option which allows you to enable rpc services to listen for ncacn_ip_tcp connections too. Currently this is only used for testing and doesn't scale!
rpc_server:tcpip = yes
= $prefix/sbin/samba_kcc
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example: samba
kcc command
= /usr/local/bin/kcc
security (G)
This option affects how clients respond to Samba and is one of the most important settings in the smb.conf file. The default is security server or a DC.
= user,
= ads
or security
= domain
You should use security = user and map to guest if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server. The different settings will now be explained. SECURITY = AUTO This is the default security setting in Samba, and causes Samba to consult the server role parameter (if set) to determine the security mode. SECURITY = USER If server role is not specified, this is the default security setting in Samba. With user-level security a client must first "log-on" with a valid username and password (which can be mapped using the username map parameter). Encrypted passwords (see the encrypted passwords parameter) can also be used in this security mode. Parameters such as user and guest only if set are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated. Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this. SECURITY = DOMAIN This mode will only work correctly if net(8) has been used to add this machine into a Windows NT Domain. It expects the encrypted passwords parameter to be set to yes. In this mode Samba will try to validate the username/password by passing it to a Windows NT Primary or Backup Domain Controller, in exactly the same way that a Windows NT Server would do. Note that a valid UNIX user must still exist as well as the account on the Domain Controller to
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
allow Samba to have a valid UNIX account to map file access to. Note that from the client's point of view security = domain is the same as security = user. It only affects how the server deals with the authentication, it does not in any way affect what the client sees. Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this. See also the password server parameter and the encrypted passwords parameter. Note that the name of the resource being requested is not sent to the server until after the server has successfully authenticated the client. This is why guest shares don't work in user level security without allowing the server to automatically map unknown users into the guest account. See the map to guest parameter for details on doing this. See also the password server parameter and the encrypted passwords parameter. SECURITY = ADS In this mode, Samba will act as a domain member in an ADS realm. To operate in this mode, the machine running Samba will need to have Kerberos installed and configured and Samba will need to be joined to the ADS realm using the net utility. Note that this mode does NOT make Samba operate as a Active Directory Domain Controller. Read the chapter about Domain Membership in the HOWTO for details. Default: security = USER Example: security = DOMAIN
max protocol
This parameter is a synonym for server max protocol.
protocol
This parameter is a synonym for server max protocol.
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
LANMAN2: NT1:
Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available.
SMB2_02: SMB2_10: SMB2_22: SMB2_24:
SMB2:
The earliest SMB2 version. Windows 7 SMB2 version. Early Windows 8 SMB2 version. Windows 8 beta SMB2 version.
The same as SMB2. Used by Windows 8. SMB3 has sub protocols available.
SMB3_00:
By default SMB3 selects the SMB3_00 variant. Normally this option should not be set as the automatic negotiation phase in the SMB protocol takes care of choosing the appropriate protocol. Default: server
max protocol
= SMB3 = LANMAN1
Example: server
max protocol
min protocol
This parameter is a synonym for server min protocol.
= LANMAN1 = NT1
Example: server
min protocol
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The alternatives are server role = standalone or server joining Samba to a Windows domain, along with server Samba as a Windows domain controller.
You should use server role = standalone and map to guest if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server. SERVER ROLE = AUTO This is the default server role in Samba, and causes Samba to consult the security parameter (if set) to determine the server role, giving compatable behaviours to previous Samba versions. SERVER ROLE = STANDALONE If security is also not specified, this is the default security setting in Samba. In standalone operation, a client must first "log-on" with a valid username and password (which can be mapped using the username map parameter) stored on this machine. Encrypted passwords (see the encrypted passwords parameter) are by default used in this security mode. Parameters such as user and guest only if set are then applied and may change the UNIX user to use on this connection, but only after the user has been successfully authenticated. SERVER ROLE = MEMBER SERVER This mode will only work correctly if net(8) has been used to add this machine into a Windows Domain. It expects the encrypted passwords parameter to be set to yes. In this mode Samba will try to validate the username/password by passing it to a Windows or Samba Domain Controller, in exactly the same way that a Windows Server would do. Note that a valid UNIX user must still exist as well as the account on the Domain Controller to allow Samba to have a valid UNIX account to map file access to. Winbind can provide this. SERVER ROLE = CLASSIC PRIMARY DOMAIN CONTROLLER This mode of operation runs a classic Samba primary domain controller, providing domain logon services to Windows and Samba clients of an NT4-like domain. Clients must be joined to the domain to create a secure, trusted path across the network. There must be only one PDC per NetBIOS scope (typcially a broadcast network or clients served by a single WINS server). SERVER ROLE = NETBIOS BACKUP DOMAIN CONTROLLER This mode of operation runs a classic Samba backup domain controller, providing domain logon services to Windows and Samba clients of an NT4-like domain. As a BDC, this allows multiple Samba servers to provide rudundent logon services to a single NetBIOS scope. SERVER ROLE = ACTIVE DIRECTORY DOMAIN CONTROLLER This mode of operation runs Samba as an active directory domain controller, providing domain logon services to Windows and Samba clients of the domain. This role requires special configuration, see the Samba4 HOWTO Default: server
role
= AUTO
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Example: server
role
= DOMAIN
CONTROLLER
= auto = yes
Example: server
schannel
= s3fs
rpc nbt wrepl ldap cldap kdc drepl winbind ntp_signd kcc
Example: server
services
= -s3fs
+smb
= Disabled
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= Samba
Example: server
string
= University
then users of the service may not use the setdir command to change
The setdir command is only implemented in the Digital Pathworks client. See the Pathworks documentation for details. Default: set
directory
= no
= = /usr/sbin/usermod
-g '%g' '%u'
Example: set
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
3 - id (uid for user, gid for group, -1 if N/A) 4 - quota state (0 = disable, 1 = enable, 2 = enable and enforce) 5 - block softlimit 6 - block hardlimit 7 - inode softlimit 8 - inode hardlimit 9(optional) - block size, defaults to 1024 The script should output at least one line of data on success. And nothing on failure. Default: set
quota command
= = /usr/local/sbin/set_quota
Example: set
quota command
= classic
share:fake_fscaps (G)
This is needed to support some special application that makes QFSINFO calls to check whether we set the SPARSE_FILES bit (0x40). If this bit is not set that particular application refuses to work against Samba. With share:fake_fscaps = 64 the SPARSE_FILES file system capability flag is set. Use other decimal values to specify the bitmask you need to fake. Default: share:fake_fscaps = 0
= yes
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Note
This does not prevent the same user from having administrative privilege on an individual printer. Default: show = yes
will be substituted with the number of seconds to wait before effectively starting the shutdown procedure. will be substituted with the switch -r. It means reboot after shutdown for NT.
%r %f
will be substituted with the switch -f. It means force the shutdown even if applications do not respond for NT.
18/10/2013 16:45
smb.conf
/sbin/shutdown $3 $4 +$time $1 &
http://www.samba.org/samba/docs/man/manpages-3/smb...
= = /usr/local/samba/sbin/shutdown
%m %t %r %f
Example: shutdown
script
= 8192
= 1048576
= 1048576
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
The maximum is 1048576 bytes (1MiB), which is the same as a Windows Server 2008 r2. Please note that the default is 1MiB, but it's limit is based on the smb2 dialect (64KiB for SMB2.0, 1MiB for SMB2.1 with LargeMTU). Large MTU is not supported over NBT (tcp port 139). Default: smb2
max write
= 1048576
= auto
Default: smb
passwd file
= ${prefix}/private/smbpasswd
= 445
139
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
If you are on a wide area network then perhaps try setting IPTOS_THROUGHPUT. Note that several of the options may cause your Samba server to fail completely. Use these options with caution! Default: socket
options
= TCP_NODELAY = IPTOS_LOWDELAY
Example: socket
options
= $prefix/sbin/samba_spnupdate = /usr/local/sbin/spnupdate
Example: spn
update command
= yes
= ${prefix}/var/locks = /var/run/samba/locks/state
Example: state
directory
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
have been mounted with the mount option user_xattr in order for extended attributes to work, also extended attributes must be compiled into the Linux kernel. In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store the create time for a file as well as the DOS attributes. This is done in a backwards compatible way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this extended attribute by earlier versions of Samba, but they will not be able to read the create time stored there. Storing the create time separately from the normal filesystem meta-data allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem. Default: store
dos attributes
= no
= no
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Well-behaved clients always ask for lock checks when it is important. So in the vast majority of cases, strict locking = Auto or strict locking = no is acceptable. Default: strict
locking
= Auto
= no
= = cups
postfix portmap httpd
Example: svcctl
list
= no
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: syslog
only
= no
syslog (G)
This parameter maps how Samba debug messages are logged onto the system syslog logging levels. Samba debug level zero maps onto syslog LOG_ERR, debug level one maps onto LOG_WARNING, debug level two maps onto LOG_NOTICE, debug level three maps onto LOG_INFO. All higher levels are mapped to LOG_DEBUG. This parameter sets the threshold for sending messages to syslog. Only messages with debug level less than this value will be sent to syslog. There still will be some logging to log.[sn]mbd even if syslog only is enabled. Default: syslog = 1
= /home/%D/%U
= no
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= yes
unicode (G)
Specifies whether the server and client should support unicode. If this option is set to false, the use of ASCII will be forced. Default: unicode = True
= UTF8 = ASCII
Example: unix
charset
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
features such as symbolic links, hard links, etc... These extensions require a similarly enabled client, and are of no current use to Windows clients. Note if this parameter is turned on, the wide links parameter will automatically be disabled. See the parameter allow insecure wide links if you wish to change this coupling between the two parameters. Default: unix
extensions
= yes
= no
= no
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
parameter is provided to help the Samba developers track down problems with the tdb internal code. Default: use
mmap
= yes
=0 =5
Example: username
level
=0 = 60
Example: username
= = /etc/samba/scripts/mapusers.sh
Example: username
map script
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Or to map anyone in the UNIX group system to the UNIX name sys you would use:
sys = @system
You can have as many mappings as you like in a username map file. If your system supports the NIS NETGROUP option then the netgroup database is checked before the /etc/group database for matching groups. You can map Windows usernames that have spaces in them by using double quotes around the name. For example:
tridge = "Andrew Tridgell"
would map the windows username "Andrew Tridgell" to the unix username "tridge". The following example would map mary and fred to the unix user sys, and map the rest to guest. Note the use of the '!' to tell Samba to stop processing if it gets a match on that line:
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Note that the remapping is applied to all occurrences of usernames. Thus if you connect to \\server\fred and fred is remapped to mary then you will actually be connecting to \\server\mary and will need to supply a password suitable for mary not fred. The only exception to this is the username passed to a Domain Controller (if you have one). The DC will receive whatever username the client supplies without modification. Also note that no reverse mapping is done. The main effect this has is with printing. Users who have been mapped may have trouble deleting print jobs as PrintManager under WfWg will think they don't own the print job. Samba versions prior to 3.0.8 would only support reading the fully qualified username (e.g.: DOMAIN\user) from the username map when performing a kerberos login from a client. However, when looking up a map entry for a user authenticated by NTLM[SSP], only the login name would be used for matches. This resulted in inconsistent behavior sometimes even on the same server. The following functionality is obeyed in version 3.0.8 and later: When performing local authentication, the username map is applied to the login name before attempting to authenticate the connection. When relying upon a external domain controller for validating authentication requests, smbd will apply the username map to the fully qualified username (i.e. DOMAIN\user) only after the user has been successfully authenticated. An example of use is:
username map = /usr/local/samba/lib/users.map
Default: username
map
=#
no username map
user
This parameter is a synonym for username.
users
This parameter is a synonym for username.
username (S)
To restrict a service to a particular set of users you can use the valid users parameter. This parameter is deprecated However, it currently operates only in conjunction with only user. The supported way to restrict a service to a particular set of users is the valid users parameter. Default: username = #
The guest account if a guest service, else <empty string>.
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
=0
= True
In this case, only members of the group "power_users" can create user defined shares. Default: usershare
path
= STATEDIR/usershare
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter specifies a list of absolute pathnames the root of which are allowed to be exported by user defined share definitions. If the pathname to be exported doesn't start with one of the strings in this list, the user defined share will not be allowed. This allows the Samba administrator to restrict the directories on the system that can be exported by user defined shares. If there is a "usershare prefix deny list" and also a "usershare prefix allow list" the deny list is processed first, followed by the allow list, thus leading to the most restrictive interpretation. Default: usershare
prefix allow list
= NULL = /home
/data /space
Example: usershare
= NULL = /etc
/dev /private
Example: usershare
= NULL = template_share
Example: usershare
template share
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
that use protocol levels lower than NT LM 0.12 and when it detects a client is Windows 9x (using sendfile from Linux will cause these clients to fail). Default: use
sendfile
= false
= yes
=#
Determined automatically
Example: utmp
directory
= /var/run/utmp
utmp (G)
This boolean parameter is only available if Samba has been configured and compiled with the option --with-utmp. If set to yes then Samba will attempt to add utmp or utmpx records (depending on the UNIX system) whenever a connection is made to a Samba server. Sites may use this to record the user connecting to a Samba share. Due to the requirements of the utmp record, we are required to create a unique identifier for the incoming user. Enabling this option creates an n^2 algorithm to find this number. This may impede performance on large installations. Default: utmp = no
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
Default: valid
users
=#
Example: valid
users
= greg,
-valid (S)
This parameter indicates whether a share is valid and thus can be used. When this parameter is set to false, the share will be in no way visible nor accessible. This option should not be used by regular users but might be of help to developers. Samba uses this option internally to mark shares as deleted. Default: -valid = yes
Default: veto
files
= No
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
contention for files ending in .SEM. To cause Samba not to grant oplocks on these files you would use the line (either in the [global] section or in the section for the particular NetBench share. An example of use is:
veto oplock files = /.*SEM/
Default: veto
oplock files
=#
vfs object
This parameter is a synonym for vfs objects.
= = extd_audit
recycle
Example: vfs
objects
volume (S)
This allows you to override the volume label returned for a share. Useful for CDROMs with installation programs that insist on a particular volume label. Default: volume = #
the name of the share
= 901 = 80
Example: web
port
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
See the parameter allow insecure wide links if you wish to change this coupling between the two parameters. Default: wide
links
= no
= 300
= $prefix/lib/winbindd_privileged
= $prefix/run/samba/winbindd
Warning
Turning off group enumeration may cause some programs to behave oddly. Default: winbind = no
enum groups
Warning
Turning off user enumeration may cause some programs to behave oddly. For example,
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
the finger program relies on having access to the full user list when searching for matching usernames. Default: winbind = no
enum users
=1
= 200
=1 = 10
Example: winbind
= yes
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no = yes
Example: winbind
normalize names
shell
and template
homedir)
- When Samba is running in security = ads and your Active Directory Domain Controller does support the Microsoft "Services for Unix" (SFU) LDAP schema, winbind can retrieve the login shell and the home directory attributes directly from your Directory Server. For SFU 3.0 or 3.5 simply choose "sfu", if you use SFU 2.0 please choose "sfu20". Note that retrieving UID and GID from your ADS-Server requires to use idmap config DOMAIN:backend = ad as well. The primary group membership is currently always calculated via the "primaryGroupID" LDAP attribute.
<sfu | sfu20 | rfc2307 >
Default: winbind
nss info
= template = sfu
Example: winbind
nss info
= false = true
Example: winbind
offline logon
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter specifies the number of seconds the winbindd(8) daemon will wait between attempts to contact a Domain controller for a domain that is determined to be down or not contactable. Default: winbind
reconnect delay
= 30
= false = true
Example: winbind
refresh tickets
= no
= yes
= '\' =+
Example: winbind
separator
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter is now deprecated in favor of the newer idmap_nss backend. Refer to the idmap_nss(8) man page for more information. Default: winbind
trusted domains only
= no
= no = yes
Example: winbind
The first argument is the operation and is one of "add", "delete", or "refresh". In most cases the operation can be ignored as the rest of the parameters provide sufficient information. Note that "refresh" may sometimes be called when the name has not previously been added, in that case it should be treated as an add. The second argument is the NetBIOS name. If the name is not a legal name then the wins hook is not called. Legal names contain only letters, digits, hyphens, underscores and periods. The third argument is the NetBIOS name type as a 2 digit hexadecimal number. The fourth argument is the TTL (time to live) for the name in seconds. The fifth and subsequent arguments are the IP addresses currently registered for that name. If this list is empty then the name should be deleted. An example script that calls the BIND dynamic DNS update program nsupdate is provided in the examples directory of the Samba source code. No default
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
= no
Note
You need to set up Samba to point to a WINS server if you have multiple subnets and wish cross-subnet browsing to work correctly. See the chapter in the Samba3-HOWTO on Network Browsing. Default: wins
server
Example: wins server = mary:192.9.200.1 fred:192.168.3.199 mary:192.168.2.61 # For this example when querying a certain name, 192.19.200.1 will be asked first and if that doesn't
respond 192.168.2.61. If either of those doesn't know the name 192.168.3.199 will be queried.
Example: wins
server
= 192.9.200.1
192.168.2.61
= no
workgroup (G)
This controls what workgroup your server will appear to be in when queried by clients. Note that this parameter also controls the Domain name used with the security = domain setting. Default: workgroup = WORKGROUP
18/10/2013 16:45
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
writable
This parameter is a synonym for writeable.
writeable (S)
Inverted synonym for read only. Default: writeable = no
=0 = 262144
# for a 256k cache size per file
Example: write
cache size
= = admin,
root, @staff
Example: write
list
= yes
smb.conf
http://www.samba.org/samba/docs/man/manpages-3/smb...
This parameter is only available if Samba has been configured and compiled with the option --with-utmp. It specifies a directory pathname that is used to store the wtmp or wtmpx files (depending on the UNIX system) that record user connections to a Samba server. The difference with the utmp directory is the fact that user info is kept after a user has logged out. By default this is not set, meaning the system will use whatever utmp file the native system is set to use (usually /var/run/wtmp on Linux). Default: wtmp
directory
= = /var/log/wtmp
Example: wtmp
directory
WARNINGS
Although the configuration file permits service names to contain spaces, your client software may not. Spaces will be ignored in comparisons anyway, so it shouldn't be a problem - but be aware of the possibility. On a similar note, many clients - especially DOS clients - limit service names to eight characters. smbd(8) has no such limitation, but attempts to connect from such clients will fail if they truncate the service names. For this reason you should probably keep your service names down to eight characters in length. Use of the [homes] and [printers] special sections make life for an administrator easy, but the various combinations of default attributes can be tricky. Take extreme care when designing these sections. In particular, ensure that the permissions on spool directories are correct.
VERSION
This man page is correct for version 4 of the Samba suite.
SEE ALSO
samba(7), smbpasswd(8), swat(8), smbd(8), nmbd(8), winbindd(8), samba(8), samba-tool(8), smbclient(1), nmblookup(1), testparm(1), testprns(1).
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. The original Samba man pages were written by Karl Auer. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at ftp://ftp.icce.rug.nl/pub/unix/) and updated for the Samba 2.0 release by Jeremy Allison. The conversion to DocBook for Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
18/10/2013 16:45