smb.conf 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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.2.160/RELEASE
  24. # vfs object = kav4fs-smb-vfs28
  25. # COMMENTED-OUT BY KASPERSKY ANTI-VIRUS FOR LINUX FILE SERVER VERSION 8.0.2.160/RELEASE
  26. # vfs object = kav4fs-smb-vfs28
  27. # flags needed to make symlinks work under windows clients
  28. getwd cache = yes
  29. follow symlinks = yes
  30. wide links = yes
  31. unix extensions = no
  32. hide dot files = yes
  33. ## Browsing/Identification ###
  34. # Change this to the workgroup/NT-domain name your Samba server will part of
  35. workgroup = DP
  36. # server string is devi the equivalent of the NT Description field
  37. server string = DP Archive
  38. # Windows Internet Name Serving Support Section:
  39. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  40. # wins support = no
  41. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  42. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  43. ; wins server = w.x.y.z
  44. # This will prevent nmbd to search for NetBIOS names through DNS.
  45. dns proxy = no
  46. #### Networking ####
  47. # The specific set of interfaces / networks to bind to
  48. # This can be either the interface name or an IP address/netmask;
  49. # interface names are normally preferred
  50. ; interfaces = 127.0.0.0/8 eth0
  51. ## anpassen? ; interfaces = 10.0.21.1
  52. # Only bind to the named interfaces and/or networks; you must use the
  53. # 'interfaces' option above to use this.
  54. # It is recommended that you enable this feature if your Samba machine is
  55. # not protected by a firewall or is a firewall itself. However, this
  56. # option cannot handle dynamic or non-broadcast interfaces correctly.
  57. ; bind interfaces only = yes
  58. bind interfaces only = yes
  59. #### Debugging/Accounting ####
  60. # This tells Samba to use a separate log file for each machine
  61. # that connects
  62. log file = /var/log/samba/log.%m
  63. # Cap the size of the individual log files (in KiB).
  64. max log size = 1000
  65. # If you want Samba to only log through syslog then set the following
  66. # parameter to 'yes'.
  67. # syslog only = no
  68. # We want Samba to log a minimum amount of information to syslog. Everything
  69. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  70. # through syslog you should set the following parameter to something higher.
  71. syslog = 0
  72. # Do something sensible when Samba crashes: mail the admin a backtrace
  73. panic action = /usr/share/samba/panic-action %d
  74. ####### Authentication #######
  75. # Server role. Defines in which mode Samba will operate. Possible
  76. # values are "standalone server", "member server", "classic primary
  77. # domain controller", "classic backup domain controller", "active
  78. # directory domain controller".
  79. #
  80. # Most people will want "standalone sever" or "member server".
  81. # Running as "active directory domain controller" will require first
  82. # running "samba-tool domain provision" to wipe databases and create a
  83. # new domain.
  84. server role = standalone server
  85. # If you are using encrypted passwords, Samba will need to know what
  86. # password database type you are using.
  87. passdb backend = tdbsam
  88. ; passdb backend = smbpasswd
  89. obey pam restrictions = yes
  90. # This boolean parameter controls whether Samba attempts to sync the Unix
  91. # password with the SMB password when the encrypted SMB password in the
  92. # passdb is changed.
  93. unix password sync = yes
  94. # For Unix password sync to work on a Debian GNU/Linux system, the following
  95. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  96. # sending the correct chat script for the passwd program in Debian Sarge).
  97. passwd program = /usr/bin/passwd %u
  98. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  99. # This boolean controls whether PAM will be used for password changes
  100. # when requested by an SMB client instead of the program listed in
  101. # 'passwd program'. The default is 'no'.
  102. pam password change = yes
  103. # This option controls how unsuccessful authentication attempts are mapped
  104. # to anonymous connections
  105. map to guest = bad user
  106. ########## Domains ###########
  107. #
  108. # The following settings only takes effect if 'server role = primary
  109. # classic domain controller', 'server role = backup domain controller'
  110. # or 'domain logons' is set
  111. #
  112. # It specifies the location of the user's
  113. # profile directory from the client point of view) The following
  114. # required a [profiles] share to be setup on the samba server (see
  115. # below)
  116. ; logon path = \\%N\profiles\%U
  117. # Another common choice is storing the profile in the user's home directory
  118. # (this is Samba's default)
  119. # logon path = \\%N\%U\profile
  120. # The following setting only takes effect if 'domain logons' is set
  121. # It specifies the location of a user's home directory (from the client
  122. # point of view)
  123. ; logon drive = H:
  124. # logon home = \\%N\%U
  125. # The following setting only takes effect if 'domain logons' is set
  126. # It specifies the script to run during logon. The script must be stored
  127. # in the [netlogon] share
  128. # NOTE: Must be store in 'DOS' file format convention
  129. ; logon script = logon.cmd
  130. # This allows Unix users to be created on the domain controller via the SAMR
  131. # RPC pipe. The example command creates a user account with a disabled Unix
  132. # password; please adapt to your needs
  133. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  134. # This allows machine accounts to be created on the domain controller via the
  135. # SAMR RPC pipe.
  136. # The following assumes a "machines" group exists on the system
  137. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  138. # This allows Unix groups to be created on the domain controller via the SAMR
  139. # RPC pipe.
  140. ; add group script = /usr/sbin/addgroup --force-badname %g
  141. ############ Misc ############
  142. # Using the following line enables you to customise your configuration
  143. # on a per machine basis. The %m gets replaced with the netbios name
  144. # of the machine that is connecting
  145. ; include = /home/samba/etc/smb.conf.%m
  146. # Some defaults for winbind (make sure you're not using the ranges
  147. # for something else.)
  148. ; idmap uid = 10000-20000
  149. ; idmap gid = 10000-20000
  150. ; template shell = /bin/bash
  151. # Setup usershare options to enable non-root users to share folders
  152. # with the net usershare command.
  153. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  154. ; usershare max shares = 100
  155. # Allow users who've been granted usershare privileges to create
  156. # public shares, not just authenticated ones
  157. usershare allow guests = yes
  158. #======================= Share Definitions =======================
  159. # Un-comment the following (and tweak the other settings below to suit)
  160. # to enable the default home directory shares. This will share each
  161. # user's home directory as \\server\username
  162. ;[homes]
  163. ; comment = Home Directories
  164. ; browseable = no
  165. # By default, the home directories are exported read-only. Change the
  166. # next parameter to 'no' if you want to be able to write to them.
  167. ; read only = yes
  168. # File creation mask is set to 0700 for security reasons. If you want to
  169. # create files with group=rw permissions, set next parameter to 0775.
  170. ; create mask = 0700
  171. # Directory creation mask is set to 0700 for security reasons. If you want to
  172. # create dirs. with group=rw permissions, set next parameter to 0775.
  173. ; directory mask = 0700
  174. # By default, \\server\username shares can be connected to by anyone
  175. # with access to the samba server.
  176. # Un-comment the following parameter to make sure that only "username"
  177. # can connect to \\server\username
  178. # This might need tweaking when using external authentication schemes
  179. ; valid users = %S
  180. # Un-comment the following and create the netlogon directory for Domain Logons
  181. # (you need to configure Samba to act as a domain controller too.)
  182. ;[netlogon]
  183. ; comment = Network Logon Service
  184. ; path = /home/samba/netlogon
  185. ; guest ok = yes
  186. ; read only = yes
  187. # Un-comment the following and create the profiles directory to store
  188. # users profiles (see the "logon path" option above)
  189. # (you need to configure Samba to act as a domain controller too.)
  190. # The path below should be writable by all users so that their
  191. # profile directory may be created the first time they log on
  192. ;[profiles]
  193. ; comment = Users profiles
  194. ; path = /home/samba/profiles
  195. ; guest ok = no
  196. ; browseable = no
  197. ; create mask = 0600
  198. ; directory mask = 0700
  199. #[printers]
  200. # comment = All Printers
  201. # browseable = no
  202. # path = /var/spool/samba
  203. # printable = yes
  204. # guest ok = no
  205. # read only = yes
  206. # create mask = 0700
  207. # Windows clients look for this share name as a source of downloadable
  208. # printer drivers
  209. #[print$]
  210. # comment = Printer Drivers
  211. # path = /var/lib/samba/printers
  212. # browseable = yes
  213. # read only = yes
  214. # guest ok = no
  215. [allDirs]
  216. comment = DP archive
  217. path = /home/dp/all_dirs
  218. browseable = yes
  219. read only = no
  220. guest ok = no
  221. [a01]
  222. comment = DP archive hdd 01
  223. path = /home/dp/hdd01
  224. browseable = yes
  225. read only = no
  226. guest ok = no
  227. [a02]
  228. comment = DP archive hdd 02
  229. path = /home/dp/hdd02
  230. browseable = yes
  231. read only = no
  232. guest ok = no
  233. [a03]
  234. comment = DP archive hdd 03
  235. path = /home/dp/hdd03
  236. browseable = yes
  237. read only = no
  238. guest ok = no
  239. [a04]
  240. comment = DP archive hdd 04
  241. path = /home/dp/hdd04
  242. browseable = yes
  243. read only = no
  244. guest ok = no
  245. [a05]
  246. comment = DP archive hdd 05
  247. path = /home/dp/hdd05
  248. browseable = yes
  249. read only = no
  250. guest ok = no
  251. [a06]
  252. comment = DP archive hdd 06
  253. path = /home/dp/hdd06
  254. browseable = yes
  255. read only = no
  256. guest ok = no
  257. [a07]
  258. comment = DP archive hdd 07
  259. path = /home/dp/hdd07
  260. browseable = yes
  261. read only = no
  262. guest ok = no
  263. [a08]
  264. comment = DP archive hdd 08
  265. path = /home/dp/hdd08
  266. browseable = yes
  267. read only = no
  268. guest ok = no
  269. [a09]
  270. comment = DP archive hdd 09
  271. path = /home/dp/hdd09
  272. browseable = yes
  273. read only = no
  274. guest ok = no
  275. [a10]
  276. comment = DP archive hdd 10
  277. path = /home/dp/hdd10
  278. browseable = yes
  279. read only = no
  280. guest ok = no
  281. [a11]
  282. comment = DP archive hdd 11
  283. path = /home/dp/hdd11
  284. browseable = yes
  285. read only = no
  286. guest ok = no
  287. [a12]
  288. comment = DP archive hdd 12
  289. path = /home/dp/hdd12
  290. browseable = yes
  291. read only = no
  292. guest ok = no
  293. [a13]
  294. comment = DP archive hdd 13
  295. path = /home/dp/hdd13
  296. browseable = yes
  297. read only = no
  298. guest ok = no
  299. [a14]
  300. comment = DP archive hdd 14
  301. path = /home/dp/hdd14
  302. browseable = yes
  303. read only = no
  304. guest ok = no
  305. [a15]
  306. comment = DP archive hdd 15
  307. path = /home/dp/hdd15
  308. browseable = yes
  309. read only = no
  310. guest ok = no
  311. [a16]
  312. comment = DP archive hdd 16
  313. path = /home/dp/hdd16
  314. browseable = yes
  315. read only = no
  316. guest ok = no
  317. [a17]
  318. comment = DP archive hdd 17
  319. path = /home/dp/hdd17
  320. browseable = yes
  321. read only = no
  322. guest ok = no
  323. [a18]
  324. comment = DP archive hdd 18
  325. path = /home/dp/hdd18
  326. browseable = yes
  327. read only = no
  328. guest ok = no
  329. [a19]
  330. comment = DP archive hdd 19
  331. path = /home/dp/hdd19
  332. browseable = yes
  333. read only = no
  334. guest ok = no
  335. [a20]
  336. comment = DP archive hdd 20
  337. path = /home/dp/hdd20
  338. browseable = yes
  339. read only = no
  340. guest ok = no
  341. [b20]
  342. comment = DP archive hdd 20
  343. path = /home/dp/backup/hdd20
  344. browseable = yes
  345. read only = yes
  346. guest ok = no
  347. # Uncomment to allow remote administration of Windows print drivers.
  348. # You may need to replace 'lpadmin' with the name of the group your
  349. # admin users are members of.
  350. # Please note that you also need to set appropriate Unix permissions
  351. # to the drivers directory for these users to have write rights in it
  352. ; write list = root, @lpadmin