smb.conf 7.8 KB

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