Guest User

Untitled

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