spacepaste

  1.  
  2. # This is the main Samba configuration file. You should read the
  3. # smb.conf(5) manual page in order to understand the options listed
  4. # here. Samba has a huge number of configurable options (perhaps too
  5. # many!) most of which are not shown in this example
  6. #
  7. # For a step to step guide on installing, configuring and using samba,
  8. # read the Samba-HOWTO-Collection. This may be obtained from:
  9. # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
  10. #
  11. # Many working examples of smb.conf files can be found in the
  12. # Samba-Guide which is generated daily and can be downloaded from:
  13. # http://www.samba.org/samba/docs/Samba-Guide.pdf
  14. #
  15. # Any line which starts with a ; (semi-colon) or a # (hash)
  16. # is a comment and is ignored. In this example we will use a #
  17. # for commentry and a ; for parts of the config file that you
  18. # may wish to enable
  19. #
  20. # NOTE: Whenever you modify this file you should run the command "testparm"
  21. # to check that you have not made any basic syntactic errors.
  22. #
  23. #======================= Global Settings =====================================
  24. [global]
  25. # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
  26. workgroup = MYGROUP
  27. # server string is the equivalent of the NT Description field
  28. server string = Samba Server
  29. # Server role. Defines in which mode Samba will operate. Possible
  30. # values are "standalone server", "member server", "classic primary
  31. # domain controller", "classic backup domain controller", "active
  32. # directory domain controller".
  33. #
  34. # Most people will want "standalone server" or "member server".
  35. # Running as "active directory domain controller" will require first
  36. # running "samba-tool domain provision" to wipe databases and create a
  37. # new domain.
  38. server role = standalone server
  39. # This option is important for security. It allows you to restrict
  40. # connections to machines which are on your local network. The
  41. # following example restricts access to two C class networks and
  42. # the "loopback" interface. For more examples of the syntax see
  43. # the smb.conf man page
  44. ; hosts allow = 192.168.1. 192.168.2. 127.
  45. # Uncomment this if you want a guest account, you must add this to /etc/passwd
  46. # otherwise the user "nobody" is used
  47. ; guest account = pcguest
  48. # this tells Samba to use a separate log file for each machine
  49. # that connects
  50. log file = /var/log/samba/log.%m
  51. # Put a capping on the size of the log files (in Kb).
  52. max log size = 50
  53. # Specifies the Kerberos or Active Directory realm the host is part of
  54. ; realm = MY_REALM
  55. # Backend to store user information in. New installations should
  56. # use either tdbsam or ldapsam. smbpasswd is available for backwards
  57. # compatibility. tdbsam requires no further configuration.
  58. ; passdb backend = tdbsam
  59. # Using the following line enables you to customise your configuration
  60. # on a per machine basis. The %m gets replaced with the netbios name
  61. # of the machine that is connecting.
  62. # Note: Consider carefully the location in the configuration file of
  63. # this line. The included file is read at that point.
  64. ; include = /etc/samba/smb.conf.%m
  65. # Configure Samba to use multiple interfaces
  66. # If you have multiple network interfaces then you must list them
  67. # here. See the man page for details.
  68. ; interfaces = 192.168.12.2/24 192.168.13.2/24
  69. # Where to store roving profiles (only for Win95 and WinNT)
  70. # %L substitutes for this servers netbios name, %U is username
  71. # You must uncomment the [Profiles] share below
  72. ; logon path = \\%L\Profiles\%U
  73. # Windows Internet Name Serving Support Section:
  74. # WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
  75. ; wins support = yes
  76. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  77. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  78. ; wins server = w.x.y.z
  79. # WINS Proxy - Tells Samba to answer name resolution queries on
  80. # behalf of a non WINS capable client, for this to work there must be
  81. # at least one WINS Server on the network. The default is NO.
  82. ; wins proxy = yes
  83. # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
  84. # via DNS nslookups. The default is NO.
  85. dns proxy = no
  86. # These scripts are used on a domain controller or stand-alone
  87. # machine to add or delete corresponding unix accounts
  88. ; add user script = /usr/sbin/useradd %u
  89. ; add group script = /usr/sbin/groupadd %g
  90. ; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
  91. ; delete user script = /usr/sbin/userdel %u
  92. ; delete user from group script = /usr/sbin/deluser %u %g
  93. ; delete group script = /usr/sbin/groupdel %g
  94. #============================ Share Definitions ==============================
  95. [homes]
  96. comment = Home Directories
  97. browseable = no
  98. writable = yes
  99. # Un-comment the following and create the netlogon directory for Domain Logons
  100. ; [netlogon]
  101. ; comment = Network Logon Service
  102. ; path = /var/lib/samba/netlogon
  103. ; guest ok = yes
  104. ; writable = no
  105. ; share modes = no
  106. # Un-comment the following to provide a specific roving profile share
  107. # the default is to use the user's home directory
  108. ;[Profiles]
  109. ; path = /var/lib/samba/profiles
  110. ; browseable = no
  111. ; guest ok = yes
  112. # NOTE: If you have a BSD-style print system there is no need to
  113. # specifically define each individual printer
  114. [printers]
  115. comment = All Printers
  116. path = /var/spool/samba
  117. browseable = no
  118. # Set public = yes to allow user 'guest account' to print
  119. guest ok = no
  120. writable = no
  121. printable = yes
  122. # This one is useful for people to share files
  123. ;[tmp]
  124. ; comment = Temporary file space
  125. ; path = /tmp
  126. ; read only = no
  127. ; public = yes
  128. # A publicly accessible directory, but read only, except for people in
  129. # the "staff" group
  130. ;[public]
  131. ; comment = Public Stuff
  132. ; path = /home/samba
  133. ; public = yes
  134. ; writable = no
  135. ; printable = no
  136. ; write list = @staff
  137. # Other examples.
  138. #
  139. # A private printer, usable only by fred. Spool data will be placed in fred's
  140. # home directory. Note that fred must have write access to the spool directory,
  141. # wherever it is.
  142. ;[fredsprn]
  143. ; comment = Fred's Printer
  144. ; valid users = fred
  145. ; path = /homes/fred
  146. ; printer = freds_printer
  147. ; public = no
  148. ; writable = no
  149. ; printable = yes
  150. # A private directory, usable only by fred. Note that fred requires write
  151. # access to the directory.
  152. ;[fredsdir]
  153. ; comment = Fred's Service
  154. ; path = /usr/somewhere/private
  155. ; valid users = fred
  156. ; public = no
  157. ; writable = yes
  158. ; printable = no
  159. # a service which has a different directory for each machine that connects
  160. # this allows you to tailor configurations to incoming machines. You could
  161. # also use the %U option to tailor it by user name.
  162. # The %m gets replaced with the machine name that is connecting.
  163. ;[pchome]
  164. ; comment = PC Directories
  165. ; path = /usr/pc/%m
  166. ; public = no
  167. ; writable = yes
  168. # A publicly accessible directory, read/write to all users. Note that all files
  169. # created in the directory by users will be owned by the default user, so
  170. # any user with access can delete any other user's files. Obviously this
  171. # directory must be writable by the default user. Another user could of course
  172. # be specified, in which case all files would be owned by that user instead.
  173. ;[public]
  174. ; path = /usr/somewhere/else/public
  175. ; public = yes
  176. ; only guest = yes
  177. ; writable = yes
  178. ; printable = no
  179. # The following two entries demonstrate how to share a directory so that two
  180. # users can place files there that will be owned by the specific users. In this
  181. # setup, the directory should be writable by both users and should have the
  182. # sticky bit set on it to prevent abuse. Obviously this could be extended to
  183. # as many users as required.
  184. ;[myshare]
  185. ; comment = Mary's and Fred's stuff
  186. ; path = /usr/somewhere/shared
  187. ; valid users = mary fred
  188. ; public = no
  189. ; writable = yes
  190. ; printable = no
  191. ; create mask = 0765
  192.