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

Advertising

Someone
Tuesday, May 8th, 2007 at 1:03:18am 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 shownse 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 = PLSOFFICEHOME
  28.  
  29. # server string is the equivalent of the NT Description field
  30.    server string = %h
  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/Samba-HOWTO-Collection/ServerType.html
  90. # in the samba-doc package for details.
  91.    security = user
  92.    username map = /etc/samba/smbusers
  93.  
  94. # You may wish to use password encryption.  See the section on
  95. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  96.    encrypt passwords = true
  97.  
  98. # If you are using encrypted passwords, Samba will need to know what
  99. # password database type you are using. 
  100.    passdb backend = tdbsam
  101.  
  102.    obey pam restrictions = yes
  103.  
  104. ;   guest account = nobody
  105.    invalid users = root
  106.  
  107. # This boolean parameter controls whether Samba attempts to sync the Unix
  108. # password with the SMB password when the encrypted SMB password in the
  109. # passdb is changed.
  110. ;   unix password sync = no
  111.  
  112. # For Unix password sync to work on a Debian GNU/Linux system, the following
  113. # parameters must be set (thanks to Ian Kahan <<[email protected]> for
  114. # sending the correct chat script for the passwd program in Debian Sarge).
  115.    passwd program = /usr/bin/passwd %u
  116.    passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .
  117.  
  118. # This boolean controls whether PAM will be used for password changes
  119. # when requested by an SMB client instead of the program listed in
  120. # 'passwd program'. The default is 'no'.
  121. ;   pam password change = no
  122.  
  123. ########## Domains ###########
  124.  
  125. # Is this machine able to authenticate users. Both PDC and BDC
  126. # must have this setting enabled. If you are the BDC you must
  127. # change the 'domain master' setting to no
  128. #
  129. ;   domain logons = yes
  130. #
  131. # The following setting only takes effect if 'domain logons' is set
  132. # It specifies the location of the user's profile directory
  133. # from the client point of view)
  134. # The following required a [profiles] share to be setup on the
  135. # samba server (see below)
  136. ;   logon path = \\%N\profiles\%U
  137. # Another common choice is storing the profile in the user's home directory
  138. ;   logon path = \\%N\%U\profile
  139.  
  140. # The following setting only takes effect if 'domain logons' is set
  141. # It specifies the location of a user's home directory (from the client
  142. # point of view)
  143. ;   logon drive = H:
  144. ;   logon home = \\%N\%U
  145.  
  146. # The following setting only takes effect if 'domain logons' is set
  147. # It specifies the script to run during logon. The script must be stored
  148. # in the [netlogon] share
  149. # NOTE: Must be store in 'DOS' file format convention
  150. ;   logon script = logon.cmd
  151.  
  152. # This allows Unix users to be created on the domain controller via the SAMR
  153. # RPC pipe.  The example command creates a user account with a disabled Unix
  154. # password; please adapt to your needs
  155. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  156.  
  157. ########## Printing ##########
  158.  
  159. # If you want to automatically load your printer list rather
  160. # than setting them up individually then you'll need this
  161. ;   load printers = yes
  162.  
  163. # lpr(ng) printing. You may wish to override the location of the
  164. # printcap file
  165. ;   printing = bsd
  166. ;   printcap name = /etc/printcap
  167.  
  168. # CUPS printing.  See also the cupsaddsmb(8) manpage in the
  169. # cupsys-client package.
  170. ;   printing = cups
  171. ;   printcap name = cups
  172.  
  173. # When using [print$], root is implicitly a 'printer admin', but you can
  174. # also give this right to other users to add drivers and set printer
  175. # properties
  176. ;   printer admin = @lpadmin
  177.  
  178.  
  179. ############ Misc ############
  180.  
  181. # Using the following line enables you to customise your configuration
  182. # on a per machine basis. The %m gets replaced with the netbios name
  183. # of the machine that is connecting
  184. ;   include = /home/samba/etc/smb.conf.%m
  185.  
  186. # Most people will find that this option gives better performance.
  187. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
  188. # for details
  189. # You may want to add the following on a Linux system:
  190. #         SO_RCVBUF=8192 SO_SNDBUF=8192
  191.    socket options = TCP_NODELAY
  192.  
  193. # The following parameter is useful only if you have the linpopup package
  194. # installed. The samba maintainer and the linpopup maintainer are
  195. # working to ease installation and configuration of linpopup and samba.
  196. ;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  197.  
  198. # Domain Master specifies Samba to be the Domain Master Browser. If this
  199. # machine will be configured as a BDC (a secondary logon server), you
  200. # must set this to 'no'; otherwise, the default behavior is recommended.
  201. ;   domain master = auto
  202.  
  203. # Some defaults for winbind (make sure you're not using the ranges
  204. # for something else.)
  205. ;   idmap uid = 10000-20000
  206. ;   idmap gid = 10000-20000
  207. ;   template shell = /bin/bash
  208.  
  209. #======================= Share Definitions =======================
  210.  
  211. # Un-comment the following (and tweak the other settings below to suit)
  212. # to enable the default home directory shares.  This will share each
  213. # user's home directory as \\server\username
  214. ;[homes]
  215. ;   comment = Home Directories
  216. ;   browseable = no
  217.  
  218. # By default, \\server\username shares can be connected to by anyone
  219. # with access to the samba server.  Un-comment the following parameter
  220. # to make sure that only "username" can connect to \\server\username
  221. ;   valid users = %S
  222.  
  223. # By default, the home directories are exported read-only. Change next
  224. # parameter to 'yes' if you want to be able to write to them.
  225.    writable = yes
  226.  
  227. # File creation mask is set to 0600 for security reasons. If you want to
  228. # create files with group=rw permissions, set next parameter to 0664.
  229. ;   create mask = 0600
  230.  
  231. # Directory creation mask is set to 0700 for security reasons. If you want to
  232. # create dirs. with group=rw permissions, set next parameter to 0775.
  233. ;   directory mask = 0700
  234.  
  235. # Un-comment the following and create the netlogon directory for Domain Logons
  236. # (you need to configure Samba to act as a domain controller too.)
  237. ;[netlogon]
  238. ;   comment = Network Logon Service
  239. ;   path = /home/samba/netlogon
  240. ;   guest ok = yes
  241. ;   writable = no
  242. ;   share modes = no
  243.  
  244. # Un-comment the following and create the profiles directory to store
  245. # users profiles (see the "logon path" option above)
  246. # (you need to configure Samba to act as a domain controller too.)
  247. # The path below should be writable by all users so that their
  248. # profile directory may be created the first time they log on
  249. ;[profiles]
  250. ;   comment = Users profiles
  251. ;   path = /home/samba/profiles
  252. ;   guest ok = no
  253. ;   browseable = no
  254. ;   create mask = 0600
  255. ;   directory mask = 0700
  256.  
  257. wins support = no
  258. [printers]
  259.    comment = All Printers
  260.    browseable = no
  261.    path = /tmp
  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.  
  303. [Group]
  304.     comment = WebDev
  305.     path = /var/www/
  306.     public = yes
  307.     writable = yes
  308.     valid users = nexous root
  309.     create mask = 0700
  310.     directory mask = 0700
  311.     force user = nobody
  312.     force group = nogroup

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