Advertisement
Guest User

Untitled

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