Advertisement
Guest User

Untitled

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