Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 10.23 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.  
  28.         username map = /etc/samba/smbusers
  29.         map to guest = bad user
  30. ;       guest account = nobody
  31.         workgroup = WORKGROUP
  32. #wide links = no
  33.  
  34.         unix extensions = no
  35. # server string is the equivalent of the NT Description field
  36.         server string = %h server (Samba, Ubuntu)
  37.  
  38. # Windows Internet Name Serving Support Section:
  39. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  40. ;       wins support = no
  41.  
  42. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  43. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  44. ;   wins server = w.x.y.z
  45.  
  46. # This will prevent nmbd to search for NetBIOS names through DNS.
  47.         dns proxy = no
  48.  
  49. # What naming service and in what order should we use to resolve host names
  50. # to IP addresses
  51. ;   name resolve order = lmhosts host wins bcast
  52.  
  53. #### Networking ####
  54.  
  55. # The specific set of interfaces / networks to bind to
  56. # This can be either the interface name or an IP address/netmask;
  57. # interface names are normally preferred
  58. ;   interfaces = 127.0.0.0/8 eth0
  59.  
  60. # Only bind to the named interfaces and/or networks; you must use the
  61. # 'interfaces' option above to use this.
  62. # It is recommended that you enable this feature if your Samba machine is
  63. # not protected by a firewall or is a firewall itself.  However, this
  64. # option cannot handle dynamic or non-broadcast interfaces correctly.
  65. ;   bind interfaces only = true
  66.  
  67. unix extensions = no
  68.  
  69. #### Debugging/Accounting ####
  70.  
  71. # This tells Samba to use a separate log file for each machine
  72. # that connects
  73.         log file = /var/log/samba/log.%m
  74.  
  75. # Put a capping on the size of the log files (in Kb).
  76.         max log size = 1000
  77.  
  78. # If you want Samba to only log through syslog then set the following
  79. # parameter to 'yes'.
  80. ;       syslog only = no
  81.  
  82. # We want Samba to log a minimum amount of information to syslog. Everything
  83. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  84. # through syslog you should set the following parameter to something higher.
  85.         syslog = 0
  86.  
  87. # Do something sensible when Samba crashes: mail the admin a backtrace
  88.         panic action = /usr/share/samba/panic-action %d
  89.  
  90.  
  91. ####### Authentication #######
  92.  
  93. # "security = user" is always a good idea. This will require a Unix account
  94. # in this server for every user accessing the server. See
  95. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  96. # in the samba-doc package for details.
  97.         security = user
  98.  
  99. # You may wish to use password encryption.  See the section on
  100. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  101.         encrypt passwords = true
  102.  
  103. # If you are using encrypted passwords, Samba will need to know what
  104. # password database type you are using.
  105. ;       passdb backend = tdbsam
  106.  
  107.         obey pam restrictions = yes
  108.  
  109.         invalid users = root
  110.  
  111. # This boolean parameter controls whether Samba attempts to sync the Unix
  112. # password with the SMB password when the encrypted SMB password in the
  113. # passdb is changed.
  114. ;       unix password sync = no
  115.  
  116. # For Unix password sync to work on a Debian GNU/Linux system, the following
  117. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  118. # sending the correct chat script for the passwd program in Debian Sarge).
  119.         passwd program = /usr/bin/passwd %u
  120.         passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *passwd:*password\supdated\ssuccessfully* .
  121.  
  122. # This boolean controls whether PAM will be used for password changes
  123. # when requested by an SMB client instead of the program listed in
  124. # 'passwd program'. The default is 'no'.
  125. ;       pam password change = no
  126.  
  127. ########## Domains ###########
  128.  
  129. # Is this machine able to authenticate users. Both PDC and BDC
  130. # must have this setting enabled. If you are the BDC you must
  131. # change the 'domain master' setting to no
  132. #
  133. ;   domain logons = yes
  134. #
  135. # The following setting only takes effect if 'domain logons' is set
  136. # It specifies the location of the user's profile directory
  137. # from the client point of view)
  138. # The following required a [profiles] share to be setup on the
  139. # samba server (see below)
  140. ;   logon path = \\%N\profiles\%U
  141. # Another common choice is storing the profile in the user's home directory
  142. ;       logon path = \\%n\%u\profile
  143.  
  144. # The following setting only takes effect if 'domain logons' is set
  145. # It specifies the location of a user's home directory (from the client
  146. # point of view)
  147. ;   logon drive = H:
  148. ;       logon home = \\%n\%u
  149.  
  150. # The following setting only takes effect if 'domain logons' is set
  151. # It specifies the script to run during logon. The script must be stored
  152. # in the [netlogon] share
  153. # NOTE: Must be store in 'DOS' file format convention
  154. ;   logon script = logon.cmd
  155.  
  156. # This allows Unix users to be created on the domain controller via the SAMR
  157. # RPC pipe.  The example command creates a user account with a disabled Unix
  158. # password; please adapt to your needs
  159. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  160.  
  161. ########## Printing ##########
  162.  
  163. # If you want to automatically load your printer list rather
  164. # than setting them up individually then you'll need this
  165. ;       load printers = yes
  166.  
  167. # lpr(ng) printing. You may wish to override the location of the
  168. # printcap file
  169. ;   printing = bsd
  170. ;   printcap name = /etc/printcap
  171.  
  172. # CUPS printing.  See also the cupsaddsmb(8) manpage in the
  173. # cupsys-client package.
  174. ;       printing = cups
  175.         printcap name = cups
  176.  
  177. # When using [print$], root is implicitly a 'printer admin', but you can
  178. # also give this right to other users to add drivers and set printer
  179. # properties
  180. ;   printer admin = @lpadmin
  181.  
  182.  
  183. ############ Misc ############
  184.  
  185. # Using the following line enables you to customise your configuration
  186. # on a per machine basis. The %m gets replaced with the netbios name
  187. # of the machine that is connecting
  188. ;   include = /home/samba/etc/smb.conf.%m
  189.  
  190. # Most people will find that this option gives better performance.
  191. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  192. # for details
  193. # You may want to add the following on a Linux system:
  194. #         SO_RCVBUF=8192 SO_SNDBUF=8192
  195. ;       socket options = TCP_NODELAY
  196.  
  197. # The following parameter is useful only if you have the linpopup package
  198. # installed. The samba maintainer and the linpopup maintainer are
  199. # working to ease installation and configuration of linpopup and samba.
  200. ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  201.  
  202. # Domain Master specifies Samba to be the Domain Master Browser. If this
  203. # machine will be configured as a BDC (a secondary logon server), you
  204. # must set this to 'no'; otherwise, the default behavior is recommended.
  205. ;       domain master = auto
  206.  
  207. # Some defaults for winbind (make sure you're not using the ranges
  208. # for something else.)
  209. ;   idmap uid = 10000-20000
  210. ;   idmap gid = 10000-20000
  211. ;   template shell = /bin/bash
  212. ;
  213. ; The following was the default behaviour in sarge
  214. ; but samba upstream reverted the default because it might induce
  215. ; performance issues in large organizations
  216. ; See #368251 for some of the consequences of *not* having
  217. ; this setting and smb.conf(5) for all details
  218. ;
  219. ;   winbind enum groups = yes
  220. ;   winbind enum users = yes
  221.  
  222. #======================= Share Definitions =======================
  223.  
  224. # Un-comment the following (and tweak the other settings below to suit)
  225. # to enable the default home directory shares.  This will share each
  226. # user's home directory as \\server\username
  227. ;[homes]
  228. ;   comment = Home Directories
  229. ;   browseable = no
  230.  
  231. # By default, \\server\username shares can be connected to by anyone
  232. # with access to the samba server.  Un-comment the following parameter
  233. # to make sure that only "username" can connect to \\server\username
  234. # This might need tweaking when using external authentication schemes
  235. ;   valid users = %S
  236.  
  237. # By default, the home directories are exported read-only. Change next
  238. # parameter to 'yes' if you want to be able to write to them.
  239. ;   writable = no
  240.  
  241. # File creation mask is set to 0700 for security reasons. If you want to
  242. # create files with group=rw permissions, set next parameter to 0775.
  243. ;   create mask = 0700
  244.  
  245. # Directory creation mask is set to 0700 for security reasons. If you want to
  246. # create dirs. with group=rw permissions, set next parameter to 0775.
  247. ;   directory mask = 0700
  248.  
  249. # Un-comment the following and create the netlogon directory for Domain Logons
  250. # (you need to configure Samba to act as a domain controller too.)
  251. ;[netlogon]
  252. ;   comment = Network Logon Service
  253. ;   path = /home/samba/netlogon
  254. ;   guest ok = yes
  255. ;   writable = no
  256. ;   share modes = no
  257.  
  258. # Un-comment the following and create the profiles directory to store
  259. # users profiles (see the "logon path" option above)
  260. # (you need to configure Samba to act as a domain controller too.)
  261. # The path below should be writable by all users so that their
  262. # profile directory may be created the first time they log on
  263. ;[profiles]
  264. ;   comment = Users profiles
  265. ;   path = /home/samba/profiles
  266. ;   guest ok = no
  267. ;   browseable = no
  268. ;   create mask = 0600
  269. ;   directory mask = 0700
  270.  
  271. [printers]
  272.         comment = All Printers
  273. ;       browseable = yes
  274.         path = /var/spool/samba
  275.         printable = yes
  276.         create mask = 0700
  277.  
  278. # Windows clients look for this share name as a source of downloadable
  279. # printer drivers
  280. [print$]
  281.         comment = Printer Drivers
  282.         path = /var/lib/samba/printers
  283.  
  284.  
  285. [basti]
  286.         path = /home/basti
  287. ;       writeable = no
  288. ;       browseable = yes
  289.         guest ok = yes
  290.         follow symlinks = yes