Advertisement
fishbaitx

5132456451

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