Advertisement
Guest User

Untitled

a guest
Feb 28th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 15.41 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. # A well-established practice is to name the original file
  22. # "smb.conf.master" and create the "real" config file with
  23. # testparm -s smb.conf.master >smb.conf
  24. # This minimizes the size of the really used smb.conf file
  25. # which, according to the Samba Team, impacts performance
  26. # However, use this with caution if your smb.conf file contains nested
  27. # "include" statements. See Debian bug #483187 for a case
  28. # where using a master file is not a good idea.
  29. #
  30.  
  31. #======================= Global Settings =======================
  32.  
  33. [global]
  34.     log file = /var/log/samba/log.%m
  35.     load printers = no
  36.     passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  37.     obey pam restrictions = yes
  38.     socket options = TCP_NODELAY
  39. #   force directory mode = 775
  40.     force group = users
  41.     map to guest = bad user
  42.     encrypt passwords = true
  43.     passwd program = /usr/bin/passwd %u
  44.     passdb backend = tdbsam
  45.     dns proxy = no
  46.     delete readonly = yes
  47.     writeable = yes
  48.     server string = %h server (Samba, Ubuntu)
  49.     unix password sync = yes
  50.     workgroup = PIXSYS
  51. #   force create mode = 666
  52.     os level = 20
  53. #   create mode = 666
  54.     syslog = 0
  55.     panic action = /usr/share/samba/panic-action %d
  56.     usershare allow guests = yes
  57.     max log size = 5000
  58. #   directory mode = 775
  59.     pam password change = yes
  60.  
  61. ## Browsing/Identification ###
  62.  
  63. # Change this to the workgroup/NT-domain name your Samba server will part of
  64.  
  65. # server string is the equivalent of the NT Description field
  66.  
  67. # Windows Internet Name Serving Support Section:
  68. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  69. #   wins support = no
  70.  
  71. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  72. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  73. ;   wins server = w.x.y.z
  74.  
  75. # This will prevent nmbd to search for NetBIOS names through DNS.
  76.  
  77. # What naming service and in what order should we use to resolve host names
  78. # to IP addresses
  79. ;   name resolve order = lmhosts host wins bcast
  80.  
  81. #### Networking ####
  82.  
  83. # The specific set of interfaces / networks to bind to
  84. # This can be either the interface name or an IP address/netmask;
  85. # interface names are normally preferred
  86. ;   interfaces = 127.0.0.0/8 eth0
  87.  
  88. # Only bind to the named interfaces and/or networks; you must use the
  89. # 'interfaces' option above to use this.
  90. # It is recommended that you enable this feature if your Samba machine is
  91. # not protected by a firewall or is a firewall itself.  However, this
  92. # option cannot handle dynamic or non-broadcast interfaces correctly.
  93. ;   bind interfaces only = yes
  94.  
  95.  
  96.  
  97. #### Debugging/Accounting ####
  98.  
  99. # This tells Samba to use a separate log file for each machine
  100. # that connects
  101.  
  102. # Cap the size of the individual log files (in KiB).
  103.  
  104. # If you want Samba to only log through syslog then set the following
  105. # parameter to 'yes'.
  106. #   syslog only = no
  107.  
  108. # We want Samba to log a minimum amount of information to syslog. Everything
  109. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  110. # through syslog you should set the following parameter to something higher.
  111.  
  112. # Do something sensible when Samba crashes: mail the admin a backtrace
  113.  
  114.  
  115. ####### Authentication #######
  116.  
  117. # "security = user" is always a good idea. This will require a Unix account
  118. # in this server for every user accessing the server. See
  119. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  120. # in the samba-doc package for details.
  121. #   security = user
  122.  
  123. # You may wish to use password encryption.  See the section on
  124. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  125.  
  126. # If you are using encrypted passwords, Samba will need to know what
  127. # password database type you are using.  
  128.  
  129.  
  130. # This boolean parameter controls whether Samba attempts to sync the Unix
  131. # password with the SMB password when the encrypted SMB password in the
  132. # passdb is changed.
  133.  
  134. # For Unix password sync to work on a Debian GNU/Linux system, the following
  135. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  136. # sending the correct chat script for the passwd program in Debian Sarge).
  137.  
  138. # This boolean controls whether PAM will be used for password changes
  139. # when requested by an SMB client instead of the program listed in
  140. # 'passwd program'. The default is 'no'.
  141.  
  142. # This option controls how unsuccessful authentication attempts are mapped
  143. # to anonymous connections
  144.  
  145. ########## Domains ###########
  146.  
  147. # Is this machine able to authenticate users. Both PDC and BDC
  148. # must have this setting enabled. If you are the BDC you must
  149. # change the 'domain master' setting to no
  150. #
  151. ;   domain logons = yes
  152. #
  153. # The following setting only takes effect if 'domain logons' is set
  154. # It specifies the location of the user's profile directory
  155. # from the client point of view)
  156. # The following required a [profiles] share to be setup on the
  157. # samba server (see below)
  158. ;   logon path = \\%N\profiles\%U
  159. # Another common choice is storing the profile in the user's home directory
  160. # (this is Samba's default)
  161. #   logon path = \\%N\%U\profile
  162.  
  163. # The following setting only takes effect if 'domain logons' is set
  164. # It specifies the location of a user's home directory (from the client
  165. # point of view)
  166. ;   logon drive = H:
  167. #   logon home = \\%N\%U
  168.  
  169. # The following setting only takes effect if 'domain logons' is set
  170. # It specifies the script to run during logon. The script must be stored
  171. # in the [netlogon] share
  172. # NOTE: Must be store in 'DOS' file format convention
  173. ;   logon script = logon.cmd
  174.  
  175. # This allows Unix users to be created on the domain controller via the SAMR
  176. # RPC pipe.  The example command creates a user account with a disabled Unix
  177. # password; please adapt to your needs
  178. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  179.  
  180. # This allows machine accounts to be created on the domain controller via the
  181. # SAMR RPC pipe.  
  182. # The following assumes a "machines" group exists on the system
  183. ; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  184.  
  185. # This allows Unix groups to be created on the domain controller via the SAMR
  186. # RPC pipe.  
  187. ; add group script = /usr/sbin/addgroup --force-badname %g
  188.  
  189. ########## Printing ##########
  190.  
  191. # If you want to automatically load your printer list rather
  192. # than setting them up individually then you'll need this
  193. #   load printers = yes
  194.  
  195. # lpr(ng) printing. You may wish to override the location of the
  196. # printcap file
  197. ;   printing = bsd
  198. ;   printcap name = /etc/printcap
  199.  
  200. # CUPS printing.  See also the cupsaddsmb(8) manpage in the
  201. # cupsys-client package.
  202. ;   printing = cups
  203. ;   printcap name = cups
  204.  
  205. ############ Misc ############
  206.  
  207. # Using the following line enables you to customise your configuration
  208. # on a per machine basis. The %m gets replaced with the netbios name
  209. # of the machine that is connecting
  210. ;   include = /home/samba/etc/smb.conf.%m
  211.  
  212. # Most people will find that this option gives better performance.
  213. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  214. # for details
  215. # You may want to add the following on a Linux system:
  216. #         SO_RCVBUF=8192 SO_SNDBUF=8192
  217. #   socket options = TCP_NODELAY
  218.  
  219. # The following parameter is useful only if you have the linpopup package
  220. # installed. The samba maintainer and the linpopup maintainer are
  221. # working to ease installation and configuration of linpopup and samba.
  222. ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  223.  
  224. # Domain Master specifies Samba to be the Domain Master Browser. If this
  225. # machine will be configured as a BDC (a secondary logon server), you
  226. # must set this to 'no'; otherwise, the default behavior is recommended.
  227. #   domain master = auto
  228.  
  229. # Some defaults for winbind (make sure you're not using the ranges
  230. # for something else.)
  231. ;   idmap uid = 10000-20000
  232. ;   idmap gid = 10000-20000
  233. ;   template shell = /bin/bash
  234.  
  235. # The following was the default behaviour in sarge,
  236. # but samba upstream reverted the default because it might induce
  237. # performance issues in large organizations.
  238. # See Debian bug #368251 for some of the consequences of *not*
  239. # having this setting and smb.conf(5) for details.
  240. ;   winbind enum groups = yes
  241. ;   winbind enum users = yes
  242.  
  243. # Setup usershare options to enable non-root users to share folders
  244. # with the net usershare command.
  245.  
  246. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  247. ;   usershare max shares = 100
  248.  
  249. # Allow users who've been granted usershare privileges to create
  250. # public shares, not just authenticated ones
  251.  
  252. #======================= Share Definitions =======================
  253.  
  254. # Un-comment the following (and tweak the other settings below to suit)
  255. # to enable the default home directory shares.  This will share each
  256. # user's home directory as \\server\username
  257. ;[homes]
  258. ;   comment = Home Directories
  259. ;   browseable = no
  260.  
  261. # By default, the home directories are exported read-only. Change the
  262. # next parameter to 'no' if you want to be able to write to them.
  263. ;   read only = yes
  264.  
  265. # File creation mask is set to 0700 for security reasons. If you want to
  266. # create files with group=rw permissions, set next parameter to 0775.
  267. ;   create mask = 0700
  268.  
  269. # Directory creation mask is set to 0700 for security reasons. If you want to
  270. # create dirs. with group=rw permissions, set next parameter to 0775.
  271. ;   directory mask = 0700
  272.  
  273. # By default, \\server\username shares can be connected to by anyone
  274. # with access to the samba server.  Un-comment the following parameter
  275. # to make sure that only "username" can connect to \\server\username
  276. # This might need tweaking when using external authentication schemes
  277. ;   valid users = %S
  278.  
  279. # Un-comment the following and create the netlogon directory for Domain Logons
  280. # (you need to configure Samba to act as a domain controller too.)
  281. ;[netlogon]
  282. ;   comment = Network Logon Service
  283. ;   path = /home/samba/netlogon
  284. ;   guest ok = yes
  285. ;   read only = yes
  286. ;   share modes = no
  287.  
  288. # Un-comment the following and create the profiles directory to store
  289. # users profiles (see the "logon path" option above)
  290. # (you need to configure Samba to act as a domain controller too.)
  291. # The path below should be writable by all users so that their
  292. # profile directory may be created the first time they log on
  293. ;[profiles]
  294. ;   comment = Users profiles
  295. ;   path = /home/samba/profiles
  296. ;   guest ok = no
  297. ;   browseable = no
  298. ;   create mask = 0600
  299. ;   directory mask = 0700
  300.  
  301. [printers]
  302.     browseable = no
  303.     printable = yes
  304.     writable = no
  305.     path = /var/spool/samba
  306.     guest ok = no
  307.     create mask = 0700
  308.     comment = All Printers
  309.     available = no
  310.  
  311. # Windows clients look for this share name as a source of downloadable
  312. # printer drivers
  313.  
  314. [servecad]
  315.     writeable = yes
  316.     path = /Server/servecad
  317.     force directory mode = 777
  318.     force create mode = 777
  319.     comment = Servecad file share
  320.     create mode = 777
  321.     public = yes
  322.     directory mode = 777
  323.     create mask = 0777
  324.  
  325. [homes]
  326.     comment = Area Backup Utente
  327.     writeable = yes
  328.     force directory mode = 770
  329.     directory mode = 770
  330.     force group = smbadmin
  331.  
  332. [cadstar]
  333.     comment = Cadstar File
  334.     valid users = @user_ufficio_tecnico,@user_seritron,@user_amministratori
  335.     path = /Server/cadstar
  336.     force group = ut
  337.  
  338. [nt-srv]
  339.     comment = Contabilita
  340.     valid users = @user_amministratori
  341.     path = /Server/Nt-srv
  342.     write list = @user_amministratori
  343.     force group = user_amministratori
  344.  
  345. [ce60_projet]
  346.     comment = CE60_PROJET
  347.     valid users = lab1,lb1,@user_ufficio_tecnico,@user_amministratori,@user_laboratorio
  348.     path = /Server/CE60_PROJET
  349.     force directory mode = 770
  350.     directory mode = 770
  351.     force group = ut
  352.  
  353. [vb6_projet]
  354.     writeable = yes
  355.     path = /Server/VB6_PROJET
  356.     force directory mode = 770
  357.     force group = ut
  358.     directory mode = 770
  359.  
  360. [software]
  361.     locking = no
  362.     path = /Server/Software
  363.     force directory mode = 777
  364.     force create mode = 777
  365.     valid users = @ufficiotecnico,@users,@ut,@subversion,@smbadmin,@sambashare,@user_ufficio_tecnico,@user_ufficio_commerciale,@user_ufficio_acquisti,@user_seritron,@user_laboratorio,@user_amministratori
  366.     public = yes
  367.     create mode = 777
  368.     directory mode = 777
  369.  
  370. [mca02]
  371.     path = /Server/mca02
  372.     force directory mode = 755
  373.     directory mode = 755
  374.     force group = smbadmin
  375.  
  376. [mca001]
  377.     path = /Server/mca001
  378.     force directory mode = 755
  379.     directory mode = 755
  380.     force group = smbadmin
  381.  
  382. [River7]
  383.     comment = River7 File
  384.     valid users = @user_ufficio_tecnico,@user_amministratori
  385.     path = /Server/River7
  386.     force directory mode = 770
  387.     directory mode = 770
  388.  
  389. [Seritron]
  390.     comment = Seritron file
  391.     valid users = @user_seritron,@user_amministratori
  392.     user = @user_seritron,@user_amministratori
  393.     write list = @user_seritron,@user_amministratori
  394.     path = /Server/Seritron
  395.  
  396. [Backup-AOI_Bank]
  397.     comment = AOI_Bank backup drive
  398.     valid users = @user_amministratori,@user_seritron
  399.     path = /Server/Backup-AOI_Bank
  400.  
  401. [ServerTotale]
  402.     force create mode = 666
  403.     force user = root
  404.     comment = Provvisiorio per sincronizzazione
  405.     valid users = @user_amministratori
  406.     create mode = 666
  407.     path = /Server
  408.     force group = smbadmin
  409.  
  410. [Contabilita]
  411.     write list = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  412.     path = /Server/Contabilita
  413.     force directory mode = 770
  414.     comment = Documenti contabilità
  415.     valid users = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  416.     user = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  417.     directory mode = 770
  418.  
  419. [DocumentiContabili]
  420.     write list = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  421.     path = /Server/DocumentiContabili
  422.     force directory mode = 770
  423.     comment = Documenti Contabili
  424.     valid users = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  425.     user = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  426.     directory mode = 770
  427.  
  428. [UT6-MassimoM]
  429.     comment = PC205-UT6 - Vecchio PC Massimo Mattiazzo
  430.     path = /Server/ut6-MassimoM
  431.  
  432. [DatiAnagrafici]
  433.     comment = DatiAnagrafici
  434.     valid users = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  435.     user = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  436.     path = /Server/DatiAnagrafici
  437.     write list = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  438.     force group = contabilita
  439.  
  440. [CertificazioniFornitori]
  441.     valid users = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  442.     user = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  443.     path = /Server/CertificazioniFornitori
  444.     write list = @user_ufficio_acquisti,@user_ufficio_commerciale,@user_amministratori
  445.     force group = contabilita
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement