~ubuntu-branches/ubuntu/maverick/samba/maverick-security

« back to all changes in this revision

Viewing changes to docs/manpages/smb.conf.5

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-03-03 22:02:23 UTC
  • mfrom: (0.28.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090303220223-3bdlm2d9fwx1p1ye
Tags: 2:3.3.1-1ubuntu1
* Merge from Debian unstable (LP: #337094), remaining changes:
  + debian/patches/VERSION.patch:
    - setup SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access. 
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/mksambapasswd.awk:
    - Do not add user with UID less than 1000 to smbpasswd.
  + debian/control:
    - Make libwbclient0 replace/conflict with hardy's likewise-open.
    - Don't build against ctdb.
  + debian/rules:
    - enable "native" PIE hardening.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
* Dropped changes, merged in Debian:
  + debian/libpam-smbpass.pam-config, debian/libpam-smbpass.postinst,
    debian/libpam-smbpass.prerm, debian/libpam-smbpass.files,
    debian/rules:
    - Make libpam-smbpasswd depend on libpam-runtime to allow 
      libpam-smbpasswd for auto-configuration.
  + debian/control:
    - Provide a config block for the new PAM framework to auto-configure
      itself
  + debian/samba.postinst:
    - When populating the new sambashare group, it is not an error
      if the user simply does not exist; test for this case and let
      the install continue instead of aborting.
  + debian/winbind.files:
    - include additional files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: smb.conf
2
2
.\"    Author: [see the "AUTHOR" section]
3
3
.\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>
4
 
.\"      Date: 01/27/2009
 
4
.\"      Date: 02/24/2009
5
5
.\"    Manual: File Formats and Conventions
6
6
.\"    Source: Samba 3.3
7
7
.\"  Language: English
8
8
.\"
9
 
.TH "SMB\&.CONF" "5" "01/27/2009" "Samba 3\&.3" "File Formats and Conventions"
 
9
.TH "SMB\&.CONF" "5" "02/24/2009" "Samba 3\&.3" "File Formats and Conventions"
10
10
.\" -----------------------------------------------------------------
11
11
.\" * (re)Define some macros
12
12
.\" -----------------------------------------------------------------
1046
1046
This boolean parameter controls what
1047
1047
\fBsmbd\fR(8)does on receiving a protocol request of "open for delete" from a Windows client\&. If a Windows client doesn\'t have permissions to delete a file then they expect this to be denied at open time\&. POSIX systems normally only detect restrictions on delete by actually attempting to delete the file or directory\&. As Windows clients can (and do) "back out" a delete request by unsetting the "delete on close" bit Samba cannot delete the file immediately on "open for delete" request as we cannot restore such a deleted file\&. With this parameter set to true (the default) then smbd checks the file system permissions directly on "open for delete" and denies the request without actually deleting the file if the file system permissions would seem to deny it\&. This is not perfect, as it\'s possible a user could have deleted a file without Samba being able to check the permissions correctly, but it is close enough to Windows semantics for mostly correct behaviour\&. Samba will correctly check POSIX ACL semantics in this case\&.
1048
1048
.sp
1049
 
If this parameter is set to "false" Samba doesn\'t check permissions on "open for delete" and allows the open\&. If the user doesn\'t have permission to delete the file this will only be discovered at close time, which is too late for the Windows user tools to display an error message to the user\&. The symptom of this is files that appear to have been deleted "magically" re\-appearing on a Windows explorer refersh\&. 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\&.
 
1049
If this parameter is set to "false" Samba doesn\'t check permissions on "open for delete" and allows the open\&. If the user doesn\'t have permission to delete the file this will only be discovered at close time, which is too late for the Windows user tools to display an error message to the user\&. The symptom of this is files that appear to have been deleted "magically" re\-appearing on a 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\&.
1050
1050
.sp
1051
1051
Default:
1052
1052
\fI\fIacl check permissions\fR\fR\fI = \fR\fI\FCTrue\F[]\fR\fI \fR
2005
2005
\fBsmbclient\fR(8)
2006
2006
and other samba client tools will attempt to authenticate itself to servers using the weaker LANMAN password hash\&. If disabled, only server which support NT password hashes (e\&.g\&. Windows NT/2000, Samba, etc\&.\&.\&. but not Windows 95/98) will be able to be connected from the Samba client\&.
2007
2007
.sp
2008
 
The LANMAN encrypted response is easily broken, due to it\'s case\-insensitive nature, and the choice of algorithm\&. Clients without Windows 95/98 servers are advised to disable this option\&.
 
2008
The LANMAN encrypted response is easily broken, due to its case\-insensitive nature, and the choice of algorithm\&. Clients without Windows 95/98 servers are advised to disable this option\&.
2009
2009
.sp
2010
2010
Disabling this option will also disable the
2011
2011
\FCclient plaintext auth\F[]
2114
2114
.\" client signing
2115
2115
.PP
2116
2116
.RS 4
2117
 
This controls whether the client offers or requires the server it talks to to use SMB signing\&. Possible values are
 
2117
This controls whether the client is allowed or required to use SMB signing\&. Possible values are
2118
2118
\fIauto\fR,
2119
2119
\fImandatory\fR
2120
2120
and
3134
3134
.\" enable asu support
3135
3135
.PP
3136
3136
.RS 4
3137
 
Hosts running the "Advanced Server for Unix (ASU)" product require some special accomodations such as creating a builting [ADMIN$] share that only supports IPC connections\&. 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\&.
 
3137
Hosts running the "Advanced Server for Unix (ASU)" product require some special accomodations such as creating a builtin [ADMIN$] share that only supports IPC connections\&. 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\&.
3138
3138
.sp
3139
3139
Default:
3140
3140
\fI\fIenable asu support\fR\fR\fI = \fR\fI\FCno\F[]\fR\fI \fR
3190
3190
.sp
3191
3191
The first enhancement to browse propagation consists of a regular wildcard query to a Samba WINS server for all Domain Master Browsers, followed by a browse synchronization with each of the returned DMBs\&. The second enhancement consists of a regular randomised browse synchronization with all currently known DMBs\&.
3192
3192
.sp
3193
 
You may wish to disable this option if you have a problem with empty workgroups not disappearing from browse lists\&. Due to the restrictions of the browse protocols these enhancements can cause a empty workgroup to stay around forever which can be annoying\&.
 
3193
You may wish to disable this option if you have a problem with empty workgroups not disappearing from browse lists\&. Due to the restrictions of the browse protocols, these enhancements can cause a empty workgroup to stay around forever which can be annoying\&.
3194
3194
.sp
3195
3195
In general you should leave this option enabled as it makes cross\-subnet browse propagation much more reliable\&.
3196
3196
.sp
4540
4540
\fBsmbd\fR(8)
4541
4541
will attempt to authenticate users or permit password changes using the LANMAN password hash\&. If disabled, only clients which support NT password hashes (e\&.g\&. Windows NT/2000 clients, smbclient, but not Windows 95/98 or the MS DOS network client) will be able to connect to the Samba host\&.
4542
4542
.sp
4543
 
The LANMAN encrypted response is easily broken, due to it\'s case\-insensitive nature, and the choice of algorithm\&. Servers without Windows 95/98/ME or MS DOS clients are advised to disable this option\&.
 
4543
The LANMAN encrypted response is easily broken, due to its case\-insensitive nature, and the choice of algorithm\&. Servers without Windows 95/98/ME or MS DOS clients are advised to disable this option\&.
4544
4544
.sp
4545
4545
Unlike the
4546
4546
\FCencrypt passwords\F[]
4902
4902
\fI\fIldapsam:trusted\fR\fR\fI = \fR\fI\FCno\F[]\fR\fI \fR
4903
4903
.RE
4904
4904
 
 
4905
ldap ssl ads (G)
 
4906
.\" ldap ssl ads
 
4907
.PP
 
4908
.RS 4
 
4909
This option is used to define whether or not Samba should use SSL when connecting to the ldap server using
 
4910
\fIads\fR
 
4911
methods\&. Rpc methods are not affected by this parameter\&. Please note, that this parameter won\'t have any effect if
 
4912
\m[blue]\fBldap ssl\fR\m[]
 
4913
is set to
 
4914
\fIno\fR\&.
 
4915
.sp
 
4916
See
 
4917
smb\&.conf(5)
 
4918
for more information on
 
4919
\m[blue]\fBldap ssl\fR\m[]\&.
 
4920
.sp
 
4921
Default:
 
4922
\fI\fIldap ssl ads\fR\fR\fI = \fR\fI\FCno\F[]\fR\fI \fR
 
4923
.RE
 
4924
 
4905
4925
ldap ssl (G)
4906
4926
.\" ldap ssl
4907
4927
.PP
4914
4934
\FCconfigure\F[]
4915
4935
script\&.
4916
4936
.sp
4917
 
LDAP connections should be secured where possible\&. This may be done setting either this parameter to
 
4937
LDAP connections should be secured where possible\&. This may be done setting
 
4938
\fIeither\fR
 
4939
this parameter to
4918
4940
\fIStart_tls\fR
4919
 
or by specifying
 
4941
\fIor\fR
 
4942
by specifying
4920
4943
\fIldaps://\fR
4921
4944
in the URL argument of
4922
4945
\m[blue]\fBpassdb backend\fR\m[]\&.
4949
4972
= Use the LDAPv3 StartTLS extended operation (RFC2830) for communicating with the directory server\&.
4950
4973
.sp
4951
4974
.RE
 
4975
Please note that this parameter does only affect
 
4976
\fIrpc\fR
 
4977
methods\&. To enable the LDAPv3 StartTLS extended operation (RFC2830) for
 
4978
\fIads\fR, set
 
4979
\m[blue]\fBldap ssl = yes\fR\m[]
 
4980
\fIand\fR
 
4981
\m[blue]\fBldap ssl ads = yes\fR\m[]\&. See
 
4982
smb\&.conf(5)
 
4983
for more information on
 
4984
\m[blue]\fBldap ssl ads\fR\m[]\&.
 
4985
.sp
4952
4986
Default:
4953
4987
\fI\fIldap ssl\fR\fR\fI = \fR\fI\FCstart tls\F[]\fR\fI \fR
4954
4988
.RE
7444
7478
.RS 4
7445
7479
By specifying the name of another SMB server or Active Directory domain controller with this option, and using
7446
7480
\FCsecurity = [ads|domain|server]\F[]
7447
 
it is possible to get Samba to to do all its username/password validation using a specific remote server\&.
 
7481
it is possible to get Samba to do all its username/password validation using a specific remote server\&.
7448
7482
.sp
7449
7483
This option sets the name or IP address of the password server to use\&. New syntax has been added to support defining the port to use when connecting to the server the case of an ADS realm\&. To define a port other than the default LDAP port of 389, add the port number using a colon after the name or IP address (e\&.g\&. 192\&.168\&.1\&.100:389)\&. If you do not specify a port, Samba will use the standard LDAP port of tcp/389\&. Note that port numbers have no effect on password servers for Windows NT 4\&.0 domains or netbios connections\&.
7450
7484
.sp
8224
8258
.PP
8225
8259
.RS 4
8226
8260
This option allows you to setup
8227
 
\fBnmbd\fR(8)to periodically announce itself to arbitrary IP addresses with an arbitrary workgroup name\&.
 
8261
\fBnmbd\fR(8)
 
8262
to periodically announce itself to arbitrary IP addresses with an arbitrary workgroup name\&.
8228
8263
.sp
8229
8264
This is useful if you want your Samba server to appear in a remote workgroup for which the normal browse propagation rules don\'t work\&. The remote workgroup can be anywhere that you can send IP packets to\&.
8230
8265
.sp
8256
8291
.sp
8257
8292
the above line would cause
8258
8293
\FCnmbd\F[]
8259
 
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
 
8294
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
8260
8295
\m[blue]\fBworkgroup\fR\m[]
8261
8296
parameter is used instead\&.
8262
8297
.sp
8558
8593
\FCsecurity = share\F[]
8559
8594
if you want to mainly setup shares without a password (guest shares)\&. This is commonly used for a shared printer server\&. It is more difficult to setup guest shares with
8560
8595
\FCsecurity = user\F[], see the
8561
 
\m[blue]\fBmap to guest\fR\m[]parameter for details\&.
 
8596
\m[blue]\fBmap to guest\fR\m[]
 
8597
parameter for details\&.
8562
8598
.sp
8563
8599
It is possible to use
8564
8600
\FCsmbd\F[]
8571
8607
.sp
8572
8608
\fISECURITY = SHARE\fR
8573
8609
.sp
8574
 
When clients connect to a share level security server they need not log onto the server with a valid username and password before attempting to connect to a shared resource (although modern clients such as Windows 95/98 and Windows NT will send a logon request with a username but no password when talking to a
 
8610
When clients connect to a share level security server, they need not log onto the server with a valid username and password before attempting to connect to a shared resource (although modern clients such as Windows 95/98 and Windows NT will send a logon request with a username but no password when talking to a
8575
8611
\FCsecurity = share \F[]
8576
8612
server)\&. Instead, the clients send authentication information (passwords) on a per\-share basis, at the time they attempt to connect to that share\&.
8577
8613
.sp
8776
8812
\fBNote\fR
8777
8813
.ps -1
8778
8814
.br
8779
 
From the client\'s point of view
 
8815
From the client\'s point of view,
8780
8816
\FCsecurity = server\F[]
8781
8817
is the same as
8782
8818
\FCsecurity = user\F[]\&. It only affects how the server deals with the authentication, it does not in any way affect what the client sees\&.
8828
8864
denies access if the client is not able to speak netlogon schannel\&. This is only the case for Windows NT4 before SP4\&.
8829
8865
.sp
8830
8866
Please note that with this set to
8831
 
\FCno\F[]
8832
 
you will have to apply the WindowsXP
 
8867
\FCno\F[], you will have to apply the WindowsXP
8833
8868
\FCWinXP_SignOrSeal\&.reg\F[]
8834
8869
registry patch found in the docs/registry subdirectory of the Samba distribution tarball\&.
8835
8870
.sp
8844
8879
.\" server signing
8845
8880
.PP
8846
8881
.RS 4
8847
 
This controls whether the server offers or requires the client it talks to to use SMB signing\&. Possible values are
 
8882
This controls whether the client is allowed or required to use SMB signing\&. Possible values are
8848
8883
\fIauto\fR,
8849
8884
\fImandatory\fR
8850
8885
and
9257
9292
.RS 4
9258
9293
This is a new feature introduced with Samba 3\&.2 and above\&. It is an extension to the SMB/CIFS protocol negotiated as part of the UNIX extensions\&. SMB encryption uses the GSSAPI (SSPI on Windows) ability to encrypt and sign every request/response in a SMB protocol stream\&. When enabled it provides a secure method of SMB/CIFS communication, similar to an ssh protected session, but using SMB/CIFS authentication to negotiate encryption and signing keys\&. Currently this is only supported by Samba 3\&.2 smbclient, and hopefully soon Linux CIFSFS and MacOS/X clients\&. Windows clients do not support this feature\&.
9259
9294
.sp
9260
 
This controls whether the server offers or requires the client it talks to to use SMB encryption\&. Possible values are
 
9295
This controls whether the remote client is allowed or required to use SMB encryption\&. Possible values are
9261
9296
\fIauto\fR,
9262
9297
\fImandatory\fR
9263
9298
and
9551
9586
This is an enumerated type that controls the handling of file locking in the server\&. When this is set to
9552
9587
\fByes\fR, the server will check every read and write access for file locks, and deny access if locks exist\&. This can be slow on some systems\&.
9553
9588
.sp
9554
 
When strict locking is set to Auto (the default), the server performs file lock checks only on non\-oplocked files\&. As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for inproved performance\&.
 
9589
When strict locking is set to Auto (the default), the server performs file lock checks only on non\-oplocked files\&. As most Windows redirectors perform file locking checks locally on oplocked files this is a good trade off for improved performance\&.
9555
9590
.sp
9556
9591
When strict locking is disabled, the server performs file lock checks only when the client explicitly asks for them\&.
9557
9592
.sp
9745
9780
.\" update encrypted
9746
9781
.PP
9747
9782
.RS 4
9748
 
This boolean parameter allows a user logging on with a plaintext password to have their encrypted (hashed) password in the smbpasswd file to be updated automatically as they log on\&. This option allows a site to migrate from plaintext password authentication (users authenticate with plaintext password over the wire, and are checked against a UNIX account atabase) to encrypted password authentication (the SMB challenge/response authentication mechanism) without forcing all users to re\-enter their passwords via smbpasswd at the time the change is made\&. This is a convenience option to allow the change over to encrypted passwords to be made over a longer period\&. Once all users have encrypted representations of their passwords in the smbpasswd file this parameter should be set to
 
9783
This boolean parameter allows a user logging on with a plaintext password to have their encrypted (hashed) password in the smbpasswd file to be updated automatically as they log on\&. This option allows a site to migrate from plaintext password authentication (users authenticate with plaintext password over the wire, and are checked against a UNIX account database) to encrypted password authentication (the SMB challenge/response authentication mechanism) without forcing all users to re\-enter their passwords via smbpasswd at the time the change is made\&. This is a convenience option to allow the change over to encrypted passwords to be made over a longer period\&. Once all users have encrypted representations of their passwords in the smbpasswd file this parameter should be set to
9749
9784
\fBno\fR\&.
9750
9785
.sp
9751
9786
In order for this parameter to be operative the
9758
9793
\m[blue]\fBupdate encrypted\fR\m[]
9759
9794
to work\&.
9760
9795
.sp
9761
 
Note that even when this parameter is set a user authenticating to
 
9796
Note that even when this parameter is set, a user authenticating to
9762
9797
\FCsmbd\F[]
9763
9798
must still enter a valid password in order to connect correctly, and to update their hashed (smbpasswd) passwords\&.
9764
9799
.sp
9776
9811
The differentiating factor is that under normal circumstances, the NT/2000 client will attempt to open the network printer using MS\-RPC\&. The problem is that because the client considers the printer to be local, it will attempt to issue the OpenPrinterEx() call requesting access rights associated with the logged on user\&. If the user possesses local administator rights but not root privilege on the Samba host (often the case), the OpenPrinterEx() call will fail\&. The result is that the client will now display an "Access Denied; Unable to connect" message in the printer queue window (even though jobs may successfully be printed)\&.
9777
9812
.sp
9778
9813
If this parameter is enabled for a printer, then any attempt to open the printer with the PRINTER_ACCESS_ADMINISTER right is mapped to PRINTER_ACCESS_USE instead\&. Thus allowing the OpenPrinterEx() call to succeed\&.
9779
 
\fIThis parameter MUST not be able enabled on a print share which has valid print driver installed on the Samba server\&.\fR
 
9814
\fIThis parameter MUST not be enabled on a print share which has valid print driver installed on the Samba server\&.\fR
9780
9815
.sp
9781
9816
Default:
9782
9817
\fI\fIuse client driver\fR\fR\fI = \fR\fI\FCno\F[]\fR\fI \fR
10124
10159
.RS 4
10125
10160
This parameter controls whether user defined shares are allowed to be accessed by non\-authenticated users or not\&. It is the equivalent of allowing people who can create a share the option of setting
10126
10161
\fIguest ok = yes\fR
10127
 
in a share definition\&. Due to the security sensitive nature of this the default is set to off\&.
 
10162
in a share definition\&. Due to its security sensitive nature, the default is set to off\&.
10128
10163
.sp
10129
10164
Default:
10130
10165
\fI\fIusershare allow guests\fR\fR\fI = \fR\fI\FCno\F[]\fR\fI \fR
10196
10231
.\" usershare prefix allow list
10197
10232
.PP
10198
10233
.RS 4
10199
 
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 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\&.
 
10234
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\&.
10200
10235
.sp
10201
10236
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\&.
10202
10237
.sp
10226
10261
.\" usershare template share
10227
10262
.PP
10228
10263
.RS 4
10229
 
User defined shares only have limited possible parameters such as path, guest ok etc\&. This parameter allows usershares to "cloned" from an existing share\&. If "usershare template share" is set to the name of an existing share, then all usershares created have their defaults set from the parameters set on this share\&.
 
10264
User defined shares only have limited possible parameters such as path, guest ok, etc\&. This parameter allows usershares to "cloned" from an existing share\&. If "usershare template share" is set to the name of an existing share, then all usershares created have their defaults set from the parameters set on this share\&.
10230
10265
.sp
10231
10266
The target share may be set to be invalid for real file sharing by setting the parameter "\-valid = False" on the template share definition\&. This causes it not to be seen as a real exported share but to be able to be used as a template for usershares\&.
10232
10267
.sp