PageRenderTime 52ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/samba/smb.conf

https://gitlab.com/gescuder/docker
Config | 328 lines | 292 code | 36 blank | 0 comment | 0 complexity | f2fe1a75bba7b19bd1f71dde0dab0453 MD5 | raw file
  1. # This is the main Samba configuration file. For detailed information about the
  2. # options listed here, refer to the smb.conf(5) manual page. Samba has a huge
  3. # number of configurable options, most of which are not shown in this example.
  4. #
  5. # The Official Samba 3.2.x HOWTO and Reference Guide contains step-by-step
  6. # guides for installing, configuring, and using Samba:
  7. # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
  8. #
  9. # The Samba-3 by Example guide has working examples for smb.conf. This guide is
  10. # generated daily: http://www.samba.org/samba/docs/Samba-Guide.pdf
  11. #
  12. # In this file, lines starting with a semicolon (;) or a hash (#) are
  13. # comments and are ignored. This file uses hashes to denote commentary and
  14. # semicolons for parts of the file you may wish to configure.
  15. #
  16. # Note: Run the "testparm" command after modifying this file to check for basic
  17. # syntax errors.
  18. #
  19. #---------------
  20. # Security-Enhanced Linux (SELinux) Notes:
  21. #
  22. # Turn the samba_domain_controller Boolean on to allow Samba to use the useradd
  23. # and groupadd family of binaries. Run the following command as the root user to
  24. # turn this Boolean on:
  25. # setsebool -P samba_domain_controller on
  26. #
  27. # Turn the samba_enable_home_dirs Boolean on if you want to share home
  28. # directories via Samba. Run the following command as the root user to turn this
  29. # Boolean on:
  30. # setsebool -P samba_enable_home_dirs on
  31. #
  32. # If you create a new directory, such as a new top-level directory, label it
  33. # with samba_share_t so that SELinux allows Samba to read and write to it. Do
  34. # not label system directories, such as /etc/ and /home/, with samba_share_t, as
  35. # such directories should already have an SELinux label.
  36. #
  37. # Run the "ls -ldZ /path/to/directory" command to view the current SELinux
  38. # label for a given directory.
  39. #
  40. # Set SELinux labels only on files and directories you have created. Use the
  41. # chcon command to temporarily change a label:
  42. # chcon -t samba_share_t /path/to/directory
  43. #
  44. # Changes made via chcon are lost when the file system is relabeled or commands
  45. # such as restorecon are run.
  46. #
  47. # Use the samba_export_all_ro or samba_export_all_rw Boolean to share system
  48. # directories. To share such directories and only allow read-only permissions:
  49. # setsebool -P samba_export_all_ro on
  50. # To share such directories and allow read and write permissions:
  51. # setsebool -P samba_export_all_rw on
  52. #
  53. # To run scripts (preexec/root prexec/print command/...), copy them to the
  54. # /var/lib/samba/scripts/ directory so that SELinux will allow smbd to run them.
  55. # Note that if you move the scripts to /var/lib/samba/scripts/, they retain
  56. # their existing SELinux labels, which may be labels that SELinux does not allow
  57. # smbd to run. Copying the scripts will result in the correct SELinux labels.
  58. # Run the "restorecon -R -v /var/lib/samba/scripts" command as the root user to
  59. # apply the correct SELinux labels to these files.
  60. #
  61. #--------------
  62. #
  63. #======================= Global Settings =====================================
  64. [global]
  65. # ----------------------- Network-Related Options -------------------------
  66. #
  67. # workgroup = the Windows NT domain name or workgroup name, for example, MYGROUP.
  68. #
  69. # server string = the equivalent of the Windows NT Description field.
  70. #
  71. # netbios name = used to specify a server name that is not tied to the hostname.
  72. #
  73. # interfaces = used to configure Samba to listen on multiple network interfaces.
  74. # If you have multiple interfaces, you can use the "interfaces =" option to
  75. # configure which of those interfaces Samba listens on. Never omit the localhost
  76. # interface (lo).
  77. #
  78. # hosts allow = the hosts allowed to connect. This option can also be used on a
  79. # per-share basis.
  80. #
  81. # hosts deny = the hosts not allowed to connect. This option can also be used on
  82. # a per-share basis.
  83. #
  84. # max protocol = used to define the supported protocol. The default is NT1. You
  85. # can set it to SMB2 if you want experimental SMB2 support.
  86. #
  87. workgroup = MYGROUP
  88. server string = Samba Server Version %v
  89. ; netbios name = MYSERVER
  90. ; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
  91. ; hosts allow = 127. 192.168.12. 192.168.13.
  92. ; max protocol = SMB2
  93. # --------------------------- Logging Options -----------------------------
  94. #
  95. # log file = specify where log files are written to and how they are split.
  96. #
  97. # max log size = specify the maximum size log files are allowed to reach. Log
  98. # files are rotated when they reach the size specified with "max log size".
  99. #
  100. # log files split per-machine:
  101. log file = /var/log/samba/log.%m
  102. # maximum size of 50KB per log file, then rotate:
  103. max log size = 50
  104. # ----------------------- Standalone Server Options ------------------------
  105. #
  106. # security = the mode Samba runs in. This can be set to user, share
  107. # (deprecated), or server (deprecated).
  108. #
  109. # passdb backend = the backend used to store user information in. New
  110. # installations should use either tdbsam or ldapsam. No additional configuration
  111. # is required for tdbsam. The "smbpasswd" utility is available for backwards
  112. # compatibility.
  113. #
  114. security = user
  115. passdb backend = tdbsam
  116. # ----------------------- Domain Members Options ------------------------
  117. #
  118. # security = must be set to domain or ads.
  119. #
  120. # passdb backend = the backend used to store user information in. New
  121. # installations should use either tdbsam or ldapsam. No additional configuration
  122. # is required for tdbsam. The "smbpasswd" utility is available for backwards
  123. # compatibility.
  124. #
  125. # realm = only use the realm option when the "security = ads" option is set.
  126. # The realm option specifies the Active Directory realm the host is a part of.
  127. #
  128. # password server = only use this option when the "security = server"
  129. # option is set, or if you cannot use DNS to locate a Domain Controller. The
  130. # argument list can include My_PDC_Name, [My_BDC_Name], and [My_Next_BDC_Name]:
  131. #
  132. # password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
  133. #
  134. # Use "password server = *" to automatically locate Domain Controllers.
  135. ; security = domain
  136. ; passdb backend = tdbsam
  137. ; realm = MY_REALM
  138. ; password server = <NT-Server-Name>
  139. # ----------------------- Domain Controller Options ------------------------
  140. #
  141. # security = must be set to user for domain controllers.
  142. #
  143. # passdb backend = the backend used to store user information in. New
  144. # installations should use either tdbsam or ldapsam. No additional configuration
  145. # is required for tdbsam. The "smbpasswd" utility is available for backwards
  146. # compatibility.
  147. #
  148. # domain master = specifies Samba to be the Domain Master Browser, allowing
  149. # Samba to collate browse lists between subnets. Do not use the "domain master"
  150. # option if you already have a Windows NT domain controller performing this task.
  151. #
  152. # domain logons = allows Samba to provide a network logon service for Windows
  153. # workstations.
  154. #
  155. # logon script = specifies a script to run at login time on the client. These
  156. # scripts must be provided in a share named NETLOGON.
  157. #
  158. # logon path = specifies (with a UNC path) where user profiles are stored.
  159. #
  160. #
  161. ; security = user
  162. ; passdb backend = tdbsam
  163. ; domain master = yes
  164. ; domain logons = yes
  165. # the following login script name is determined by the machine name
  166. # (%m):
  167. ; logon script = %m.bat
  168. # the following login script name is determined by the UNIX user used:
  169. ; logon script = %u.bat
  170. ; logon path = \\%L\Profiles\%u
  171. # use an empty path to disable profile support:
  172. ; logon path =
  173. # various scripts can be used on a domain controller or a stand-alone
  174. # machine to add or delete corresponding UNIX accounts:
  175. ; add user script = /usr/sbin/useradd "%u" -n -g users
  176. ; add group script = /usr/sbin/groupadd "%g"
  177. ; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
  178. ; delete user script = /usr/sbin/userdel "%u"
  179. ; delete user from group script = /usr/sbin/userdel "%u" "%g"
  180. ; delete group script = /usr/sbin/groupdel "%g"
  181. # ----------------------- Browser Control Options ----------------------------
  182. #
  183. # local master = when set to no, Samba does not become the master browser on
  184. # your network. When set to yes, normal election rules apply.
  185. #
  186. # os level = determines the precedence the server has in master browser
  187. # elections. The default value should be reasonable.
  188. #
  189. # preferred master = when set to yes, Samba forces a local browser election at
  190. # start up (and gives itself a slightly higher chance of winning the election).
  191. #
  192. ; local master = no
  193. ; os level = 33
  194. ; preferred master = yes
  195. #----------------------------- Name Resolution -------------------------------
  196. #
  197. # This section details the support for the Windows Internet Name Service (WINS).
  198. #
  199. # Note: Samba can be either a WINS server or a WINS client, but not both.
  200. #
  201. # wins support = when set to yes, the NMBD component of Samba enables its WINS
  202. # server.
  203. #
  204. # wins server = tells the NMBD component of Samba to be a WINS client.
  205. #
  206. # wins proxy = when set to yes, Samba answers name resolution queries on behalf
  207. # of a non WINS capable client. For this to work, there must be at least one
  208. # WINS server on the network. The default is no.
  209. #
  210. # dns proxy = when set to yes, Samba attempts to resolve NetBIOS names via DNS
  211. # nslookups.
  212. ; wins support = yes
  213. ; wins server = w.x.y.z
  214. ; wins proxy = yes
  215. ; dns proxy = yes
  216. # --------------------------- Printing Options -----------------------------
  217. #
  218. # The options in this section allow you to configure a non-default printing
  219. # system.
  220. #
  221. # load printers = when set you yes, the list of printers is automatically
  222. # loaded, rather than setting them up individually.
  223. #
  224. # cups options = allows you to pass options to the CUPS library. Setting this
  225. # option to raw, for example, allows you to use drivers on your Windows clients.
  226. #
  227. # printcap name = used to specify an alternative printcap file.
  228. #
  229. load printers = yes
  230. cups options = raw
  231. ; printcap name = /etc/printcap
  232. # obtain a list of printers automatically on UNIX System V systems:
  233. ; printcap name = lpstat
  234. ; printing = cups
  235. # --------------------------- File System Options ---------------------------
  236. #
  237. # The options in this section can be un-commented if the file system supports
  238. # extended attributes, and those attributes are enabled (usually via the
  239. # "user_xattr" mount option). These options allow the administrator to specify
  240. # that DOS attributes are stored in extended attributes and also make sure that
  241. # Samba does not change the permission bits.
  242. #
  243. # Note: These options can be used on a per-share basis. Setting them globally
  244. # (in the [global] section) makes them the default for all shares.
  245. ; map archive = no
  246. ; map hidden = no
  247. ; map read only = no
  248. ; map system = no
  249. ; store dos attributes = yes
  250. #============================ Share Definitions ==============================
  251. [homes]
  252. comment = Home Directories
  253. browseable = no
  254. writable = yes
  255. ; valid users = %S
  256. ; valid users = MYDOMAIN\%S
  257. [printers]
  258. comment = All Printers
  259. path = /var/spool/samba
  260. browseable = no
  261. guest ok = no
  262. writable = no
  263. printable = yes
  264. [prueba]
  265. comment = Directorio de prueba
  266. path = /shared-folder
  267. public = yes
  268. browseable = yes
  269. guest ok = no
  270. writable = yes
  271. # Un-comment the following and create the netlogon directory for Domain Logons:
  272. ; [netlogon]
  273. ; comment = Network Logon Service
  274. ; path = /var/lib/samba/netlogon
  275. ; guest ok = yes
  276. ; writable = no
  277. ; share modes = no
  278. # Un-comment the following to provide a specific roving profile share.
  279. # The default is to use the user's home directory:
  280. ; [Profiles]
  281. ; path = /var/lib/samba/profiles
  282. ; browseable = no
  283. ; guest ok = yes
  284. # A publicly accessible directory that is read only, except for users in the
  285. # "staff" group (which have write permissions):
  286. ; [public]
  287. ; comment = Public Stuff
  288. ; path = /home/samba
  289. ; public = yes
  290. ; writable = yes
  291. ; printable = no
  292. ; write list = +staff