Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
503
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.88 KB | None | 0 0
  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 = WORKGROUP
  39.  
  40. # server string is the equivalent of the NT Description field
  41. server string = %h server (Samba, Ubuntu)
  42.  
  43. # Windows Internet Name Serving Support Section:
  44. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  45. # wins support = no
  46.  
  47. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  48. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  49. ; wins server = w.x.y.z
  50.  
  51. # This will prevent nmbd to search for NetBIOS names through DNS.
  52. dns proxy = no
  53.  
  54. # What naming service and in what order should we use to resolve host names
  55. # to IP addresses
  56. ; name resolve order = lmhosts host wins bcast
  57.  
  58. #### Networking ####
  59.  
  60. # The specific set of interfaces / networks to bind to
  61. # This can be either the interface name or an IP address/netmask;
  62. # interface names are normally preferred
  63. ; interfaces = 127.0.0.0/8 eth0
  64.  
  65. # Only bind to the named interfaces and/or networks; you must use the
  66. # 'interfaces' option above to use this.
  67. # It is recommended that you enable this feature if your Samba machine is
  68. # not protected by a firewall or is a firewall itself. However, this
  69. # option cannot handle dynamic or non-broadcast interfaces correctly.
  70. ; bind interfaces only = yes
  71.  
  72.  
  73.  
  74. #### Debugging/Accounting ####
  75.  
  76. # This tells Samba to use a separate log file for each machine
  77. # that connects
  78. log file = /var/log/samba/log.%m
  79.  
  80. # Cap the size of the individual log files (in KiB).
  81. max log size = 1000
  82.  
  83. # If you want Samba to only log through syslog then set the following
  84. # parameter to 'yes'.
  85. # syslog only = no
  86.  
  87. # We want Samba to log a minimum amount of information to syslog. Everything
  88. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  89. # through syslog you should set the following parameter to something higher.
  90. syslog = 0
  91.  
  92. # Do something sensible when Samba crashes: mail the admin a backtrace
  93. panic action = /usr/share/samba/panic-action %d
  94.  
  95.  
  96. ####### Authentication #######
  97.  
  98. # "security = user" is always a good idea. This will require a Unix account
  99. # in this server for every user accessing the server. See
  100. # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
  101. # in the samba-doc package for details.
  102. # security = user
  103.  
  104. # You may wish to use password encryption. See the section on
  105. # 'encrypt passwords' in the smb.conf(5) manpage before enabling.
  106. encrypt passwords = true
  107.  
  108. # If you are using encrypted passwords, Samba will need to know what
  109. # password database type you are using.
  110. passdb backend = tdbsam
  111.  
  112. obey pam restrictions = yes
  113.  
  114. # This boolean parameter controls whether Samba attempts to sync the Unix
  115. # password with the SMB password when the encrypted SMB password in the
  116. # passdb is changed.
  117. unix password sync = yes
  118.  
  119. # For Unix password sync to work on a Debian GNU/Linux system, the following
  120. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  121. # sending the correct chat script for the passwd program in Debian Sarge).
  122. passwd program = /usr/bin/passwd %u
  123. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  124.  
  125. # This boolean controls whether PAM will be used for password changes
  126. # when requested by an SMB client instead of the program listed in
  127. # 'passwd program'. The default is 'no'.
  128. pam password change = yes
  129.  
  130. # This option controls how unsuccessful authentication attempts are mapped
  131. # to anonymous connections
  132. map to guest = bad user
  133.  
  134. ########## Domains ###########
  135.  
  136. # Is this machine able to authenticate users. Both PDC and BDC
  137. # must have this setting enabled. If you are the BDC you must
  138. # change the 'domain master' setting to no
  139. #
  140. ; domain logons = yes
  141. #
  142. # The following setting only takes effect if 'domain logons' is set
  143. # It specifies the location of the user's profile directory
  144. # from the client point of view)
  145. # The following required a [profiles] share to be setup on the
  146. # samba server (see below)
  147. ; logon path = \\%N\profiles\%U
  148. # Another common choice is storing the profile in the user's home directory
  149. # (this is Samba's default)
  150. # logon path = \\%N\%U\profile
  151.  
  152. # The following setting only takes effect if 'domain logons' is set
  153. # It specifies the location of a user's home directory (from the client
  154. # point of view)
  155. ; logon drive = H:
  156. # logon home = \\%N\%U
  157.  
  158. # The following setting only takes effect if 'domain logons' is set
  159. # It specifies the script to run during logon. The script must be stored
  160. # in the [netlogon] share
  161. # NOTE: Must be store in 'DOS' file format convention
  162. ; logon script = logon.cmd
  163.  
  164. # This allows Unix users to be created on the domain controller via the SAMR
  165. # RPC pipe. The example command creates a user account with a disabled Unix
  166. # password; please adapt to your needs
  167. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  168.  
  169. # This allows machine accounts to be created on the domain controller via the
  170. # SAMR RPC pipe.
  171. # The following assumes a "machines" group exists on the system
  172. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  173.  
  174. # This allows Unix groups to be created on the domain controller via the SAMR
  175. # RPC pipe.
  176. ; add group script = /usr/sbin/addgroup --force-badname %g
  177.  
  178. ########## Printing ##########
  179.  
  180. # If you want to automatically load your printer list rather
  181. # than setting them up individually then you'll need this
  182. # load printers = yes
  183.  
  184. # lpr(ng) printing. You may wish to override the location of the
  185. # printcap file
  186. ; printing = bsd
  187. ; printcap name = /etc/printcap
  188.  
  189. # CUPS printing. See also the cupsaddsmb(8) manpage in the
  190. # cupsys-client package.
  191. ; printing = cups
  192. ; printcap name = cups
  193.  
  194. ############ Misc ############
  195.  
  196. # Using the following line enables you to customise your configuration
  197. # on a per machine basis. The %m gets replaced with the netbios name
  198. # of the machine that is connecting
  199. ; include = /home/samba/etc/smb.conf.%m
  200.  
  201. # Most people will find that this option gives better performance.
  202. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  203. # for details
  204. # You may want to add the following on a Linux system:
  205. # SO_RCVBUF=8192 SO_SNDBUF=8192
  206. # socket options = TCP_NODELAY
  207.  
  208. # The following parameter is useful only if you have the linpopup package
  209. # installed. The samba maintainer and the linpopup maintainer are
  210. # working to ease installation and configuration of linpopup and samba.
  211. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  212.  
  213. # Domain Master specifies Samba to be the Domain Master Browser. If this
  214. # machine will be configured as a BDC (a secondary logon server), you
  215. # must set this to 'no'; otherwise, the default behavior is recommended.
  216. # domain master = auto
  217.  
  218. # Some defaults for winbind (make sure you're not using the ranges
  219. # for something else.)
  220. ; idmap uid = 10000-20000
  221. ; idmap gid = 10000-20000
  222. ; template shell = /bin/bash
  223.  
  224. # The following was the default behaviour in sarge,
  225. # but samba upstream reverted the default because it might induce
  226. # performance issues in large organizations.
  227. # See Debian bug #368251 for some of the consequences of *not*
  228. # having this setting and smb.conf(5) for details.
  229. ; winbind enum groups = yes
  230. ; winbind enum users = yes
  231.  
  232. # Setup usershare options to enable non-root users to share folders
  233. # with the net usershare command.
  234.  
  235. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  236. ; usershare max shares = 100
  237.  
  238. # Allow users who've been granted usershare privileges to create
  239. # public shares, not just authenticated ones
  240. usershare allow guests = yes
  241.  
  242. #======================= Share Definitions =======================
  243.  
  244. # Un-comment the following (and tweak the other settings below to suit)
  245. # to enable the default home directory shares. This will share each
  246. # user's home directory as \\server\username
  247. ;[homes]
  248. ; comment = Home Directories
  249. ; browseable = yes
  250.  
  251. # By default, the home directories are exported read-only. Change the
  252. # next parameter to 'no' if you want to be able to write to them.
  253. ; read only = yes
  254.  
  255. # File creation mask is set to 0700 for security reasons. If you want to
  256. # create files with group=rw permissions, set next parameter to 0775.
  257. ; create mask = 0700
  258.  
  259. # Directory creation mask is set to 0700 for security reasons. If you want to
  260. # create dirs. with group=rw permissions, set next parameter to 0775.
  261. ; directory mask = 0700
  262.  
  263. # By default, \\server\username shares can be connected to by anyone
  264. # with access to the samba server. Un-comment the following parameter
  265. # to make sure that only "username" can connect to \\server\username
  266. # This might need tweaking when using external authentication schemes
  267. ; valid users = %S
  268.  
  269. # Un-comment the following and create the netlogon directory for Domain Logons
  270. # (you need to configure Samba to act as a domain controller too.)
  271. ;[netlogon]
  272. ; comment = Network Logon Service
  273. ; path = /home/samba/netlogon
  274. ; guest ok = yes
  275. ; read only = yes
  276. ; share modes = no
  277.  
  278. # Un-comment the following and create the profiles directory to store
  279. # users profiles (see the "logon path" option above)
  280. # (you need to configure Samba to act as a domain controller too.)
  281. # The path below should be writable by all users so that their
  282. # profile directory may be created the first time they log on
  283. ;[profiles]
  284. ; comment = Users profiles
  285. ; path = /home/samba/profiles
  286. ; guest ok = no
  287. ; browseable = no
  288. ; create mask = 0600
  289. ; directory mask = 0700
  290.  
  291. [printers]
  292. comment = All Printers
  293. browseable = no
  294. path = /var/spool/samba
  295. printable = yes
  296. guest ok = no
  297. read only = yes
  298. create mask = 0700
  299.  
  300. # Windows clients look for this share name as a source of downloadable
  301. # printer drivers
  302. [print$]
  303. comment = Printer Drivers
  304. path = /var/lib/samba/printers
  305. browseable = yes
  306. read only = yes
  307. guest ok = no[global]
  308. netbios name = Samba24
  309. server string = Samba file and print server
  310. workgroup = WORKGROUP
  311. security = SHARE
  312. hosts allow = 127. 192.168.0.
  313. interfaces = 127.0.0.1/40 192.168.0.0/40
  314. bind interfaces only = yes
  315. remote announce = 192.168.0.255
  316. remote browse sync = 192.168.0.255
  317. printcap name = cups
  318. load printers = yes
  319. cups options = raw
  320. printing = cups
  321. guest account = smbguest
  322. log file = /var/log/samba/samba.log
  323. max log size = 1000
  324. null passwords = no
  325. username level = 6
  326. password level = 6
  327. encrypt passwords = yes
  328. unix password sync = yes
  329. socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  330. local master = no
  331. domain master = no
  332. preferred master = no
  333. domain logons = no
  334. os level = 33
  335. logon drive = m:
  336. logon home = \\%L\homes\%u
  337. logon path = \\%L\profiles\%u
  338. logon script = %G.bat
  339. time server = no
  340. name resolve order = wins lmhosts bcast
  341. wins support = no
  342. wins proxy = no
  343. dns proxy = no
  344. preserve case = yes
  345. short preserve case = yes
  346. client use spnego = no
  347. client signing = no
  348. client schannel = no
  349. server signing = no
  350. server schannel = no
  351. nt pipe support = yes
  352. nt status support = yes
  353. allow trusted domains = no
  354. obey pam restrictions = yes
  355. enable spoolss = yes
  356. client plaintext auth = no
  357. disable netbios = no
  358. follow symlinks = no
  359. update encrypted = yes
  360. pam password change = no
  361. passwd chat timeout = 120
  362. hostname lookups = no
  363. username map = /etc/samba/smbusers
  364. smb passwd file = /etc/samba/smbpasswd
  365. passwd program = /usr/bin/passwd '%u'
  366. passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
  367. add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
  368. add user to group script=/usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
  369. add group script = /usr/sbin/groupadd '%g'
  370. delete user script = /usr/sbin/userdel '%u'
  371. delete user from group script = /usr/sbin/userdel '%u' '%g'
  372. delete group script = /usr/sbin/groupdel '%g'
  373. add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
  374. machine password timeout = 120
  375. idmap uid = 16777216-33554431
  376. idmap gid = 16777216-33554431
  377. template shell = /dev/null
  378. winbind use default domain = yes
  379. winbind separator = @
  380. winbind cache time = 360
  381. winbind trusted domains only = yes
  382. winbind nested groups = no
  383. winbind nss info = no
  384. winbind refresh tickets = no
  385. winbind offline logon = no
  386.  
  387. [homes]
  388. comment = Home Directories
  389. path = /home/minino/Compartir
  390. read only = no
  391. available = yes
  392. browseable = yes
  393. writable = yes
  394. guest ok = no
  395. public = yes
  396. printable = no
  397. share modes = yes
  398. locking = no
  399.  
  400. [netlogon]
  401. comment = Network Logon Service
  402. path = /home/netlogon
  403. read only = no
  404. available = yes
  405. browseable = yes
  406. writable = no
  407. guest ok = no
  408. public = no
  409. printable = no
  410. share modes = no
  411. locking = no
  412.  
  413. [profiles]
  414. comment = User Profiles
  415. path = /var/samba/profiles
  416. read only = no
  417. available = yes
  418. browseable = no
  419. writable = yes
  420. guest ok = no
  421. public = no
  422. printable = no
  423. locking = no
  424. create mode = 0600
  425. directory mask = 0700
  426.  
  427. [printers]
  428. comment = All Printers
  429. path = /var/spool/samba
  430. browseable = yes
  431. writable = no
  432. guest ok = no
  433. public = no
  434. printable = yes
  435. share modes = no
  436. locking = no
  437.  
  438. [pdf-documents]
  439. path = /home/pdf-documents
  440. comment = Converted PDF Documents
  441. available = yes
  442. browseable = yes
  443. writeable = yes
  444. guest ok = yes
  445.  
  446. [pdf-printer]
  447. path = /tmp
  448. comment = PDF Printer Service
  449. printable = yes
  450. guest ok = yes
  451. use client driver = yes
  452. printing = bsd
  453. print command = /usr/bin/gadmin-samba-pdf %s %u
  454. lpq command =
  455. lprm command =
  456. [public]
  457. comment = cosas a compartir
  458. path = /home/minino/Compartir/CARPETA_CAJA_DIARIA
  459. public = yes
  460. writable = yes
  461. create mask = 0777
  462. directory mask = 0777
  463. force user = nobody
  464. force group = nogroup
  465. gues ok = yes
  466. [public]
  467. comment = cosas a compartir
  468. path = /home/minino/Compartir/CARPETA_PRESUPUESTOS
  469. public = yes
  470. writable = yes
  471. create mask = 0777
  472. directory mask = 0777
  473. force user = nobody
  474. force group = nogroup
  475. gues ok = yes
  476. [public]
  477. comment = cosas a compartir
  478. path = /home/minino/Compartir/CONTRATOS_MANTENIMIENTO
  479. public = yes
  480. writable = yes
  481. create mask = 0777
  482. directory mask = 0777
  483. force user = nobody
  484. force group = nogroup
  485. gues ok = yes
  486. [public]
  487. comment = cosas a compartir
  488. path = /home/minino/Compartir/datos_server
  489. public = yes
  490. writable = yes
  491. create mask = 0777
  492. directory mask = 0777
  493. force user = nobody
  494. force group = nogroup
  495. gues ok = yes
  496. # Uncomment to allow remote administration of Windows print drivers.
  497. # You may need to replace 'lpadmin' with the name of the group your
  498. # admin users are members of.
  499. # Please note that you also need to set appropriate Unix permissions
  500. # to the drivers directory for these users to have write rights in it
  501. ; write list = root, @lpadmin
  502.  
  503. # A sample share for sharing your CD-ROM with others.
  504. ;[cdrom]
  505. ; comment = Samba server's CD-ROM
  506. ; read only = yes
  507. ; locking = no
  508. ; path = /cdrom
  509. ; guest ok = yes
  510.  
  511. # The next two parameters show how to auto-mount a CD-ROM when the
  512. # cdrom share is accesed. For this to work /etc/fstab must contain
  513. # an entry like this:
  514. #
  515. # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
  516. #
  517. # The CD-ROM gets unmounted automatically after the connection to the
  518. #
  519. # If you don't want to use auto-mounting/unmounting make sure the CD
  520. # is mounted on /cdrom
  521. #
  522. ; preexec = /bin/mount /cdrom
  523. ; postexec = /bin/umount /cdrom
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement