Advertisement
Guest User

Untitled

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