Advertisement
Guest User

Untitled

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