Advertisement
damianoloan

smb.conf3

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