Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
467
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.14 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. # A well-established practice is to name the original file
  22. # "smb.conf.master" and create the "real" config file with
  23. # testparm -s smb.conf.master >smb.conf
  24. # This minimizes the size of the really used smb.conf file
  25. # which, according to the Samba Team, impacts performance
  26. # However, use this with caution if your smb.conf file contains nested
  27. # "include" statements. See Debian bug #483187 for a case
  28. # where using a master file is not a good idea.
  29. #
  30.  
  31. #======================= Global Settings =======================[global]
  32.  
  33. ## Browsing/Identification ###
  34.  
  35. # Change this to the workgroup/NT-domain name your Samba server will part of
  36. workgroup = SVAB
  37.  
  38. # server string is the equivalent of the NT Description field
  39. server string = mediacenter
  40. netbios name = mediacenter
  41.  
  42. # Windows Internet Name Serving Support Section:
  43. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  44. ; wins support = yes
  45.  
  46. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  47. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  48. ; wins server = w.x.y.z
  49.  
  50. # If we receive WINS server info from DHCP, override the options above.
  51. ; include = /etc/samba/dhcp.conf
  52.  
  53. # This will prevent nmbd to search for NetBIOS names through DNS.
  54. dns proxy = no
  55.  
  56. # What naming service and in what order should we use to resolve host names
  57. # to IP addresses
  58. ; name resolve order = lmhosts host wins bcast
  59.  
  60. #### Networking ####
  61.  
  62. # The specific set of interfaces / networks to bind to
  63. #
  64. # Sample configuration file for the Samba suite for Debian GNU/Linux.
  65. #
  66. #
  67. # This is the main Samba configuration file. You should read the
  68. # smb.conf(5) manual page in order to understand the options listed
  69. # here. Samba has a huge number of configurable options most of which
  70. # are not shown in this example
  71. #
  72. # Some options that are often worth tuning have been included as
  73. # commented-out examples in this file.
  74. # - When such options are commented with ";", the proposed setting
  75. # differs from the default Samba behaviour
  76. # - When commented with "#", the proposed setting is the default
  77. # behaviour of Samba but the option is considered important
  78. # enough to be mentioned here
  79. #
  80. # NOTE: Whenever you modify this file you should run the command
  81. # "testparm" to check that you have not made any basic syntactic
  82. # errors.
  83. # A well-established practice is to name the original file
  84. # "smb.conf.master" and create the "real" config file with
  85. # testparm -s smb.conf.master >smb.conf
  86. # This minimizes the size of the really used smb.conf file
  87. # which, according to the Samba Team, impacts performance
  88. # However, use this with caution if your smb.conf file contains nested
  89. # "include" statements. See Debian bug #483187 for a case
  90. # where using a master file is not a good idea.
  91. #
  92.  
  93. #======================= Global Settings =======================[global]
  94.  
  95. ## Browsing/Identification ###
  96.  
  97. # Change this to the workgroup/NT-domain name your Samba server will part of
  98. workgroup = SVAB
  99.  
  100. # server string is the equivalent of the NT Description field
  101. server string = mediacenter
  102. netbios name = mediacenter
  103.  
  104. # Windows Internet Name Serving Support Section:
  105. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  106. ; wins support = yes
  107.  
  108. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  109. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  110. ; wins server = w.x.y.z
  111.  
  112. # If we receive WINS server info from DHCP, override the options above.
  113. ; include = /etc/samba/dhcp.conf
  114.  
  115. # This will prevent nmbd to search for NetBIOS names through DNS.
  116. dns proxy = no
  117.  
  118. # What naming service and in what order should we use to resolve host names
  119. # to IP addresses
  120. ; name resolve order = lmhosts host wins bcast
  121.  
  122. #### Networking ####
  123.  
  124. # The specific set of interfaces / networks to bind to
  125. # This can be either the interface name or an IP address/netmask;
  126. # interface names are normally preferred
  127. ; interfaces = 127.0.0.0/8 eth0
  128.  
  129. # Only bind to the named interfaces and/or networks; you must use the
  130. # 'interfaces' option above to use this.
  131. # It is recommended that you enable this feature if your Samba machine is
  132. # not protected by a firewall or is a firewall itself. However, this
  133. # option cannot handle dynamic or non-broadcast interfaces correctly.
  134. ; bind interfaces only = yes
  135.  
  136.  
  137.  
  138. #### Debugging/Accounting ####
  139.  
  140. # This tells Samba to use a separate log file for each machine
  141. # that connects
  142. log file = /var/log/samba/log.%m
  143.  
  144. # Cap the size of the individual log files (in KiB).
  145. max log size = 1000
  146.  
  147. # If you want Samba to only log through syslog then set the following
  148. # parameter to 'yes'.
  149. # syslog only = no
  150.  
  151. # We want Samba to log a minimum amount of information to syslog. Everything
  152. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  153. # through syslog you should set the following parameter to something higher.
  154. syslog = 0
  155.  
  156. # Do something sensible when Samba crashes: mail the admin a backtrace
  157. panic action = /usr/share/samba/panic-action %d
  158.  
  159.  
  160. ####### Authentication #######
  161.  
  162. # "security = user" is always a good idea. This will require a Unix account
  163. # in this server for every user accessing the server. See
  164. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  165. # in the samba-doc package for details.
  166. # security = user
  167.  
  168. # You may wish to use password encryption. See the section on
  169. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  170. encrypt passwords = true
  171.  
  172. # If you are using encrypted passwords, Samba will need to know what
  173. # password database type you are using.
  174. passdb backend = tdbsam
  175.  
  176. obey pam restrictions = yes
  177.  
  178. # This boolean parameter controls whether Samba attempts to sync the Unix
  179. # password with the SMB password when the encrypted SMB password in the
  180. # passdb is changed.
  181. unix password sync = yes
  182.  
  183. # For Unix password sync to work on a Debian GNU/Linux system, the following
  184. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  185. # sending the correct chat script for the passwd program in Debian Sarge).
  186. passwd program = /usr/bin/passwd %u
  187. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  188.  
  189. # This boolean controls whether PAM will be used for password changes
  190. # when requested by an SMB client instead of the program listed in
  191. # 'passwd program'. The default is 'no'.
  192. pam password change = yes
  193.  
  194. # This option controls how unsuccessful authentication attempts are mapped
  195. # to anonymous connections
  196. map to guest = bad user
  197.  
  198. ########## Domains ###########
  199.  
  200. # Is this machine able to authenticate users. Both PDC and BDC
  201. # must have this setting enabled. If you are the BDC you must
  202. # change the 'domain master' setting to no
  203. #
  204. ; domain logons = yes
  205. #
  206. # The following setting only takes effect if 'domain logons' is set
  207. # It specifies the location of the user's profile directory
  208. # from the client point of view)
  209. # The following required a [profiles] share to be setup on the
  210. # samba server (see below)
  211. ; logon path = \\%N\profiles\%U
  212. # Another common choice is storing the profile in the user's home directory
  213. # (this is Samba's default)
  214. # logon path = \\%N\%U\profile
  215.  
  216. # The following setting only takes effect if 'domain logons' is set
  217. # It specifies the location of a user's home directory (from the client
  218. # point of view)
  219. ; logon drive = H:
  220. # logon home = \\%N\%U
  221.  
  222. # The following setting only takes effect if 'domain logons' is set
  223. # It specifies the script to run during logon. The script must be stored
  224. # in the [netlogon] share
  225. # NOTE: Must be store in 'DOS' file format convention
  226. ; logon script = logon.cmd
  227.  
  228. # This allows Unix users to be created on the domain controller via the SAMR
  229. # RPC pipe. The example command creates a user account with a disabled Unix
  230. # password; please adapt to your needs
  231. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  232.  
  233. # This allows machine accounts to be created on the domain controller via the
  234. # SAMR RPC pipe.
  235. # The following assumes a "machines" group exists on the system
  236. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  237.  
  238. # This allows Unix groups to be created on the domain controller via the SAMR
  239. # RPC pipe.
  240. ; add group script = /usr/sbin/addgroup --force-badname %g
  241.  
  242. ########## Printing ##########
  243.  
  244. # If you want to automatically load your printer list rather
  245. # than setting them up individually then you'll need this
  246. # load printers = yes
  247.  
  248. # lpr(ng) printing. You may wish to override the location of the
  249. # printcap file
  250. ; printing = bsd
  251. ; printcap name = /etc/printcap
  252.  
  253. # CUPS printing. See also the cupsaddsmb(8) manpage in the
  254. # cupsys-client package.
  255. ; printing = cups
  256. ; printcap name = cups
  257.  
  258. ############ Misc ############
  259.  
  260. # Using the following line enables you to customise your configuration
  261. # on a per machine basis. The %m gets replaced with the netbios name
  262. # of the machine that is connecting
  263. ; include = /home/samba/etc/smb.conf.%m
  264.  
  265. # Most people will find that this option gives better performance.
  266. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  267. # for details
  268. # You may want to add the following on a Linux system:
  269. # SO_RCVBUF=8192 SO_SNDBUF=8192
  270. socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
  271.  
  272. # The following parameter is useful only if you have the linpopup package
  273. # installed. The samba maintainer and the linpopup maintainer are
  274. # working to ease installation and configuration of linpopup and samba.
  275. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  276.  
  277. # Domain Master specifies Samba to be the Domain Master Browser. If this
  278. # machine will be configured as a BDC (a secondary logon server), you
  279. # must set this to 'no'; otherwise, the default behavior is recommended.
  280. # domain master = auto
  281.  
  282. # Some defaults for winbind (make sure you're not using the ranges
  283. # for something else.)
  284. ; idmap uid = 10000-20000
  285. ; idmap gid = 10000-20000
  286. ; template shell = /bin/bash
  287.  
  288. # The following was the default behaviour in sarge,
  289. # but samba upstream reverted the default because it might induce
  290. # performance issues in large organizations.
  291. # See Debian bug #368251 for some of the consequences of *not*
  292. # having this setting and smb.conf(5) for details.
  293. ; winbind enum groups = yes
  294. ; winbind enum users = yes
  295.  
  296. # Setup usershare options to enable non-root users to share folders
  297. # with the net usershare command.
  298.  
  299. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  300. ; usershare max shares = 100
  301.  
  302. # Allow users who've been granted usershare privileges to create
  303. # public shares, not just authenticated ones
  304. usershare allow guests = yes
  305.  
  306. #======================= Share Definitions =======================
  307.  
  308. # Un-comment the following (and tweak the other settings below to suit)
  309. # to enable the default home directory shares. This will share each
  310. # user's home directory as \\server\username
  311. [homes]
  312. comment = Home Directories
  313. browseable = yes
  314.  
  315. # By default, the home directories are exported read-only. Change the
  316. # next parameter to 'no' if you want to be able to write to them.
  317. read only = no
  318.  
  319. # File creation mask is set to 0700 for security reasons. If you want to
  320. # create files with group=rw permissions, set next parameter to 0775.
  321. ; create mask = 0700
  322.  
  323. # Directory creation mask is set to 0700 for security reasons. If you want to
  324. # create dirs. with group=rw permissions, set next parameter to 0775.
  325. ; directory mask = 0700
  326.  
  327. # By default, \\server\username shares can be connected to by anyone
  328. # with access to the samba server. Un-comment the following parameter
  329. # to make sure that only "username" can connect to \\server\username
  330. # This might need tweaking when using external authentication schemes
  331. valid users = %S
  332.  
  333. # Un-comment the following and create the netlogon directory for Domain Logons
  334. # (you need to configure Samba to act as a domain controller too.)
  335. ;[netlogon]
  336. ; comment = Network Logon Service
  337. ; path = /home/samba/netlogon
  338. ; guest ok = yes
  339. ; read only = yes
  340. ; share modes = no
  341.  
  342. # Un-comment the following and create the profiles directory to store
  343. # users profiles (see the "logon path" option above)
  344. # (you need to configure Samba to act as a domain controller too.)
  345. # The path below should be writable by all users so that their
  346. # profile directory may be created the first time they log on
  347. ;[profiles]
  348. ; comment = Users profiles
  349. ; path = /home/samba/profiles
  350. ; guest ok = no
  351. ; browseable = no
  352. ; create mask = 0600
  353. ; directory mask = 0700
  354.  
  355. [printers]
  356. comment = All Printers
  357. browseable = yes
  358. path = /var/spool/samba
  359. printable = yes
  360. guest ok = yes
  361. read only = yes
  362. create mask = 0700
  363. use client driver = yes
  364.  
  365. # Windows clients look for this share name as a source of downloadable
  366. # printer drivers
  367. [print$]
  368. comment = Printer Drivers
  369. path = /var/lib/samba/printers
  370. browseable = yes
  371. read only = yes
  372. guest ok = yes
  373. # Uncomment to allow remote administration of Windows print drivers.
  374. # You may need to replace 'lpadmin' with the name of the group your
  375. # admin users are members of.
  376. # Please note that you also need to set appropriate Unix permissions
  377. # to the drivers directory for these users to have write rights in it
  378. ; write list = root, @lpadmin
  379.  
  380. # A sample share for sharing your CD-ROM with others.
  381. ;[cdrom]
  382. ; comment = Samba server's CD-ROM
  383. ; read only = yes
  384. ; locking = no
  385. ; path = /cdrom
  386. ; guest ok = yes
  387.  
  388. # The next two parameters show how to auto-mount a CD-ROM when the
  389. # cdrom share is accesed. For this to work /etc/fstab must contain
  390. # an entry like this:
  391. #
  392. # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
  393. #
  394. # The CD-ROM gets unmounted automatically after the connection to the
  395. #
  396. # If you don't want to use auto-mounting/unmounting make sure the CD
  397. # is mounted on /cdrom
  398. #
  399. ; preexec = /bin/mount /cdrom
  400. ; postexec = /bin/umount /cdrom
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement