Advertisement
Jorisvh

Samba

Jul 2nd, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.15 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. sudo restart smbd
  35. ## Browsing/Identification ###
  36.  
  37. # Change this to the workgroup/NT-domain name your Samba server will part of
  38. workgroup = joluhu
  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 = yessudo restart smbd
  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. sudo restart smbd
  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/Sambsudo restart smbda3-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 = yes
  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 = yessudo restart smbd
  113.  
  114. Toevoegen Toevoegen
  115. Klik op toevoegen om nieuwe bestanden te uploaden of selecteer uit de bestaande bestanden.
  116. Folders
  117. Home
  118. Sorteervolgorde:
  119. Home
  120. # This boolean parameter controls whether Samba attempts to sync the Unix
  121. # password with the SMB password when the encrypted SMB password in the
  122. # passdb is changed.
  123. unix password sync = yes
  124.  
  125. # For Unix password sync to work on a Debian GNU/Linux system, the following
  126. # parameters must be set (thanks to Ian Kahan <<[email protected]> for
  127. # sending the correct chat script for the passwd program in Debian Sarge).
  128. passwd program = /usr/bin/passwd %u
  129. passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  130.  
  131. # This boolean controls whether PAM will be used for password changes
  132. # when requested by an SMB client instead of the program listed in
  133. # 'passwd program'. The default is 'no'.
  134. pam password change = yes
  135.  
  136. # This option controls how unsuccessful authentication attempts are mapped
  137. # to anonymous connections
  138. map to guest = bad user
  139.  
  140. ########## Domains ###########
  141.  
  142. # Is this machine able to authenticate users. Both PDC and BDC
  143. # must have this setting enabled. If you are the BDC you must
  144. # change the 'domain master' setting to no
  145. #
  146. ; domain logons = yes
  147. #
  148. # The following setting only takes effect if 'domain logons' is set
  149. # It specifies the location of the user's profile directory
  150. # from the client point of view)
  151. # The following required a [profiles] share to be setup on the
  152. # samba server (see below)
  153. ; logon path = \\%N\profiles\%U
  154. # Another common choice is storing the profile in the user's home directory
  155. # (this is Samba's default)
  156. # logon path = \\%N\%U\profile
  157.  
  158. # The following setting only takes effect if 'domain logons' is set
  159. # It specifies the location of a user's home directory (from the client
  160. # point of view)
  161. ; logon drive = H:
  162. # logon home = \\%N\%U
  163.  
  164. # The following setting only takes effect if 'domain logons' is set
  165. # It specifies the script to run during logon. The script must be stored
  166. # in the [netlogon] share
  167. # NOTE: Must be store in 'DOS' file format convention
  168. ; logon script = logon.cmd
  169.  
  170. # This allows Unix users to be created on the domain controller via the SAMR
  171. # RPC pipe. The example command creates a user account with a disabled Unix
  172. # password; please adapt to your needs
  173. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  174.  
  175. # This allows machine accounts to be created on the domain controller via the
  176. # SAMR RPC pipe.
  177. # The following assumes a "machines" group exists on the systemlinux
  178. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  179.  
  180. # This allows Unix groups to be created on the domain controller via the SAMR
  181. # RPC pipe.
  182. ; add group script = /usr/sbin/addgroup --force-badname %g
  183.  
  184. ########## Printing ##########
  185.  
  186. Toevoegen Toevoegen
  187. Klik op toevoegen om nieuwe bestanden te uploaden of selecteer uit de bestaande bestanden.
  188. Folders
  189. Home
  190. Sorteervolgorde:
  191. Home
  192. # If you want to automatically load your printer list rather
  193. # than setting them up individually then you'll need this
  194. load printers = yes
  195.  
  196. # lpr(ng) printing. You may wish to override the location of the
  197. # printcap file
  198. printing = bsd
  199. ; printcap name = /etc/printcap
  200. linux
  201. # CUPS printing. See also the cupsaddsmb(8) manpage in the
  202. # cupsys-client package.
  203. printing = cups
  204. printcap name = cups
  205.  
  206. ############ Misc ############
  207.  
  208. # Using the following line enables you to customise your configuration
  209. # on a per machine basis. The %m gets replaced with the netbios name
  210. # of the machine that is connecting
  211. ; include = /home/samba/etc/smb.conf.%m
  212.  
  213. # Most people will find that this option gives better performance.
  214. # See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
  215. # for details
  216. # You may want to add the following on a Linux system:
  217. # SO_RCVBUF=8192 SO_SNDBUF=8192
  218. # socket options = TCP_NODELAY
  219.  
  220. # The following parameter is useful only if you have the linpopup package
  221. # installed. The samba maintainer and the linpopup maintainer are
  222. # working to ease installation and configuration of linpopup and samba.
  223. ; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
  224.  
  225. # Domain Master specifies Samba to be the Domain Master Browser. If this
  226. # machine will be configured as a BDC (a secondary logon server), you
  227. # must set this to 'no'; otherwise, the default behavior is recommended.
  228. # domain master = auto
  229.  
  230. # Some defaults for winbind (make sure you're not using the ranges
  231. # for something else.)
  232. ; idmap uid = 10000-20000
  233. ; idmap gid = 10000-20000
  234. ; template shell = /bin/bash
  235.  
  236. # The following was the default behaviour in sarge,
  237. # but samba upstream reverted the default because it might induce
  238. # performance issues in large organizations.
  239. # See Debian bug #368251 for some of the consequences of *not*
  240. # having this setting and smb.conf(5) for details.
  241. ; winbind enum groups = yes
  242. ; winbind enum users = yes
  243.  
  244. # Setup usershare options to enable non-root users to share folders
  245. # with the net usershare command.
  246.  
  247. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  248. ; usershare max shares = 100
  249.  
  250. # Allow users who've been granted usershare privileges to create
  251. # public shares, not just authenticated ones
  252. usershare allow guests = yes
  253. username map = /etc/samba/smbusers
  254. security = user
  255. ; guest ok = no
  256. ; guest account = nobody
  257.  
  258. #======================= Share Definitions =======================
  259.  
  260. # Un-comment the following (and tweak the other settings below to suit)
  261. # to enable the default home directory shares. This will share each
  262. # user's home director as \\server\username
  263. ;[homes]
  264. ; comment = Home Directories
  265. ; browseable = no
  266.  
  267. # By default, the home directories are exported read-only. Change the
  268. # next parameter to 'no' if you want to be able to write to them.
  269. ; read only = yes
  270.  
  271. # File creation mask is set to 0700 for security reasons. If you want to
  272. # create files with group=rw permissions, set next parameter to 0775.
  273. ; create mask = 0700
  274.  
  275. # Directory creation mask is set to 0700 for security reasons. If you want to
  276. # create dirs. with group=rw permissions, set next parameter to 0775.
  277. ; directory mask = 0700
  278.  
  279. # By default, \\server\username shares can be connected to by anyone
  280. # with access to the samba server. Un-comment the following parameter
  281. # to make sure that only "username" can connect to \\server\username
  282. # The following parameter makes sure that only "username" can connect
  283. #
  284. # This might need tweaking when using external authentication schemes
  285. ; valid users = %S
  286.  
  287. # Un-comment the following and create the netlogon directory for Domain Logons
  288. # (you need to configure Samba to act as a domain controller too.)
  289. ;[netlogon]
  290. ; comment = Network Logon Service
  291. ; path = /home/samba/netlogon
  292. ; guest ok = yes
  293. ; read only = yes
  294.  
  295. # Un-comment the following and create the profiles directory to store
  296. # users profiles (see the "logon path" option above)
  297. # (you need to configure Samba to act as a domain controller too.)
  298. # The path below should be writable by all users so that their
  299. # profile directory may be created the first time they log on
  300. ;[profiles]
  301. ; comment = Users profiles
  302. ; path = /home/samba/profiles
  303. ; guest ok = no
  304. ; browseable = no
  305. ; create mask = 0600
  306. ; directory mask = 0700
  307.  
  308. [printers]
  309. comment = All Printers
  310. browseable = yes
  311. path = /var/spool/samba
  312. printable = yes
  313. guest ok = yes
  314. ; read only = yes
  315. create mask = 0700
  316.  
  317. # Windows clients look for this share name as a source of dow
  318. Toevoegen Toevoegen
  319. Klik op toevoegen om nieuwe bestanden te uploaden of selecteer uit de bestaande bestanden.
  320. Folders
  321. Home
  322. Sorteervolgorde:
  323. Home nloadable
  324. # printer drivers
  325. [print$]
  326. comment = Printer Drivers
  327. path = /var/lib/samba/printers
  328. browseable = yes
  329. read only = yes
  330. guest ok = yes
  331. # Uncomment to allow remote administration of Windows print drivers.
  332. # You may need to replace 'lpadmin' with the name of the group your
  333. # admin users are members of.
  334. # Please note that you also need to set appropriate Unix permissions
  335. # to the drivers directory for these users to have write rights in it
  336. ; write list = root, @lpadmin
  337.  
  338. # A sample share for sharing your CD-ROM with others.
  339. ;[cdrom]
  340. ; comment = Samba server's CD-ROM
  341. ; read only = yes
  342. ; locking = no
  343. ; path = /cdrom
  344. ; guest ok = yes
  345.  
  346. # The next two parameters show how to auto-mount a CD-ROM when the
  347. # cdrom share is accesed. For this to work /etc/fstab must contain
  348. # an entry like this:
  349. #
  350. # /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
  351. #
  352. # The CD-ROM gets unmounted automatically after the connection to the
  353. #
  354. # If you don't want to use auto-mounting/unmounting make sure the CD
  355. # is mounted on /cdrom
  356. #
  357. ; preexec = /bin/mount /cdrom
  358. ; postexec = /bin/umount /cdrom
  359.  
  360. [doc]
  361. path = /media/doc
  362. writeable = yes
  363. browseable = yes
  364. guest ok = yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement