daily pastebin goal
2%
SHARE
TWEET

samba

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