[Frubar Paste] Hosted by SkyLime - Chat with us at XChannel IRC

Posted by Anonymous on Tue 5th Feb 11:16
download

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


Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.



Remember my name in a cookie


Code: To highlight particular lines, prefix each line with @@.
Include comments to indicate what you need feedback on.