Guest User

Untitled

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