Advertisement
Guest User

Untitled

a guest
Mar 15th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.69 KB | None | 0 0
  1. #======================= Global Settings =======================
  2.  
  3. [global]
  4.  
  5. ## Browsing/Identification ###
  6.  
  7. # Change this to the workgroup/NT-domain name your Samba server will part of
  8. workgroup = workgroup
  9.  
  10. # server string is the equivalent of the NT Description field
  11. server string = %h server (Samba, Ubuntu)
  12.  
  13. # Windows Internet Name Serving Support Section:
  14. # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
  15. wins support = yes
  16.  
  17. # WINS Server - Tells the NMBD components of Samba to be a WINS Client
  18. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  19. ; wins server = w.x.y.z
  20.  
  21. # This will prevent nmbd to search for NetBIOS names through DNS.
  22. dns proxy = no
  23.  
  24. #### Networking ####
  25.  
  26. # The specific set of interfaces / networks to bind to
  27. # This can be either the interface name or an IP address/netmask;
  28. # interface names are normally preferred
  29. ; interfaces = 127.0.0.0/8 eth0
  30.  
  31. # Only bind to the named interfaces and/or networks; you must use the
  32. # 'interfaces' option above to use this.
  33. # It is recommended that you enable this feature if your Samba machine is
  34. # not protected by a firewall or is a firewall itself. However, this
  35. # option cannot handle dynamic or non-broadcast interfaces correctly.
  36. ; bind interfaces only = yes
  37.  
  38.  
  39.  
  40. #### Debugging/Accounting ####
  41.  
  42. # This tells Samba to use a separate log file for each machine
  43. # that connects
  44. log file = /var/log/samba/log.%m
  45.  
  46. # Cap the size of the individual log files (in KiB).
  47. max log size = 1000
  48.  
  49. # If you want Samba to only log through syslog then set the following
  50. # parameter to 'yes'.
  51. # syslog only = no
  52.  
  53. # We want Samba to log a minimum amount of information to syslog. Everything
  54. # should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
  55. # through syslog you should set the following parameter to something higher.
  56. syslog = 0
  57.  
  58. # Do something sensible when Samba crashes: mail the admin a backtrace
  59. panic action = /usr/share/samba/panic-action %d
  60.  
  61.  
  62. ####### Authentication #######
  63.  
  64. # Server role. Defines in which mode Samba will operate. Possible
  65. # values are "standalone server", "member server", "classic primary
  66. # domain controller", "classic backup domain controller", "active
  67. # directory domain controller".
  68. #
  69. # Most people will want "standalone sever" or "member server".
  70. # Running as "active directory domain controller" will require first
  71. # running "samba-tool domain provision" to wipe databases and create a
  72. # new domain.
  73. server role = standalone server
  74.  
  75. # If you are using encrypted passwords, Samba will need to know what
  76. # password database type you are using.
  77. ; passdb backend = tdbsam
  78.  
  79. obey pam restrictions = yes
  80.  
  81. # This boolean parameter controls whether Samba attempts to sync the Unix
  82. # password with the SMB password when the encrypted SMB password in the
  83. # passdb is changed.
  84. unix password sync = yes
  85.  
  86. # For Unix password sync to work on a Debian GNU/Linux system, the following
  87. # parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
  88. # sending the correct chat script for the passwd program in Debian Sarge).
  89. passwd program = /usr/bin/passwd %u
  90. passwd chat = *Entersnews*spassword:* %nn *Retypesnews*spassword:* %nn *passwordsupdatedssuccessfully* .
  91.  
  92. # This boolean controls whether PAM will be used for password changes
  93. # when requested by an SMB client instead of the program listed in
  94. # 'passwd program'. The default is 'no'.
  95. pam password change = yes
  96.  
  97. # This option controls how unsuccessful authentication attempts are mapped
  98. # to anonymous connections
  99. map to guest = bad user
  100.  
  101. ########## Domains ###########
  102.  
  103. #
  104. # The following settings only takes effect if 'server role = primary
  105. # classic domain controller', 'server role = backup domain controller'
  106. # or 'domain logons' is set
  107. #
  108.  
  109. # It specifies the location of the user's
  110. # profile directory from the client point of view) The following
  111. # required a [profiles] share to be setup on the samba server (see
  112. # below)
  113. ; logon path = \%Nprofiles%U
  114. # Another common choice is storing the profile in the user's home directory
  115. # (this is Samba's default)
  116. # logon path = \%N%Uprofile
  117.  
  118. # The following setting only takes effect if 'domain logons' is set
  119. # It specifies the location of a user's home directory (from the client
  120. # point of view)
  121. ; logon drive = H:
  122. # logon home = \%N%U
  123.  
  124. # The following setting only takes effect if 'domain logons' is set
  125. # It specifies the script to run during logon. The script must be stored
  126. # in the [netlogon] share
  127. # NOTE: Must be store in 'DOS' file format convention
  128. ; logon script = logon.cmd
  129.  
  130. # This allows Unix users to be created on the domain controller via the SAMR
  131. # RPC pipe. The example command creates a user account with a disabled Unix
  132. # password; please adapt to your needs
  133. ; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
  134.  
  135. # This allows machine accounts to be created on the domain controller via the
  136. # SAMR RPC pipe.
  137. # The following assumes a "machines" group exists on the system
  138. ; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
  139.  
  140. # This allows Unix groups to be created on the domain controller via the SAMR
  141. # RPC pipe.
  142. ; add group script = /usr/sbin/addgroup --force-badname %g
  143.  
  144. ############ Misc ############
  145.  
  146. # Using the following line enables you to customise your configuration
  147. # on a per machine basis. The %m gets replaced with the netbios name
  148. # of the machine that is connecting
  149. ; include = /home/samba/etc/smb.conf.%m
  150.  
  151. # Some defaults for winbind (make sure you're not using the ranges
  152. # for something else.)
  153. ; idmap uid = 10000-20000
  154. ; idmap gid = 10000-20000
  155. ; template shell = /bin/bash
  156.  
  157. # Setup usershare options to enable non-root users to share folders
  158. # with the net usershare command.
  159.  
  160. # Maximum number of usershare. 0 (default) means that usershare is disabled.
  161. ; usershare max shares = 100
  162.  
  163. # Allow users who've been granted usershare privileges to create
  164. # public shares, not just authenticated ones
  165. usershare allow guests = yes
  166. username map = /etc/samba/smbusers
  167. security = user
  168. ; encrypt passwords = yes
  169. ; guest ok = no
  170. ; guest account = nobody
  171.  
  172. #======================= Share Definitions =======================
  173.  
  174. # Un-comment the following (and tweak the other settings below to suit)
  175. # to enable the default home directory shares. This will share each
  176. # user's home directory as \serverusername
  177. ;[homes]
  178. ; comment = Home Directories
  179. ; browseable = no
  180.  
  181. # By default, the home directories are exported read-only. Change the
  182. # next parameter to 'no' if you want to be able to write to them.
  183. ; read only = yes
  184.  
  185. # File creation mask is set to 0700 for security reasons. If you want to
  186. # create files with group=rw permissions, set next parameter to 0775.
  187. ; create mask = 0700
  188.  
  189. # Directory creation mask is set to 0700 for security reasons. If you want to
  190. # create dirs. with group=rw permissions, set next parameter to 0775.
  191. ; directory mask = 0700
  192.  
  193. # By default, \serverusername shares can be connected to by anyone
  194. # with access to the samba server.
  195. # Un-comment the following parameter to make sure that only "username"
  196. # can connect to \serverusername
  197. # This might need tweaking when using external authentication schemes
  198. ; valid users = %S
  199.  
  200. # Z Share
  201. [Z Share]
  202. comment = Public Share Directory
  203. path = /media/shares/Z-Share
  204. writeable = yes
  205. valid users = bg, bountiful
  206. create mask = 0775
  207. directory mask = 0775
  208. dns proxy = no
  209. force user = bg
  210. force group = share
  211. ; browseable = yes
  212.  
  213. rwxrwxr-x 2 bountiful share 4096 Mar 9 13:44 Backup
  214. drwx------ 2 root root 16384 Mar 9 12:56 lost+found
  215. drwxrwxr-x 2 bountiful share 4096 Mar 9 13:44 Y-Share
  216. drwxrwxr-x 2 bountiful share 4096 Mar 9 13:44 Z-Share
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement