Guest User

sbm.cnf

a guest
Sep 23rd, 2013
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.89 KB | None | 0 0
  1. # This is the main Samba configuration file. You should read the
  2. # smb.conf(5) manual page in order to understand the options listed
  3. # here. Samba has a huge number of configurable options (perhaps too
  4. # many!) most of which are not shown in this example
  5. #
  6. # For a step to step guide on installing, configuring and using samba,
  7. # read the Samba-HOWTO-Collection. This may be obtained from:
  8. # http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
  9. #
  10. # Many working examples of smb.conf files can be found in the
  11. # Samba-Guide which is generated daily and can be downloaded from:
  12. # http://www.samba.org/samba/docs/Samba-Guide.pdf
  13. #
  14. # Any line which starts with a ; (semi-colon) or a # (hash)
  15. # is a comment and is ignored. In this example we will use a #
  16. # for commentry and a ; for parts of the config file that you
  17. # may wish to enable
  18. #
  19. # NOTE: Whenever you modify this file you should run the command "testparm"
  20. # to check that you have not made any basic syntactic errors.
  21. #
  22. #---------------
  23. # SELINUX NOTES:
  24. #
  25. # If you want to use the useradd/groupadd family of binaries please run:
  26. # setsebool -P samba_domain_controller on
  27. #
  28. # If you want to share home directories via samba please run:
  29. # setsebool -P samba_enable_home_dirs on
  30. #
  31. # If you create a new directory you want to share you should mark it as
  32. # "samba_share_t" so that selinux will let you write into it.
  33. # Make sure not to do that on system directories as they may already have
  34. # been marked with othe SELinux labels.
  35. #
  36. # Use ls -ldZ /path to see which context a directory has
  37. #
  38. # Set labels only on directories you created!
  39. # To set a label use the following: chcon -t samba_share_t /path
  40. #
  41. # If you need to share a system created directory you can use one of the
  42. # following (read-only/read-write):
  43. # setsebool -P samba_export_all_ro on
  44. # or
  45. # setsebool -P samba_export_all_rw on
  46. #
  47. # If you want to run scripts (preexec/root prexec/print command/...) please
  48. # put them into the /var/lib/samba/scripts directory so that smbd will be
  49. # allowed to run them.
  50. # Make sure you COPY them and not MOVE them so that the right SELinux context
  51. # is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
  52. #
  53. #--------------
  54. #
  55. #======================= Global Settings =====================================
  56.  
  57. [global]
  58.  
  59. # ----------------------- Network Related Options -------------------------
  60. #
  61. # workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
  62. #
  63. # server string is the equivalent of the NT Description field
  64. #
  65. # netbios name can be used to specify a server name not tied to the hostname
  66. #
  67. # Interfaces lets you configure Samba to use multiple interfaces
  68. # If you have multiple network interfaces then you can list the ones
  69. # you want to listen on (never omit localhost)
  70. #
  71. # Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
  72. # specifiy it as a per share option as well
  73. #
  74. workgroup = WORKGROUP
  75. server string = Samba Server Version %v
  76.  
  77. netbios name = CentOS
  78.  
  79. interfaces = eth1 192.168.1.6/24
  80. hosts allow = 192.168.1.
  81.  
  82. # --------------------------- Logging Options -----------------------------
  83. #
  84. # Log File let you specify where to put logs and how to split them up.
  85. #
  86. # Max Log Size let you specify the max size log files should reach
  87.  
  88. # logs split per machine
  89. log file = /var/log/samba/log.%m
  90. # max 50KB per log file, then rotate
  91. max log size = 500
  92.  
  93. # ----------------------- Standalone Server Options ------------------------
  94. #
  95. # Scurity can be set to user, share(deprecated) or server(deprecated)
  96. #
  97. # Backend to store user information in. New installations should
  98. # use either tdbsam or ldapsam. smbpasswd is available for backwards
  99. # compatibility. tdbsam requires no further configuration.
  100.  
  101. security = shared
  102. passdb backend = tdbsam
  103.  
  104. # ----------------------- Domain Members Options ------------------------
  105. #
  106. # Security must be set to domain or ads
  107. #
  108. # Use the realm option only with security = ads
  109. # Specifies the Active Directory realm the host is part of
  110. #
  111. # Backend to store user information in. New installations should
  112. # use either tdbsam or ldapsam. smbpasswd is available for backwards
  113. # compatibility. tdbsam requires no further configuration.
  114. #
  115. # Use password server option only with security = server or if you can't
  116. # use the DNS to locate Domain Controllers
  117. # The argument list may include:
  118. # password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
  119. # or to auto-locate the domain controller/s
  120. # password server = *
  121.  
  122.  
  123. ; security = domain
  124. ; passdb backend = tdbsam
  125. ; realm = MY_REALM
  126.  
  127. ; password server = <NT-Server-Name>
  128.  
  129. # ----------------------- Domain Controller Options ------------------------
  130. #
  131. # Security must be set to user for domain controllers
  132. #
  133. # Backend to store user information in. New installations should
  134. # use either tdbsam or ldapsam. smbpasswd is available for backwards
  135. # compatibility. tdbsam requires no further configuration.
  136. #
  137. # Domain Master specifies Samba to be the Domain Master Browser. This
  138. # allows Samba to collate browse lists between subnets. Don't use this
  139. # if you already have a Windows NT domain controller doing this job
  140. #
  141. # Domain Logons let Samba be a domain logon server for Windows workstations.
  142. #
  143. # Logon Scrpit let yuou specify a script to be run at login time on the client
  144. # You need to provide it in a share called NETLOGON
  145. #
  146. # Logon Path let you specify where user profiles are stored (UNC path)
  147. #
  148. # Various scripts can be used on a domain controller or stand-alone
  149. # machine to add or delete corresponding unix accounts
  150. #
  151. ; security = user
  152. ; passdb backend = tdbsam
  153.  
  154. ; domain master = yes
  155. ; domain logons = yes
  156.  
  157. # the login script name depends on the machine name
  158. ; logon script = %m.bat
  159. # the login script name depends on the unix user used
  160. ; logon script = %u.bat
  161. ; logon path = \\%L\Profiles\%u
  162. # disables profiles support by specifing an empty path
  163. ; logon path =
  164.  
  165. ; add user script = /usr/sbin/useradd "%u" -n -g users
  166. ; add group script = /usr/sbin/groupadd "%g"
  167. ; add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
  168. ; delete user script = /usr/sbin/userdel "%u"
  169. ; delete user from group script = /usr/sbin/userdel "%u" "%g"
  170. ; delete group script = /usr/sbin/groupdel "%g"
  171.  
  172.  
  173. # ----------------------- Browser Control Options ----------------------------
  174. #
  175. # set local master to no if you don't want Samba to become a master
  176. # browser on your network. Otherwise the normal election rules apply
  177. #
  178. # OS Level determines the precedence of this server in master browser
  179. # elections. The default value should be reasonable
  180. #
  181. # Preferred Master causes Samba to force a local browser election on startup
  182. # and gives it a slightly higher chance of winning the election
  183. ; local master = no
  184. ; os level = 33
  185. ; preferred master = yes
  186.  
  187. #----------------------------- Name Resolution -------------------------------
  188. # Windows Internet Name Serving Support Section:
  189. # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
  190. #
  191. # - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
  192. #
  193. # - WINS Server: Tells the NMBD components of Samba to be a WINS Client
  194. #
  195. # - WINS Proxy: Tells Samba to answer name resolution queries on
  196. # behalf of a non WINS capable client, for this to work there must be
  197. # at least one WINS Server on the network. The default is NO.
  198. #
  199. # DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
  200. # via DNS nslookups.
  201.  
  202. ; wins support = yes
  203. ; wins server = w.x.y.z
  204. ; wins proxy = yes
  205.  
  206. ; dns proxy = yes
  207.  
  208. # --------------------------- Printing Options -----------------------------
  209. #
  210. # Load Printers let you load automatically the list of printers rather
  211. # than setting them up individually
  212. #
  213. # Cups Options let you pass the cups libs custom options, setting it to raw
  214. # for example will let you use drivers on your Windows clients
  215. #
  216. # Printcap Name let you specify an alternative printcap file
  217. #
  218. # You can choose a non default printing system using the Printing option
  219.  
  220. load printers = yes
  221. cups options = raw
  222.  
  223. ; printcap name = /etc/printcap
  224. #obtain list of printers automatically on SystemV
  225. ; printcap name = lpstat
  226. ; printing = cups
  227.  
  228. # --------------------------- Filesystem Options ---------------------------
  229. #
  230. # The following options can be uncommented if the filesystem supports
  231. # Extended Attributes and they are enabled (usually by the mount option
  232. # user_xattr). Thess options will let the admin store the DOS attributes
  233. # in an EA and make samba not mess with the permission bits.
  234. #
  235. # Note: these options can also be set just per share, setting them in global
  236. # makes them the default for all shares
  237.  
  238. ; map archive = no
  239. ; map hidden = no
  240. ; map read only = no
  241. ; map system = no
  242. ; store dos attributes = yes
  243.  
  244.  
  245. #============================ Share Definitions ==============================
  246.  
  247. [homes]
  248. comment = Home Directories
  249. browseable = no
  250. ; browseable = yes
  251. writable = yes
  252. ; valid users = %S
  253. ; valid users = MYDOMAIN\%S
  254.  
  255. [printers]
  256. comment = All Printers
  257. path = /var/spool/samba
  258. browseable = no
  259. guest ok = no
  260. writable = no
  261. printable = yes
  262.  
  263. # Un-comment the following and create the netlogon directory for Domain Logons
  264. ; [netlogon]
  265. ; comment = Network Logon Service
  266. ; path = /var/lib/samba/netlogon
  267. ; guest ok = yes
  268. ; writable = no
  269. ; share modes = no
  270.  
  271.  
  272. # Un-comment the following to provide a specific roving profile share
  273. # the default is to use the user's home directory
  274. ; [Profiles]
  275. ; path = /var/lib/samba/profiles
  276. ; browseable = no
  277. ; guest ok = yes
  278.  
  279.  
  280. # A publicly accessible directory, but read only, except for people in
  281. # the "staff" group
  282. [Downloads]
  283. comment = DL
  284. path = /Shared/Downloads
  285. ; public = yes
  286. writable = yes
  287. guest ok = yes
  288. ; guest only = yes
  289. create mask = 0777
  290. directory mask = 0777
  291. browseable = yes
  292. ; valid users = Share, @Share
Advertisement
Add Comment
Please, Sign In to add comment