Advertisement
Guest User

configurazione samba

a guest
Feb 21st, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.54 KB | None | 0 0
  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.  
  22. #======================= Global Settings =======================
  23.  
  24. [global]
  25.  
  26. ## Browsing/Identification ###
  27.  
  28. # Change this to the workgroup/NT-domain name your Samba server will part of
  29. workgroup = WORKGROUP Lab-28
  30.  
  31. # aggiungo nome netbios per windows il 22-9-2016
  32. netbios name = PITENTINUX
  33.  
  34. # server string is the equivalent of the NT Description field
  35. server string = %h server (Samba, PITENTINUX)
  36.  
  37. # Windows Internet Name Serving Support Section:
  38. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  39. # wins support = no
  40.  
  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.  
  45. # This will prevent nmbd to search for NetBIOS names through DNS.
  46. dns proxy = no
  47.  
  48. # AGGIUNGO AUTENTICAZIONE
  49. security = user
  50. # fine aggiunta
  51.  
  52. #### Networking ####
  53.  
  54. # The specific set of interfaces / networks to bind to
  55. # This can be either the interface name or an IP address/netmask;
  56. # interface names are normally preferred
  57. ; interfaces = 127.0.0.0/8 eth0
  58.  
  59. # Only bind to the named interfaces and/or networks; you must use the
  60. # 'interfaces' option above to use this.
  61. # It is recommended that you enable this feature if your Samba machine is
  62. # not protected by a firewall or is a firewall itself. However, this
  63. # option cannot handle dynamic or non-broadcast interfaces correctly.
  64. ; bind interfaces only = yes
  65.  
  66.  
  67.  
  68. #### Debugging/Accounting ####
  69.  
  70. # This tells Samba to use a separate log file for each machine
  71. # that connects
  72. log file = /var/log/samba/log.%m
  73.  
  74. # Cap the size of the individual log files (in KiB).
  75. max log size = 1000
  76.  
  77. # If you want Samba to only log through syslog then set the following
  78. # parameter to 'yes'.
  79. # syslog only = no
  80.  
  81. # We want Samba to log a minimum amount of information to syslog. Everything
  82. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  83. # through syslog you should set the following parameter to something higher.
  84. syslog = 0
  85.  
  86. # Do something sensible when Samba crashes: mail the admin a backtrace
  87. panic action = /usr/share/samba/panic-action %d
  88.  
  89.  
  90. ####### Authentication #######
  91.  
  92. # Server role. Defines in which mode Samba will operate. Possible
  93. # values are "standalone server", "member server", "classic primary
  94. # domain controller", "classic backup domain controller", "active
  95. # directory domain controller".
  96. #
  97. # Most people will want "standalone sever" or "member server".
  98. # Running as "active directory domain controller" will require first
  99. # running "samba-tool domain provision" to wipe databases and create a
  100. # new domain.
  101. server role = standalone server
  102.  
  103. # If you are using encrypted passwords, Samba will need to know what
  104. # password database type you are using.
  105. passdb backend = tdbsam
  106.  
  107. obey pam restrictions = yes
  108.  
  109. # This boolean parameter controls whether Samba attempts to sync the Unix
  110. # password with the SMB password when the encrypted SMB password in the
  111. # passdb is changed.
  112. unix password sync = yes
  113.  
  114. # For Unix password sync to work on a Debian GNU/Linux system, the following
  115. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  116. # sending the correct chat script for the passwd program in Debian Sarge).
  117. passwd program = /usr/bin/passwd %u
  118. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  119.  
  120. # This boolean controls whether PAM will be used for password changes
  121. # when requested by an SMB client instead of the program listed in
  122. # 'passwd program'. The default is 'no'.
  123. pam password change = yes
  124.  
  125. # This option controls how unsuccessful authentication attempts are mapped
  126. # to anonymous connections
  127. map to guest = bad user
  128.  
  129. ########## Domains ###########
  130.  
  131. #
  132. # The following settings only takes effect if 'server role = primary
  133. # classic domain controller', 'server role = backup domain controller'
  134. # or 'domain logons' is set
  135. #
  136.  
  137. # It specifies the location of the user's
  138. # profile directory from the client point of view) The following
  139. # required a [profiles] share to be setup on the samba server (see
  140. # below)
  141. ; logon path = \\%N\profiles\%U
  142. # Another common choice is storing the profile in the user's home directory
  143. # (this is Samba's default)
  144. # logon path = \\%N\%U\profile
  145.  
  146. # The following setting only takes effect if 'domain logons' is set
  147. # It specifies the location of a user's home directory (from the client
  148. # point of view)
  149. ; logon drive = H:
  150. # logon home = \\%N\%U
  151.  
  152. # The following setting only takes effect if 'domain logons' is set
  153. # It specifies the script to run during logon. The script must be stored
  154. # in the [netlogon] share
  155. # NOTE: Must be store in 'DOS' file format convention
  156. ; logon script = logon.cmd
  157.  
  158. # This allows Unix users to be created on the domain controller via the SAMR
  159. # RPC pipe. The example command creates a user account with a disabled Unix
  160. # password; please adapt to your needs
  161. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  162.  
  163. # This allows machine accounts to be created on the domain controller via the
  164. # SAMR RPC pipe.
  165. # The following assumes a "machines" group exists on the system
  166. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  167.  
  168. # This allows Unix groups to be created on the domain controller via the SAMR
  169. # RPC pipe.
  170. ; add group script = /usr/sbin/addgroup --force-badname %g
  171.  
  172. ############ Misc ############
  173.  
  174. # Using the following line enables you to customise your configuration
  175. # on a per machine basis. The %m gets replaced with the netbios name
  176. # of the machine that is connecting
  177. ; include = /home/samba/etc/smb.conf.%m
  178.  
  179. # Some defaults for winbind (make sure you're not using the ranges
  180. # for something else.)
  181. ; idmap uid = 10000-20000
  182. ; idmap gid = 10000-20000
  183. ; template shell = /bin/bash
  184.  
  185. # Setup usershare options to enable non-root users to share folders
  186. # with the net usershare command.
  187.  
  188. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  189. ; usershare max shares = 100
  190.  
  191. # Allow users who've been granted usershare privileges to create
  192. # public shares, not just authenticated ones
  193. usershare allow guests = yes
  194.  
  195. #======================= Share Definitions =======================
  196.  
  197. # Un-comment the following (and tweak the other settings below to suit)
  198. # to enable the default home directory shares. This will share each
  199. # user's home directory as \\server\username
  200. ;[homes]
  201. ; comment = Home Directories
  202. ; browseable = no
  203.  
  204. # By default, the home directories are exported read-only. Change the
  205. # next parameter to 'no' if you want to be able to write to them.
  206. ; read only = yes
  207.  
  208. # File creation mask is set to 0700 for security reasons. If you want to
  209. # create files with group=rw permissions, set next parameter to 0775.
  210. ; create mask = 0700
  211.  
  212. # Directory creation mask is set to 0700 for security reasons. If you want to
  213. # create dirs. with group=rw permissions, set next parameter to 0775.
  214. ; directory mask = 0700
  215.  
  216. # By default, \\server\username shares can be connected to by anyone
  217. # with access to the samba server.
  218. # Un-comment the following parameter to make sure that only "username"
  219. # can connect to \\server\username
  220. # This might need tweaking when using external authentication schemes
  221. ; valid users = %S
  222.  
  223. # Un-comment the following and create the netlogon directory for Domain Logons
  224. # (you need to configure Samba to act as a domain controller too.)
  225. ;[netlogon]
  226. ; comment = Network Logon Service
  227. ; path = /home/samba/netlogon
  228. ; guest ok = yes
  229. ; read only = yes
  230.  
  231. # Un-comment the following and create the profiles directory to store
  232. # users profiles (see the "logon path" option above)
  233. # (you need to configure Samba to act as a domain controller too.)
  234. # The path below should be writable by all users so that their
  235. # profile directory may be created the first time they log on
  236. ;[profiles]
  237. ; comment = Users profiles
  238. ; path = /home/samba/profiles
  239. ; guest ok = no
  240. ; browseable = no
  241. ; create mask = 0600
  242. ; directory mask = 0700
  243.  
  244. [printers]
  245. comment = All Printers
  246. browseable = no
  247. path = /var/spool/samba
  248. printable = yes
  249. guest ok = no
  250. read only = yes
  251. create mask = 0700
  252.  
  253. # Windows clients look for this share name as a source of downloadable
  254. # printer drivers
  255. [print$]
  256. comment = Printer Drivers
  257. path = /var/lib/samba/printers
  258. browseable = yes
  259. read only = yes
  260. guest ok = no
  261. # Uncomment to allow remote administration of Windows print drivers.
  262. # You may need to replace 'lpadmin' with the name of the group your
  263. # admin users are members of.
  264. # Please note that you also need to set appropriate Unix permissions
  265. # to the drivers directory for these users to have write rights in it
  266. ; write list = root, @lpadmin
  267.  
  268. [Pubblica]
  269. comment = Area Pubblica
  270. # path = /u/share
  271. path = /media/dati/PUBBLICA
  272. browseable = yes
  273. writeable = yes
  274. read only = no
  275. public = yes
  276. guest ok = yes
  277. force user = nobody
  278. force group = nogroup
  279. force create mode = 0777
  280. force directory mode = 0777
  281. # create mask = 0777
  282. oplocks = no
  283. hide special files = yes
  284. hide files = /lost+found/
  285.  
  286. [Utility]
  287. comment = Area utility
  288. path = /media/dati/Utility
  289. valid users = usamba 5b 5c 4b 4c 3tur 3afm 3rim 3sia
  290. browseable = yes
  291. writeable = yes
  292. read only = no
  293. public = yes
  294. guest ok = yes
  295. # force user = nobody
  296. # force group = nogroup
  297. force create mode = 0754
  298. force directory mode = 0754
  299. #create mask = 755
  300. oplocks = no
  301. hide special files = yes
  302. hide files = /lost+found/
  303.  
  304. [Didattica]
  305. comment = Area Pubblica
  306. path = /media/dati/Didattica
  307. browseable = yes
  308. writeable = yes
  309. read only = no
  310. public = yes
  311. guest ok = yes
  312. force user = nobody
  313. force group = nogroup
  314. force create mode = 0777
  315. force directory mode = 0777
  316. # create mask = 0777
  317. oplocks = no
  318. hide special files = yes
  319. hide files = /lost+found/
  320.  
  321. ### Configuro il cestino di rete
  322. # vfs object = recycle
  323. # recycle:repository = /u/share/.cestino
  324. # recycle:repository = /media/dati/Didattica/.cestino
  325. # recycle:keeptree = Yes
  326. # recycle:touch = Yes
  327. # recycle:versions = Yes
  328. # recycle:maxsize = 500000000
  329. # recycle:exclude = *.tmp *.bak ~$*
  330. # recycle:exclude_dir = /tmp /temp /cache
  331. # recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  332. # recycle:directory_mode = 0777
  333. # recycle:subdir_mode = 0777
  334.  
  335. [5b]
  336. comment = Classe 5-B
  337. path = /media/dati/5b
  338. valid users = 5b usamba
  339. browseable = yes
  340. writeable = yes
  341. read only = no
  342. public = yes
  343. guest ok = yes
  344. force user = 5b
  345. force group = usamba
  346. force create mode = 0775
  347. force directory mode = 0775
  348. #create mask = 0775
  349. oplocks = no
  350. hide special files = yes
  351. hide files = /lost+found/
  352. # configuro il cestino
  353. vfs object = recycle
  354. recycle:repository = /media/dati/5b/.cestino
  355. recycle:touch = Yes
  356. recycle:exclude = *.tmp *.bak ~$*
  357. recycle:exclude_dir = /tmp /temp /cache
  358. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  359. recycle:directory_mode = 0774
  360. recycle:subdir_mode = 0774
  361.  
  362. [5c]
  363. comment = Classe 5-C
  364. path = /media/dati/5c
  365. valid users = 5c usamba
  366. browseable = yes
  367. writeable = yes
  368. read only = no
  369. public = yes
  370. guest ok = yes
  371. force user = 5c
  372. force group = usamba
  373. force create mode = 0775
  374. force directory mode = 0775
  375. #create mask = 0775
  376. oplocks = no
  377. hide special files = yes
  378. hide files = /lost+found/
  379. # configuro il cestino
  380. vfs object = recycle
  381. recycle:repository = /media/dati/5c/.cestino
  382. recycle:touch = Yes
  383. recycle:exclude = *.tmp *.bak ~$* ~* .*
  384. #recycle:exclude = *.tmp *.bak ~$*
  385. recycle:exclude_dir = /tmp /temp /cache
  386. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  387. recycle:directory_mode = 0774
  388. recycle:subdir_mode = 0774
  389.  
  390. [4b]
  391. comment = Classe 4-B
  392. path = /media/dati/4b
  393. valid users = 4b usamba
  394. browseable = yes
  395. writeable = yes
  396. read only = no
  397. public = yes
  398. guest ok = yes
  399. force user = 4b
  400. force group = usamba
  401. force create mode = 0775
  402. force directory mode = 0775
  403. # create mask = 0775
  404. oplocks = no
  405. hide special files = yes
  406. hide files = /lost+found/
  407. # configuro il cestino
  408. vfs object = recycle
  409. recycle:repository = /media/dati/4b/.cestino
  410. recycle:touch = Yes
  411. recycle:exclude = *.tmp *.bak ~$* ~* .*
  412. #recycle:exclude = *.tmp *.bak ~$*
  413. recycle:exclude_dir = /tmp /temp /cache
  414. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  415. recycle:directory_mode = 0774
  416. recycle:subdir_mode = 0774
  417.  
  418. [4c]
  419. comment = Classe 4-C
  420. path = /media/dati/4c
  421. valid users = 4c usamba
  422. browseable = yes
  423. writeable = yes
  424. read only = no
  425. public = yes
  426. guest ok = yes
  427. force user = 4c
  428. force group = usamba
  429. force create mode = 0775
  430. force directory mode = 0775
  431. # create mask = 0775
  432. oplocks = no
  433. hide special files = yes
  434. hide files = /lost+found/
  435. # configuro il cestino
  436. vfs object = recycle
  437. recycle:repository = /media/dati/4c/.cestino
  438. recycle:touch = Yes
  439. recycle:exclude = *.tmp *.bak ~$* ~* .*
  440. #recycle:exclude = *.tmp *.bak ~$*
  441. recycle:exclude_dir = /tmp /temp /cache
  442. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  443. recycle:directory_mode = 0774
  444. recycle:subdir_mode = 0774
  445.  
  446. [3tur]
  447. comment = Classe 3-TUR
  448. path = /media/dati/3tur
  449. valid users = 3tur usamba
  450. browseable = yes
  451. writeable = yes
  452. read only = no
  453. public = yes
  454. guest ok = yes
  455. force user = 3tur
  456. force group = usamba
  457. force create mode = 0775
  458. force directory mode = 0775
  459. # create mask = 0775
  460. oplocks = no
  461. hide special files = yes
  462. hide files = /lost+found/
  463. # configuro il cestino
  464. vfs object = recycle
  465. recycle:repository = /media/dati/3tur/.cestino
  466. recycle:touch = Yes
  467. recycle:exclude = *.tmp *.bak ~$* ~* .*
  468. #recycle:exclude = *.tmp *.bak ~$*
  469. recycle:exclude_dir = /tmp /temp /cache
  470. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  471. recycle:directory_mode = 0774
  472. recycle:subdir_mode = 0774
  473.  
  474. [3afm]
  475. comment = Classe 3-AFM
  476. path = /media/dati/3afm
  477. valid users = 3afm usamba
  478. browseable = yes
  479. writeable = yes
  480. read only = no
  481. public = yes
  482. guest ok = yes
  483. force user = 3afm
  484. force group = usamba
  485. force create mode = 0775
  486. force directory mode = 0775
  487. # create mask = 0775
  488. oplocks = no
  489. hide special files = yes
  490. hide files = /lost+found/
  491. # configuro il cestino
  492. vfs object = recycle
  493. recycle:repository = /media/dati/3afm/.cestino
  494. recycle:touch = Yes
  495. recycle:exclude = *.tmp *.bak ~$* ~* .*
  496. #recycle:exclude = *.tmp *.bak ~$*
  497. recycle:exclude_dir = /tmp /temp /cache
  498. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  499. recycle:directory_mode = 0774
  500. recycle:subdir_mode = 0774
  501.  
  502. [3rim]
  503. comment = Classe 3-RIM
  504. path = /media/dati/3rim
  505. valid users = 3rim usamba
  506. browseable = yes
  507. writeable = yes
  508. read only = no
  509. public = yes
  510. guest ok = yes
  511. force user = 3rim
  512. force group = usamba
  513. force create mode = 0775
  514. force directory mode = 0775
  515. # create mask = 0775
  516. oplocks = no
  517. hide special files = yes
  518. hide files = /lost+found/
  519. # configuro il cestino
  520. vfs object = recycle
  521. recycle:repository = /media/dati/3rim/.cestino
  522. recycle:touch = Yes
  523. recycle:exclude = *.tmp *.bak ~$* ~* .*
  524. #recycle:exclude = *.tmp *.bak ~$*
  525. recycle:exclude_dir = /tmp /temp /cache
  526. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  527. recycle:directory_mode = 0774
  528. recycle:subdir_mode = 0774
  529.  
  530. [3sia]
  531. comment = Classe 3-SIA
  532. path = /media/dati/3sia
  533. valid users = 3sia usamba
  534. browseable = yes
  535. writeable = yes
  536. read only = no
  537. public = yes
  538. guest ok = yes
  539. force user = 3sia
  540. force group = usamba
  541. force create mode = 0775
  542. force directory mode = 0775
  543. # create mask = 0775
  544. oplocks = no
  545. hide special files = yes
  546. hide files = /lost+found/
  547. # configuro il cestino
  548. vfs object = recycle
  549. recycle:repository = /media/dati/3sia/.cestino
  550. recycle:touch = Yes
  551. recycle:exclude = *.tmp *.bak ~$* ~* .*
  552. #recycle:exclude = *.tmp *.bak ~$*
  553. recycle:exclude_dir = /tmp /temp /cache
  554. recycle:noversions = *.doc *.docs *.xls *xlsx *.ppt *pptx
  555. recycle:directory_mode = 0774
  556. recycle:subdir_mode = 0774
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement