smb.conf 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  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. # Virtual Storage (symlinked from disks below)
  216. [allDirs]
  217. comment = DP archive
  218. path = /home/dp/all_dirs
  219. browseable = yes
  220. read only = no
  221. guest ok = no
  222. [allIndia]
  223. comment = India archive
  224. path = /home/dp/all_india
  225. browseable = yes
  226. read only = no
  227. guest ok = no
  228. [allAll]
  229. comment = Unified archive
  230. path = /home/dp/all_all
  231. browseable = yes
  232. read only = no
  233. guest ok = no
  234. # Storage HDDs set a
  235. [a01]
  236. comment = DP archive hdd 01
  237. path = /home/dp/hdd01
  238. browseable = yes
  239. read only = no
  240. guest ok = no
  241. [a02]
  242. comment = DP archive hdd 02
  243. path = /home/dp/hdd02
  244. browseable = yes
  245. read only = no
  246. guest ok = no
  247. [a03]
  248. comment = DP archive hdd 03
  249. path = /home/dp/hdd03
  250. browseable = yes
  251. read only = no
  252. guest ok = no
  253. [a04]
  254. comment = DP archive hdd 04
  255. path = /home/dp/hdd04
  256. browseable = yes
  257. read only = no
  258. guest ok = no
  259. [a05]
  260. comment = DP archive hdd 05
  261. path = /home/dp/hdd05
  262. browseable = yes
  263. read only = no
  264. guest ok = no
  265. [a06]
  266. comment = DP archive hdd 06
  267. path = /home/dp/hdd06
  268. browseable = yes
  269. read only = no
  270. guest ok = no
  271. [a07]
  272. comment = DP archive hdd 07
  273. path = /home/dp/hdd07
  274. browseable = yes
  275. read only = no
  276. guest ok = no
  277. [a08]
  278. comment = DP archive hdd 08
  279. path = /home/dp/hdd08
  280. browseable = yes
  281. read only = no
  282. guest ok = no
  283. [a09]
  284. comment = DP archive hdd 09
  285. path = /home/dp/hdd09
  286. browseable = yes
  287. read only = no
  288. guest ok = no
  289. [a10]
  290. comment = DP archive hdd 10
  291. path = /home/dp/hdd10
  292. browseable = yes
  293. read only = no
  294. guest ok = no
  295. [a11]
  296. comment = DP archive hdd 11
  297. path = /home/dp/hdd11
  298. browseable = yes
  299. read only = no
  300. guest ok = no
  301. [a12]
  302. comment = DP archive hdd 12
  303. path = /home/dp/hdd12
  304. browseable = yes
  305. read only = no
  306. guest ok = no
  307. [a13]
  308. comment = DP archive hdd 13
  309. path = /home/dp/hdd13
  310. browseable = yes
  311. read only = no
  312. guest ok = no
  313. [a14]
  314. comment = DP archive hdd 14
  315. path = /home/dp/hdd14
  316. browseable = yes
  317. read only = no
  318. guest ok = no
  319. [a15]
  320. comment = DP archive hdd 15
  321. path = /home/dp/hdd15
  322. browseable = yes
  323. read only = no
  324. guest ok = no
  325. [a16]
  326. comment = DP archive hdd 16
  327. path = /home/dp/hdd16
  328. browseable = yes
  329. read only = no
  330. guest ok = no
  331. [a17]
  332. comment = DP archive hdd 17
  333. path = /home/dp/hdd17
  334. browseable = yes
  335. read only = no
  336. guest ok = no
  337. [a18]
  338. comment = DP archive hdd 18
  339. path = /home/dp/hdd18
  340. browseable = yes
  341. read only = no
  342. guest ok = no
  343. [a19]
  344. comment = DP archive hdd 19
  345. path = /home/dp/hdd19
  346. browseable = yes
  347. read only = no
  348. guest ok = no
  349. [a20]
  350. comment = DP archive hdd 20
  351. path = /home/dp/hdd20
  352. browseable = yes
  353. read only = no
  354. guest ok = no
  355. # Storage HDDs set b
  356. [b01]
  357. comment = DP archive hdd 21
  358. path = /home/dp/hdd21
  359. browseable = yes
  360. read only = no
  361. guest ok = no
  362. [b02]
  363. comment = DP archive hdd 22
  364. path = /home/dp/hdd22
  365. browseable = yes
  366. read only = no
  367. guest ok = no
  368. [b03]
  369. comment = DP archive hdd 23
  370. path = /home/dp/hdd23
  371. browseable = yes
  372. read only = no
  373. guest ok = no
  374. [b04]
  375. comment = DP archive hdd 24
  376. path = /home/dp/hdd24
  377. browseable = yes
  378. read only = no
  379. guest ok = no
  380. [b05]
  381. comment = DP archive hdd 25
  382. path = /home/dp/hdd25
  383. browseable = yes
  384. read only = no
  385. guest ok = no
  386. [b06]
  387. comment = DP archive hdd 26
  388. path = /home/dp/hdd26
  389. browseable = yes
  390. read only = no
  391. guest ok = no
  392. [b07]
  393. comment = DP archive hdd 27
  394. path = /home/dp/hdd27
  395. browseable = yes
  396. read only = no
  397. guest ok = no
  398. [b08]
  399. comment = DP archive hdd 28
  400. path = /home/dp/hdd28
  401. browseable = yes
  402. read only = no
  403. guest ok = no
  404. [b09]
  405. comment = DP archive hdd 29
  406. path = /home/dp/hdd29
  407. browseable = yes
  408. read only = no
  409. guest ok = no
  410. [b10]
  411. comment = DP archive hdd 30
  412. path = /home/dp/hdd30
  413. browseable = yes
  414. read only = no
  415. guest ok = no
  416. [b11]
  417. comment = DP archive hdd 31
  418. path = /home/dp/hdd31
  419. browseable = yes
  420. read only = no
  421. guest ok = no
  422. [b12]
  423. comment = DP archive hdd 32
  424. path = /home/dp/hdd32
  425. browseable = yes
  426. read only = no
  427. guest ok = no
  428. [b13]
  429. comment = DP archive hdd 33
  430. path = /home/dp/hdd33
  431. browseable = yes
  432. read only = no
  433. guest ok = no
  434. [b14]
  435. comment = DP archive hdd 34
  436. path = /home/dp/hdd34
  437. browseable = yes
  438. read only = no
  439. guest ok = no
  440. [b15]
  441. comment = DP archive hdd 35
  442. path = /home/dp/hdd35
  443. browseable = yes
  444. read only = no
  445. guest ok = no
  446. [b16]
  447. comment = DP archive hdd 36
  448. path = /home/dp/hdd36
  449. browseable = yes
  450. read only = no
  451. guest ok = no
  452. [b17]
  453. comment = DP archive hdd 37
  454. path = /home/dp/hdd37
  455. browseable = yes
  456. read only = no
  457. guest ok = no
  458. [b18]
  459. comment = DP archive hdd 38
  460. path = /home/dp/hdd38
  461. browseable = yes
  462. read only = no
  463. guest ok = no
  464. [b19]
  465. comment = DP archive hdd 39
  466. path = /home/dp/hdd39
  467. browseable = yes
  468. read only = no
  469. guest ok = no
  470. [b20]
  471. comment = DP archive hdd 40
  472. path = /home/dp/hdd40
  473. browseable = yes
  474. read only = no
  475. guest ok = no
  476. # Uncomment to allow remote administration of Windows print drivers.
  477. # You may need to replace 'lpadmin' with the name of the group your
  478. # admin users are members of.
  479. # Please note that you also need to set appropriate Unix permissions
  480. # to the drivers directory for these users to have write rights in it
  481. ; write list = root, @lpadmin