Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

my smb.conf
Thursday, August 28th, 2008 at 5:09:16pm UTC 

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

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right
worth-right