smb.conf 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. #
  2. # Sample configuration file for the Samba suite for Debian GNU/Linux.
  3. #
  4. #
  5. # This is the main Samba configuration file. You should read the
  6. # smb.conf(5) manual page in order to understand the options listed
  7. # here. Samba has a huge number of configurable options most of which
  8. # are not shown in this example
  9. #
  10. # Some options that are often worth tuning have been included as
  11. # commented-out examples in this file.
  12. # - When such options are commented with ";", the proposed setting
  13. # differs from the default Samba behaviour
  14. # - When commented with "#", the proposed setting is the default
  15. # behaviour of Samba but the option is considered important
  16. # enough to be mentioned here
  17. #
  18. # NOTE: Whenever you modify this file you should run the command
  19. # "testparm" to check that you have not made any basic syntactic
  20. # errors.
  21. #======================= Global Settings =======================
  22. [global]
  23. # ADDED BY KASPERSKY ANTI-VIRUS FOR LINUX FILE SERVER VERSION 8.0.3.297/RELEASE
  24. # vfs object = kav4fs-smb-vfs32
  25. ## Browsing/Identification ###
  26. # Change this to the workgroup/NT-domain name your Samba server will part of
  27. workgroup = DP
  28. # server string is devi the equivalent of the NT Description field
  29. server string = DP Share
  30. # Windows Internet Name Serving Support Section:
  31. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  32. # wins support = no
  33. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  34. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  35. ; wins server = w.x.y.z
  36. # This will prevent nmbd to search for NetBIOS names through DNS.
  37. dns proxy = no
  38. #### Networking ####
  39. # The specific set of interfaces / networks to bind to
  40. # This can be either the interface name or an IP address/netmask;
  41. # interface names are normally preferred
  42. ; interfaces = 127.0.0.0/8 eth0
  43. interfaces = 10.0.21.1
  44. # Only bind to the named interfaces and/or networks; you must use the
  45. # 'interfaces' option above to use this.
  46. # It is recommended that you enable this feature if your Samba machine is
  47. # not protected by a firewall or is a firewall itself. However, this
  48. # option cannot handle dynamic or non-broadcast interfaces correctly.
  49. ; bind interfaces only = yes
  50. bind interfaces only = yes
  51. #### Debugging/Accounting ####
  52. # This tells Samba to use a separate log file for each machine
  53. # that connects
  54. log file = /var/log/samba/log.%m
  55. # Cap the size of the individual log files (in KiB).
  56. max log size = 1000
  57. # If you want Samba to only log through syslog then set the following
  58. # parameter to 'yes'.
  59. # syslog only = no
  60. # We want Samba to log a minimum amount of information to syslog. Everything
  61. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  62. # through syslog you should set the following parameter to something higher.
  63. syslog = 0
  64. # Do something sensible when Samba crashes: mail the admin a backtrace
  65. panic action = /usr/share/samba/panic-action %d
  66. ####### Authentication #######
  67. # Server role. Defines in which mode Samba will operate. Possible
  68. # values are "standalone server", "member server", "classic primary
  69. # domain controller", "classic backup domain controller", "active
  70. # directory domain controller".
  71. #
  72. # Most people will want "standalone sever" or "member server".
  73. # Running as "active directory domain controller" will require first
  74. # running "samba-tool domain provision" to wipe databases and create a
  75. # new domain.
  76. server role = standalone server
  77. # If you are using encrypted passwords, Samba will need to know what
  78. # password database type you are using.
  79. passdb backend = tdbsam
  80. ; passdb backend = smbpasswd
  81. obey pam restrictions = yes
  82. # This boolean parameter controls whether Samba attempts to sync the Unix
  83. # password with the SMB password when the encrypted SMB password in the
  84. # passdb is changed.
  85. unix password sync = yes
  86. # For Unix password sync to work on a Debian GNU/Linux system, the following
  87. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  88. # sending the correct chat script for the passwd program in Debian Sarge).
  89. passwd program = /usr/bin/passwd %u
  90. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  91. # This boolean controls whether PAM will be used for password changes
  92. # when requested by an SMB client instead of the program listed in
  93. # 'passwd program'. The default is 'no'.
  94. pam password change = yes
  95. # This option controls how unsuccessful authentication attempts are mapped
  96. # to anonymous connections
  97. map to guest = bad user
  98. ########## Domains ###########
  99. #
  100. # The following settings only takes effect if 'server role = primary
  101. # classic domain controller', 'server role = backup domain controller'
  102. # or 'domain logons' is set
  103. #
  104. # It specifies the location of the user's
  105. # profile directory from the client point of view) The following
  106. # required a [profiles] share to be setup on the samba server (see
  107. # below)
  108. ; logon path = \\%N\profiles\%U
  109. # Another common choice is storing the profile in the user's home directory
  110. # (this is Samba's default)
  111. # logon path = \\%N\%U\profile
  112. # The following setting only takes effect if 'domain logons' is set
  113. # It specifies the location of a user's home directory (from the client
  114. # point of view)
  115. ; logon drive = H:
  116. # logon home = \\%N\%U
  117. # The following setting only takes effect if 'domain logons' is set
  118. # It specifies the script to run during logon. The script must be stored
  119. # in the [netlogon] share
  120. # NOTE: Must be store in 'DOS' file format convention
  121. ; logon script = logon.cmd
  122. # This allows Unix users to be created on the domain controller via the SAMR
  123. # RPC pipe. The example command creates a user account with a disabled Unix
  124. # password; please adapt to your needs
  125. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  126. # This allows machine accounts to be created on the domain controller via the
  127. # SAMR RPC pipe.
  128. # The following assumes a "machines" group exists on the system
  129. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  130. # This allows Unix groups to be created on the domain controller via the SAMR
  131. # RPC pipe.
  132. ; add group script = /usr/sbin/addgroup --force-badname %g
  133. ############ Misc ############
  134. # Using the following line enables you to customise your configuration
  135. # on a per machine basis. The %m gets replaced with the netbios name
  136. # of the machine that is connecting
  137. ; include = /home/samba/etc/smb.conf.%m
  138. # Some defaults for winbind (make sure you're not using the ranges
  139. # for something else.)
  140. ; idmap uid = 10000-20000
  141. ; idmap gid = 10000-20000
  142. ; template shell = /bin/bash
  143. # Setup usershare options to enable non-root users to share folders
  144. # with the net usershare command.
  145. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  146. ; usershare max shares = 100
  147. # Allow users who've been granted usershare privileges to create
  148. # public shares, not just authenticated ones
  149. usershare allow guests = yes
  150. #======================= Share Definitions =======================
  151. # Un-comment the following (and tweak the other settings below to suit)
  152. # to enable the default home directory shares. This will share each
  153. # user's home directory as \\server\username
  154. ;[homes]
  155. ; comment = Home Directories
  156. ; browseable = no
  157. # By default, the home directories are exported read-only. Change the
  158. # next parameter to 'no' if you want to be able to write to them.
  159. ; read only = yes
  160. # File creation mask is set to 0700 for security reasons. If you want to
  161. # create files with group=rw permissions, set next parameter to 0775.
  162. ; create mask = 0700
  163. # Directory creation mask is set to 0700 for security reasons. If you want to
  164. # create dirs. with group=rw permissions, set next parameter to 0775.
  165. ; directory mask = 0700
  166. # By default, \\server\username shares can be connected to by anyone
  167. # with access to the samba server.
  168. # Un-comment the following parameter to make sure that only "username"
  169. # can connect to \\server\username
  170. # This might need tweaking when using external authentication schemes
  171. ; valid users = %S
  172. # Un-comment the following and create the netlogon directory for Domain Logons
  173. # (you need to configure Samba to act as a domain controller too.)
  174. ;[netlogon]
  175. ; comment = Network Logon Service
  176. ; path = /home/samba/netlogon
  177. ; guest ok = yes
  178. ; read only = yes
  179. # Un-comment the following and create the profiles directory to store
  180. # users profiles (see the "logon path" option above)
  181. # (you need to configure Samba to act as a domain controller too.)
  182. # The path below should be writable by all users so that their
  183. # profile directory may be created the first time they log on
  184. ;[profiles]
  185. ; comment = Users profiles
  186. ; path = /home/samba/profiles
  187. ; guest ok = no
  188. ; browseable = no
  189. ; create mask = 0600
  190. ; directory mask = 0700
  191. #[printers]
  192. # comment = All Printers
  193. # browseable = no
  194. # path = /var/spool/samba
  195. # printable = yes
  196. # guest ok = no
  197. # read only = yes
  198. # create mask = 0700
  199. # Windows clients look for this share name as a source of downloadable
  200. # printer drivers
  201. #[print$]
  202. # comment = Printer Drivers
  203. # path = /var/lib/samba/printers
  204. # browseable = yes
  205. # read only = yes
  206. # guest ok = no
  207. [DP]
  208. comment = DP share
  209. path = /home/dp/share
  210. browseable = yes
  211. read only = no
  212. guest ok = no
  213. [DPr12]
  214. comment = DP works
  215. path = /home/dp/products
  216. browseable = yes
  217. read only = no
  218. guest ok = no
  219. [DP4TB1]
  220. comment = DP 4tb disk 1
  221. path = /home/dp/dp4tb1
  222. browseable = yes
  223. read only = no
  224. guest ok = no
  225. [DP4TB2]
  226. comment = DP 4tb disk 2
  227. path = /home/dp/dp4tb2
  228. browseable = yes
  229. read only = no
  230. guest ok = no
  231. [DP4TB3]
  232. comment = DP 4tb disk 3
  233. path = /home/dp/dp4tb3
  234. browseable = yes
  235. read only = no
  236. guest ok = no
  237. [DP4TB4]
  238. comment = DP 4tb disk 4
  239. path = /home/dp/dp4tb4
  240. browseable = yes
  241. read only = no
  242. guest ok = no
  243. # Uncomment to allow remote administration of Windows print drivers.
  244. # You may need to replace 'lpadmin' with the name of the group your
  245. # admin users are members of.
  246. # Please note that you also need to set appropriate Unix permissions
  247. # to the drivers directory for these users to have write rights in it
  248. ; write list = root, @lpadmin