Advertisement
Guest User

Untitled

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