Advertisement
Guest User

Untitled

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