mariojuggernaut

Untitled

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